Files
sqltoolsservice/external/Microsoft.SqlTools.Hosting.v2/Extensibility/ExportStandardMetadataAttribute.cs
Karl Burtram ccf95aed77 Move unused forked code to external directory (#1192)
* Move unused forked code to external directory

* Fix SLN build errors

* Add back resource provider core since it's referenced by main resource provider project

* Update PackageProjects step of pipeline
2021-04-16 15:33:35 -07:00

45 lines
1.2 KiB
C#

//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Composition;
namespace Microsoft.SqlTools.Hosting.Extensibility
{
/// <summary>
/// Base attribute class for all export definitions.
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class)]
public abstract class ExportStandardMetadataAttribute : ExportAttribute, IStandardMetadata
{
/// <summary>
/// Base class for DAC extensibility exports
/// </summary>
protected ExportStandardMetadataAttribute(Type contractType, string id, string displayName = null)
: base(contractType)
{
Id = id;
DisplayName = displayName;
}
/// <summary>
/// The version of this extension
/// </summary>
public string Version { get; set; }
/// <summary>
/// The id of the extension
/// </summary>
public string Id { get; }
/// <summary>
/// The display name for the extension
/// </summary>
public virtual string DisplayName { get; }
}
}