/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Services/ExtensionAssemblyManagerProvider.cs
30 строк
1 KB
Cyrus Najmabadi
Merge remote-tracking branch 'upstream/main' into actuallyUseAutoProps
01 апр 2025, 20:18
01 апр 2025, 20:18
95bbf74
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Composition; using Microsoft.CodeAnalysis.Host.Mef; namespace Microsoft.CodeAnalysis.LanguageServer.Services; /// <summary> /// Provider to allow MEF access to <see cref="ExtensionAssemblyManager"/> /// Must be done this way as the manager is required to create MEF as well. /// </summary> [Export, Shared] internal sealed class ExtensionAssemblyManagerMefProvider { [ImportingConstructor] [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] public ExtensionAssemblyManagerMefProvider() { } [Export] public ExtensionAssemblyManager ExtensionAssemblyManager { get => field ?? throw new InvalidOperationException($"{nameof(ExtensionAssemblyManager)} is not initialized"); private set; } public void SetMefExtensionAssemblyManager(ExtensionAssemblyManager extensionAssemblyManager) { ExtensionAssemblyManager = extensionAssemblyManager; } }