Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
McpEnumValueAttribute.cs
1using System;
2
4{
8 [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue |
9 AttributeTargets.Property | AttributeTargets.Field,
10 Inherited = true, AllowMultiple = true)]
11 public class McpEnumValueAttribute : Attribute
12 {
18 public McpEnumValueAttribute(object Value, string? Title)
19 {
20 if (!(Value is Enum EnumValue))
21 throw new ArgumentException("Value must be an enumeration value.", nameof(Value));
22
23 this.Value = EnumValue;
24 this.Title = Title;
25 }
26
30 public Enum Value { get; }
31
35 public string? Title { get; }
36 }
37}
McpEnumValueAttribute(object Value, string? Title)
Provides a title to an enumeration value.