forked from stride3d/stride
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataAliasAttribute.cs
34 lines (30 loc) · 1.16 KB
/
DataAliasAttribute.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
// Copyright (c) Xenko contributors (https://xenko.com) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System;
namespace Xenko.Core
{
/// <summary>
/// Allows to re-map a previous class/field/property/enum name to the specified property/field/enum/class/struct.
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Enum | AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)]
public sealed class DataAliasAttribute : Attribute
{
private readonly string name;
/// <summary>
/// Initializes a new instance of the <see cref="DataAliasAttribute"/> class.
/// </summary>
/// <param name="name">The previous name.</param>
public DataAliasAttribute(string name)
{
this.name = name;
}
/// <summary>
/// Gets the previous name.
/// </summary>
/// <value>The previous name.</value>
public string Name
{
get { return name; }
}
}
}