mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
ClassId Attribute
This commit is contained in:
19
Esiur/Resource/ClassIdAttribute.cs
Normal file
19
Esiur/Resource/ClassIdAttribute.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Esiur.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Esiur.Resource
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum)]
|
||||
public class ClassIdAttribute : Attribute
|
||||
{
|
||||
public Guid ClassId { get; private set; }
|
||||
|
||||
public ClassIdAttribute(string classId)
|
||||
{
|
||||
var data = DC.FromHex(classId, null);
|
||||
ClassId = new Guid(data);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user