11// Copyright (c) Microsoft Corporation.
2- // Licensed under the MIT License.
2+ // Licensed under the MIT License.
33
44using System . Globalization ;
55using Azure . Core ;
@@ -15,9 +15,6 @@ public class DurableTaskSchedulerOptions
1515 /// <summary>
1616 /// Initializes a new instance of the <see cref="DurableTaskSchedulerOptions"/> class.
1717 /// </summary>
18- /// <param name="endpointAddress">The endpoint address of the Durable Task Scheduler service.</param>
19- /// <param name="taskHubName">The name of the task hub to connect to.</param>
20- /// <param name="credential">The credential to use for authentication, or null for no authentication.</param>
2118 internal DurableTaskSchedulerOptions ( string endpointAddress , string taskHubName , TokenCredential ? credential = null )
2219 {
2320 this . EndpointAddress = endpointAddress ?? throw new ArgumentNullException ( nameof ( endpointAddress ) ) ;
@@ -77,6 +74,7 @@ public static DurableTaskSchedulerOptions FromConnectionString(
7774 // "Endpoint=https://myaccount.westus3.durabletask.io/;Authentication=ManagedIdentity;ClientID=00000000-0000-0000-0000-000000000000;TaskHubName=th01"
7875 // "Endpoint=https://myaccount.westus3.durabletask.io/;Authentication=DefaultAzure;TaskHubName=th01"
7976 // "Endpoint=https://myaccount.westus3.durabletask.io/;Authentication=None;TaskHubName=th01" (undocumented and only intended for local testing)
77+
8078 string endpointAddress = connectionString . Endpoint ;
8179
8280 if ( ! endpointAddress . Contains ( "://" ) )
@@ -86,6 +84,7 @@ public static DurableTaskSchedulerOptions FromConnectionString(
8684 }
8785
8886 string authType = connectionString . Authentication ;
87+
8988 TokenCredential ? credential ;
9089
9190 // Parse the supported auth types, in a case-insensitive way and without spaces
@@ -160,4 +159,4 @@ public static DurableTaskSchedulerOptions FromConnectionString(
160159 DurableTaskSchedulerOptions options = new ( endpointAddress , connectionString . TaskHubName , credential ) ;
161160 return options ;
162161 }
163- }
162+ }
0 commit comments