Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setting extension priority strategies assignment in ExtensionManager #13352

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/OrchardCore/OrchardCore/Extensions/ExtensionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private readonly ConcurrentDictionary<string, Lazy<IEnumerable<IFeatureInfo>>> _
private readonly ConcurrentDictionary<string, Lazy<IEnumerable<IFeatureInfo>>> _dependentFeatures
= new ConcurrentDictionary<string, Lazy<IEnumerable<IFeatureInfo>>>();

private bool _isInitialized = false;
private bool _isInitialized;
private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1);

public ExtensionManager(
Expand All @@ -51,7 +51,7 @@ public ExtensionManager(
{
_applicationContext = applicationContext;
_extensionDependencyStrategies = extensionDependencyStrategies as IExtensionDependencyStrategy[] ?? extensionDependencyStrategies.ToArray();
_extensionPriorityStrategies = extensionPriorityStrategies as IExtensionPriorityStrategy[] ?? _extensionPriorityStrategies.ToArray();
_extensionPriorityStrategies = extensionPriorityStrategies as IExtensionPriorityStrategy[] ?? extensionPriorityStrategies.ToArray();
_typeFeatureProvider = typeFeatureProvider;
_featuresProvider = featuresProvider;
L = logger;
Expand Down Expand Up @@ -365,7 +365,7 @@ await modules.ForEachAsync((module) =>

loadedFeatures.Add(feature.Id, new FeatureEntry(feature, featureTypes));
}
};
}

// Feature infos and entries are ordered by priority and dependencies.
_featureInfos = Order(loadedFeatures.Values.Select(f => f.FeatureInfo));
Expand Down