File: Internal\Editor\FSharpContentTypeLanguageService.cs
Web Access
Project: src\src\VisualStudio\ExternalAccess\FSharp\Microsoft.CodeAnalysis.ExternalAccess.FSharp.csproj (Microsoft.CodeAnalysis.ExternalAccess.FSharp)
// 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.
 
#nullable disable
 
using System;
using System.Composition;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.VisualStudio.Utilities;
using Microsoft.CodeAnalysis.ExternalAccess.FSharp.Editor;
using Microsoft.CodeAnalysis.Host.Mef;
 
namespace Microsoft.CodeAnalysis.ExternalAccess.FSharp.Internal.Editor;
 
[ExportContentTypeLanguageService(FSharpContentTypeNames.FSharpContentType, LanguageNames.FSharp), Shared]
internal class FSharpContentTypeLanguageService : IContentTypeLanguageService
{
    private readonly IContentTypeRegistryService _contentTypeRegistry;
 
    [ImportingConstructor]
    [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
    public FSharpContentTypeLanguageService(IContentTypeRegistryService contentTypeRegistry)
    {
        _contentTypeRegistry = contentTypeRegistry;
    }
 
    public IContentType GetDefaultContentType()
    {
        return _contentTypeRegistry.GetContentType(FSharpContentTypeNames.FSharpContentType);
    }
}