Show / Hide Table of Contents

Class FieldAttribute

Provides information about table schema that this typed row is a part of

Inheritance
System.Object
System.Attribute
TargetedAttribute
FieldAttribute
Inherited Members
TargetedAttribute.ANY_TARGET
TargetedAttribute.TargetName
TargetedAttribute.MetadataContent
TargetedAttribute.m_MetadataContent
TargetedAttribute.Metadata
TargetedAttribute.ParseMetadataContent(String)
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()
Namespace: NFX.DataAccess.CRUD
Assembly: NFX.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 overriden name for this field

Declaration
public readonly string BackendName
Field Value
Type Description
System.String

BackendType

Provides an overriden 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
Type Description
CharCase

CloneFromRowType

When set, points to a Typed-Row derivative that is used as a full clone

Declaration
public readonly Type CloneFromRowType
Field Value
Type Description
System.Type

Default

Provides default value

Declaration
public readonly object Default
Field Value
Type Description
System.Object

Description

Provides description

Declaration
public readonly string Description
Field Value
Type Description
System.String

DisplayFormat

Display format string or null

Declaration
public readonly string DisplayFormat
Field Value
Type Description
System.String

FormatDescription

Description for regular expression used for field format validation if set

Declaration
public readonly string FormatDescription
Field Value
Type Description
System.String

FormatRegExp

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
public readonly bool Key
Field Value
Type Description
System.Boolean

Kind

Provides hint/classification for textual field data

Declaration
public readonly DataKind Kind
Field Value
Type Description
DataKind

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
Type Description
StoreFlag

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
Type Description
JSONDataMap

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
Type Description
JSONDataMap

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX