-
Notifications
You must be signed in to change notification settings - Fork 8
/
AttributeProxy.cs
39 lines (27 loc) · 1003 Bytes
/
AttributeProxy.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
35
36
37
38
39
using Microsoft.Xrm.Sdk.Metadata;
namespace Rappen.XTB.AutoNumManager
{
public class AttributeProxy
{
#region Internal Fields
internal StringAttributeMetadata attributeMetadata;
#endregion Internal Fields
#region Public Constructors
public AttributeProxy(StringAttributeMetadata metadata)
{
attributeMetadata = metadata;
}
#endregion Public Constructors
#region Public Properties
public string DisplayName { get { return attributeMetadata.DisplayName?.UserLocalizedLabel?.Label; } }
public string Format { get { return attributeMetadata.AutoNumberFormat ?? string.Empty; } }
public string LogicalName { get { return attributeMetadata.LogicalName; } }
#endregion Public Properties
#region Public Methods
public override string ToString()
{
return attributeMetadata.LogicalName;
}
#endregion Public Methods
}
}