@@ -41,9 +41,7 @@ public static string ApiKey
4141 {
4242 Task osSendTask = SendOSInformation ( value ) ;
4343 Task dhTask = DiffieHellmanExchange . CreateSharedSecretWithServer ( ) ;
44- _IsThreadProductEnabled = new IsThreadingProductEnabled ( ) ;
45- Task isThreadingEnabledTask = _IsThreadProductEnabled . ValidateThreadingProductSubscription ( ) ;
46- Task . WhenAll ( osSendTask , dhTask , isThreadingEnabledTask ) . GetAwaiter ( ) . GetResult ( ) ;
44+ Task . WhenAll ( osSendTask , dhTask ) . GetAwaiter ( ) . GetResult ( ) ;
4745 }
4846 else
4947 {
@@ -108,54 +106,6 @@ internal static DiffieHellmanExchange DiffieHellmanExchange
108106 get { return _DiffieHellmanExchange ; }
109107 set { _DiffieHellmanExchange = value ; }
110108 }
111-
112- private static IsThreadingProductEnabled _IsThreadProductEnabled ;
113- internal static IsThreadingProductEnabled IsThreadProductEnabled
114- {
115- get { return _IsThreadProductEnabled ; }
116- set { _IsThreadProductEnabled = value ; }
117- }
118-
119- private static bool _IsThreadingEnabled = IsThreadingEnabledChecker ( ) . GetAwaiter ( ) . GetResult ( ) ;
120- internal static bool IsThreadingEnabled
121- {
122- get { return _IsThreadingEnabled ; }
123- set { _IsThreadingEnabled = value ; }
124- }
125-
126- private static async Task < bool > IsThreadingEnabledChecker ( )
127- {
128- bool result = true ;
129- if ( ! await IsRunningInTestMode ( ) )
130- {
131- result = false ;
132- }
133- return result ;
134- }
135-
136-
137- /// <summary>
138- /// Used to determine if the project is being run from xunit so specific things wont fail
139- /// due to running the SDK in test mode.
140- /// </summary>
141- /// <returns></returns>
142- private static async Task < bool > IsRunningInTestMode ( )
143- {
144- var stackTrace = new StackTrace ( ) ;
145- foreach ( var frame in stackTrace . GetFrames ( ) )
146- {
147- var method = frame . GetMethod ( ) ;
148- if ( method != null && method . DeclaringType != null )
149- {
150- var assembly = method . DeclaringType . Assembly ;
151- if ( assembly . FullName . StartsWith ( "xunit" ) )
152- {
153- return true ;
154- }
155- }
156- }
157- return false ;
158- }
159109 private static async Task SendOSInformation ( string apiKey )
160110 {
161111 OperatingSystemDeterminator osd = new OperatingSystemDeterminator ( ) ;
0 commit comments