28 lines
533 B
C#
28 lines
533 B
C#
using Demo.Features;
|
|
|
|
namespace Demo.Models;
|
|
|
|
/// <summary>
|
|
/// 元数据
|
|
/// </summary>
|
|
public interface IMetadata
|
|
{
|
|
string Name { get; }
|
|
|
|
Guid SignId { get; }
|
|
/// <summary>
|
|
/// 属性
|
|
/// </summary>
|
|
MetadataPropertySet Properties { get; }
|
|
|
|
public IMetadata SetProperty(string name, object? value)
|
|
{
|
|
Properties.SetValue(name, value);
|
|
return this;
|
|
}
|
|
|
|
public TValue? GetProperty<TValue>(string name)
|
|
{
|
|
return Properties.GetValue(name).Cast<TValue>();
|
|
}
|
|
} |