1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 namespace System.Transactions 6 { 7 internal static class EnterpriseServices 8 { 9 internal static bool EnterpriseServicesOk => false; 10 VerifyEnterpriseServicesOk()11 internal static void VerifyEnterpriseServicesOk() 12 { 13 if (!EnterpriseServicesOk) 14 { 15 ThrowNotSupported(); 16 } 17 } 18 GetContextTransaction(ContextData contextData)19 internal static Transaction GetContextTransaction(ContextData contextData) 20 { 21 if (EnterpriseServicesOk) 22 { 23 ThrowNotSupported(); 24 } 25 26 return null; 27 } 28 29 internal static bool CreatedServiceDomain { get; set; } = false; 30 UseServiceDomainForCurrent()31 internal static bool UseServiceDomainForCurrent() => false; 32 PushServiceDomain(Transaction newCurrent)33 internal static void PushServiceDomain(Transaction newCurrent) 34 { 35 ThrowNotSupported(); 36 } 37 LeaveServiceDomain()38 internal static void LeaveServiceDomain() 39 { 40 ThrowNotSupported(); 41 } 42 ThrowNotSupported()43 private static void ThrowNotSupported() 44 { 45 throw new PlatformNotSupportedException(SR.EsNotSupported); 46 } 47 } 48 } 49