Skip to content

Commit a1e5993

Browse files
committed
remove unused strings
1 parent 889f65f commit a1e5993

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

src/DurableSDK/PowerShellServices.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public bool isExternalDurableSdkLoaded()
5252
var numCandidates = matchingModules.Count();
5353
var isModuleInCurrentSession = numCandidates > 0;
5454

55-
if (isModuleInCurrentSession)
56-
{
55+
if (isModuleInCurrentSession)
56+
{
5757
var candidatesInfo = matchingModules.Select(module => string.Format(
5858
PowerShellWorkerStrings.FoundExternalDurableSdkInSession, module.Name, module.Version, module.Path));
5959
var externalSDKModuleInfo = string.Join('\n', candidatesInfo);
@@ -71,9 +71,7 @@ public bool isExternalDurableSdkLoaded()
7171
// a single external SDK is in session. Report its metadata
7272
_logger.Log(isUserOnlyLog: false, LogLevel.Trace, externalSDKModuleInfo);
7373
}
74-
7574
}
76-
7775
return isModuleInCurrentSession;
7876
}
7977

src/DurableWorker/DurableController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ public string GetOrchestrationParameterName()
6262
return _orchestrationBindingInfo?.ParameterName;
6363
}
6464

65-
public void InitializeBindings(IList<ParameterBinding> inputData, out bool hasExternalSDK)
65+
private void tryEnablingExternalSDK()
6666
{
6767
var isExternalSdkLoaded = _powerShellServices.isExternalDurableSdkLoaded();
68-
6968
if (isExternalDFSdkEnabled)
7069
{
7170
if (isExternalSdkLoaded)
@@ -84,7 +83,11 @@ public void InitializeBindings(IList<ParameterBinding> inputData, out bool hasEx
8483
// External SDK is in session, but customer does not mean to enable it. Report potential clashes
8584
_logger.Log(isUserOnlyLog: false, LogLevel.Error, String.Format(PowerShellWorkerStrings.PotentialDurableSDKClash, Utils.ExternalDurableSdkName));
8685
}
86+
}
8787

88+
public void InitializeBindings(IList<ParameterBinding> inputData, out bool hasExternalSDK)
89+
{
90+
this.tryEnablingExternalSDK();
8891

8992
// If the function is an durable client, then we set the DurableClient
9093
// in the module context for the 'Start-DurableOrchestration' function to use.

src/resources/PowerShellWorkerStrings.resx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,21 +361,9 @@
361361
<data name="UnableToInitializeOrchestrator" xml:space="preserve">
362362
<value>Unable to initialize orchestrator function due to presence of other bindings. Total number of bindings found is '{0}'. Orchestrator Functions should never use any input or output bindings other than the orchestration trigger itself. See: https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-bindings</value>
363363
</data>
364-
<data name="LoadingDurableSDK" xml:space="preserve">
365-
<value>Attempting to load '{0}' as the Durable Functions SDK</value>
366-
</data>
367-
<data name="ErrorImportingDurableSDK" xml:space="preserve">
368-
<value>An unexpected error ocurred while importing '{0}': '{1}'</value>
369-
</data>
370364
<data name="WorkerInitCompleted" xml:space="preserve">
371365
<value>Worker init request completed in {0} ms.</value>
372366
</data>
373-
<data name="DurableNotInWorkerPath" xml:space="preserve">
374-
<value>The Durable Functions SDK, '{0}', could not be found. Please make sure this module is available in the PowerShell worker path. PowerShell worker PSModulePath: '{1}'</value>
375-
</data>
376-
<data name="ImportSucceeded" xml:space="preserve">
377-
<value>Import of module '{0}' at version '{1}' succeeded.</value>
378-
</data>
379367
<data name="UnexpectedResultCount" xml:space="preserve">
380368
<value>Operation '{0}' expected '{1}' result(s) but received '{2}'.</value>
381369
</data>

0 commit comments

Comments
 (0)