CodeLiturgy.Dashboard/BlueWest.Data/Data/AAttribute.cs

25 lines
786 B
C#
Raw Normal View History

2021-12-06 19:27:46 +03:00
using System;
namespace BlueWest.Data
{
/// <summary>
/// Specifies that the annotated class can be mapped from the provided <see cref="SourceType"/>.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public sealed class AAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="MapFromAttribute"/> class with the specified <paramref name="sourceType"/>.
/// </summary>
/// <param name="sourceType">The type of to map from.</param>
public AAttribute(Type sourceType)
{
SourceType = sourceType;
}
/// <summary>
/// Gets the type to map from.
/// </summary>
public Type SourceType { get; }
}
}