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,6 +15,9 @@ 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>
1821 internal DurableTaskSchedulerOptions ( string endpointAddress , string taskHubName , TokenCredential ? credential = null )
1922 {
2023 this . EndpointAddress = endpointAddress ?? throw new ArgumentNullException ( nameof ( endpointAddress ) ) ;
@@ -74,7 +77,6 @@ public static DurableTaskSchedulerOptions FromConnectionString(
7477 // "Endpoint=https://myaccount.westus3.durabletask.io/;Authentication=ManagedIdentity;ClientID=00000000-0000-0000-0000-000000000000;TaskHubName=th01"
7578 // "Endpoint=https://myaccount.westus3.durabletask.io/;Authentication=DefaultAzure;TaskHubName=th01"
7679 // "Endpoint=https://myaccount.westus3.durabletask.io/;Authentication=None;TaskHubName=th01" (undocumented and only intended for local testing)
77-
7880 string endpointAddress = connectionString . Endpoint ;
7981
8082 if ( ! endpointAddress . Contains ( "://" ) )
@@ -84,7 +86,6 @@ public static DurableTaskSchedulerOptions FromConnectionString(
8486 }
8587
8688 string authType = connectionString . Authentication ;
87-
8889 TokenCredential ? credential ;
8990
9091 // Parse the supported auth types, in a case-insensitive way and without spaces
@@ -159,4 +160,4 @@ public static DurableTaskSchedulerOptions FromConnectionString(
159160 DurableTaskSchedulerOptions options = new ( endpointAddress , connectionString . TaskHubName , credential ) ;
160161 return options ;
161162 }
162- }
163+ }
0 commit comments