-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
SettingsProviderAttribute.cs
44 lines (40 loc) · 1.26 KB
/
SettingsProviderAttribute.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
36
37
38
39
40
41
42
43
44
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Configuration
{
/// <summary>
/// Indicates the provider associated with a group of/individual setting.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
public sealed class SettingsProviderAttribute : Attribute
{
private readonly string _providerTypeName;
/// <summary>
/// Constructor takes the provider's assembly qualified type name.
/// </summary>
public SettingsProviderAttribute(string providerTypeName)
{
_providerTypeName = providerTypeName;
}
/// <summary>
/// Constructor takes the provider's type.
/// </summary>
public SettingsProviderAttribute(Type providerType)
{
if (providerType != null)
{
_providerTypeName = providerType.AssemblyQualifiedName;
}
}
/// <summary>
/// Type name of the provider
/// </summary>
public string ProviderTypeName
{
get
{
return _providerTypeName;
}
}
}
}