-
Notifications
You must be signed in to change notification settings - Fork 356
/
Copy pathExtensionAttribute.cs
35 lines (31 loc) · 1.31 KB
/
ExtensionAttribute.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
namespace Microsoft.Azure.WebJobs.Description
{
/// <summary>
/// Attribute used to mark types belonging to a single logical extension.
/// </summary>
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ExtensionAttribute : Attribute
{
/// <summary>
/// Creates an instance of the <see cref="ExtensionAttribute"/>.
/// </summary>
/// <param name="name">The friendly, human readable, name of the extension.</param>
/// <param name="configurationSection">The name of the configuration section for this extension.</param>
public ExtensionAttribute(string name, string configurationSection = null)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
ConfigurationSection = configurationSection;
}
/// <summary>
/// Gets the friendly human readable name of the extension.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the configuration section name for this extension.
/// </summary>
public string ConfigurationSection { get; }
}
}