Class FieldAttribute
Provides information about table schema that this typed row is a part of
Inheritance
System.Object
System.Attribute
FieldAttribute
Inherited Members
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
[Serializable]
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
public sealed class FieldAttribute : TargetedAttribute
Constructors
FieldAttribute(JSONDataMap, String, StoreFlag, Boolean, DataKind, Boolean, Boolean, Object, Object, Object, Int32, Int32, CharCase, String, String, String, String, Boolean, String, String, String)
Used for injection of pre-parsed value list
Declaration
public FieldAttribute(JSONDataMap valueList, string targetName = "*", StoreFlag storeFlag = StoreFlag.LoadAndStore, bool key = false, DataKind kind = DataKind.Text, bool required = false, bool visible = true, object dflt = null, object min = null, object max = null, int minLength = 0, int maxLength = 0, CharCase charCase = CharCase.AsIs, string backendName = null, string backendType = null, string description = null, string metadata = null, bool nonUI = false, string formatRegExp = null, string formatDescr = null, string displayFormat = null)
Parameters
Type |
Name |
Description |
JSONDataMap |
valueList |
|
System.String |
targetName |
|
StoreFlag |
storeFlag |
|
System.Boolean |
key |
|
DataKind |
kind |
|
System.Boolean |
required |
|
System.Boolean |
visible |
|
System.Object |
dflt |
|
System.Object |
min |
|
System.Object |
max |
|
System.Int32 |
minLength |
|
System.Int32 |
maxLength |
|
CharCase |
charCase |
|
System.String |
backendName |
|
System.String |
backendType |
|
System.String |
description |
|
System.String |
metadata |
|
System.Boolean |
nonUI |
|
System.String |
formatRegExp |
|
System.String |
formatDescr |
|
System.String |
displayFormat |
|
FieldAttribute(String, StoreFlag, Boolean, DataKind, Boolean, Boolean, String, Object, Object, Object, Int32, Int32, CharCase, String, String, String, String, Boolean, String, String, String, Boolean)
Declaration
public FieldAttribute(string targetName = "*", StoreFlag storeFlag = StoreFlag.LoadAndStore, bool key = false, DataKind kind = DataKind.Text, bool required = false, bool visible = true, string valueList = null, object dflt = null, object min = null, object max = null, int minLength = 0, int maxLength = 0, CharCase charCase = CharCase.AsIs, string backendName = null, string backendType = null, string description = null, string metadata = null, bool nonUI = false, string formatRegExp = null, string formatDescr = null, string displayFormat = null, bool isArow = false)
Parameters
Type |
Name |
Description |
System.String |
targetName |
|
StoreFlag |
storeFlag |
|
System.Boolean |
key |
|
DataKind |
kind |
|
System.Boolean |
required |
|
System.Boolean |
visible |
|
System.String |
valueList |
|
System.Object |
dflt |
|
System.Object |
min |
|
System.Object |
max |
|
System.Int32 |
minLength |
|
System.Int32 |
maxLength |
|
CharCase |
charCase |
|
System.String |
backendName |
|
System.String |
backendType |
|
System.String |
description |
|
System.String |
metadata |
|
System.Boolean |
nonUI |
|
System.String |
formatRegExp |
|
System.String |
formatDescr |
|
System.String |
displayFormat |
|
System.Boolean |
isArow |
|
FieldAttribute(Type)
Declaration
public FieldAttribute(Type cloneFromRowType)
Parameters
Type |
Name |
Description |
System.Type |
cloneFromRowType |
|
FieldAttribute(Type, String, String, Object, Object, Object, Object, Object, String, Object, Object, Object, Object, Object, Object, String, String, String, String, Object, String, String, String, Object)
Declaration
public FieldAttribute(Type protoType, string protoFieldName, string targetName = "*", object storeFlag = null, object key = null, object kind = null, object required = null, object visible = null, string valueList = null, object dflt = null, object min = null, object max = null, object minLength = null, object maxLength = null, object charCase = null, string backendName = null, string backendType = null, string description = null, string metadata = null, object nonUI = null, string formatRegExp = null, string formatDescr = null, string displayFormat = null, object isArow = null)
Parameters
Type |
Name |
Description |
System.Type |
protoType |
|
System.String |
protoFieldName |
|
System.String |
targetName |
|
System.Object |
storeFlag |
|
System.Object |
key |
|
System.Object |
kind |
|
System.Object |
required |
|
System.Object |
visible |
|
System.String |
valueList |
|
System.Object |
dflt |
|
System.Object |
min |
|
System.Object |
max |
|
System.Object |
minLength |
|
System.Object |
maxLength |
|
System.Object |
charCase |
|
System.String |
backendName |
|
System.String |
backendType |
|
System.String |
description |
|
System.String |
metadata |
|
System.Object |
nonUI |
|
System.String |
formatRegExp |
|
System.String |
formatDescr |
|
System.String |
displayFormat |
|
System.Object |
isArow |
|
Fields
BackendName
Provides an overridden name for this field
Declaration
public readonly string BackendName
Field Value
Type |
Description |
System.String |
|
BackendType
Provides an overridden type for this field in backend,
i.e. CLR string may be stored as ErlPid in erlang
Declaration
public readonly string BackendType
Field Value
Type |
Description |
System.String |
|
CharCase
Controls character casing of textual fields
Declaration
public readonly CharCase CharCase
Field Value
CloneFromDocType
When set, points to a Typed-Doc derivative that is used as a full clone
Declaration
public readonly Type CloneFromDocType
Field Value
Type |
Description |
System.Type |
|
Default
Declaration
public readonly object Default
Field Value
Type |
Description |
System.Object |
|
Description
Declaration
public readonly string Description
Field Value
Type |
Description |
System.String |
|
Display format string or null
Declaration
public readonly string DisplayFormat
Field Value
Type |
Description |
System.String |
|
Description for regular expression used for field format validation if set
Declaration
public readonly string FormatDescription
Field Value
Type |
Description |
System.String |
|
Regular expression used for field format validation if set
Declaration
public readonly string FormatRegExp
Field Value
Type |
Description |
System.String |
|
IsArow
True if this field definition is used by Arow serializer
Declaration
public readonly bool IsArow
Field Value
Type |
Description |
System.Boolean |
|
Key
Determines whether this field is a part of the primary key
Declaration
Field Value
Type |
Description |
System.Boolean |
|
Kind
Provides hint/classification for textual field data
Declaration
public readonly DataKind Kind
Field Value
Max
Provides high-bound validation check
Declaration
public readonly object Max
Field Value
Type |
Description |
System.Object |
|
MaxLength
Imposes a limit on maximum amount of characters in a textual field
Declaration
public readonly int MaxLength
Field Value
Type |
Description |
System.Int32 |
|
Min
Provides low-bound validation check
Declaration
public readonly object Min
Field Value
Type |
Description |
System.Object |
|
MinLength
Imposes a limit on minimum amount of characters in a textual field
Declaration
public readonly int MinLength
Field Value
Type |
Description |
System.Int32 |
|
NonUI
If true indicates that this field is ignored when generating UI and ignored when UI supplies the value to the server.
Pass true to protect server-only structures from being modified by client
Declaration
public readonly bool NonUI
Field Value
Type |
Description |
System.Boolean |
|
Required
Determines whether the field must have data
Declaration
public readonly bool Required
Field Value
Type |
Description |
System.Boolean |
|
StoreFlag
Determines whether field should be loaded/stored from/to storage
Declaration
public readonly StoreFlag StoreFlag
Field Value
ValueList
Returns a ";/,/|"-delimited list of permitted field values - used for lookup validation
Declaration
public readonly string ValueList
Field Value
Type |
Description |
System.String |
|
Visible
Determines whether the field is shown to user (i.e. as a grid column)
Declaration
public readonly bool Visible
Field Value
Type |
Description |
System.Boolean |
|
Properties
HasValueList
Returns true if the value list is set or internal JSONDataMap is set
Declaration
public bool HasValueList { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Attribute.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Attribute.GetHashCode()
ParseValueList(Boolean)
Returns a ValueList parsed into key values as: val1: descr1,val2: desc2...
Declaration
public JSONDataMap ParseValueList(bool caseSensitiveKeys = false)
Parameters
Type |
Name |
Description |
System.Boolean |
caseSensitiveKeys |
|
Returns
ParseValueListString(String, Boolean)
Returns a string parsed into key values as: val1: descr1,val2: desc2...
Declaration
public static JSONDataMap ParseValueListString(string valueList, bool caseSensitiveKeys = false)
Parameters
Type |
Name |
Description |
System.String |
valueList |
|
System.Boolean |
caseSensitiveKeys |
|
Returns
Extension Methods