Class Schema.FieldDef
  
  Provides a definition for a single field of a row
 
  
  
    Inheritance
    System.Object
    Schema.FieldDef
   
  
    Implements
    
    
    System.Runtime.Serialization.ISerializable
    
   
  
    Inherited Members
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
   
  
  Assembly: NFX.dll
  Syntax
  
    [Serializable]
public sealed class FieldDef : INamed, IOrdered, ISerializable, IJSONWritable
   
  Constructors
  
  
  
  
  FieldDef(String, Type, FieldAttribute)
  
  
  Declaration
  
    public FieldDef(string name, Type type, FieldAttribute attr)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
      
        | System.Type | 
        type | 
         | 
      
      
        | FieldAttribute | 
        attr | 
         | 
      
    
  
  
  
  
  FieldDef(String, Type, QuerySource.ColumnDef)
  
  
  Declaration
  
    public FieldDef(string name, Type type, QuerySource.ColumnDef columnDef)
   
  Parameters
  
  
  
  
  FieldDef(String, Type, IEnumerable<FieldAttribute>)
  
  
  Declaration
  
    public FieldDef(string name, Type type, IEnumerable<FieldAttribute> attrs)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
      
        | System.Type | 
        type | 
         | 
      
      
        | System.Collections.Generic.IEnumerable<FieldAttribute> | 
        attrs | 
         | 
      
    
  
  Properties
  
  
  
  
  AnyTargetKey
  Returns true when this field is attributed as being a key field in an attribute that targets ANY_TARGET
 
  
  Declaration
  
    public bool AnyTargetKey { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  AnyVisible
  Returns true when this field is attributed as being a visible in any of the targeted attribute
 
  
  Declaration
  
    public bool AnyVisible { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  Attrs
  
  
  Declaration
  
    public IEnumerable<FieldAttribute> Attrs { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<FieldAttribute> | 
         | 
      
    
  
  
  
  
  Description
  Returns description from field attribute or parses it from field name
 
  
  Declaration
  
    public string Description { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  Item[String]
  Returns a FieldAttribute that matches the supplied targetName, or if one was not defined then
returns FieldAttribute which matches any target or null
 
  
  Declaration
  
    public FieldAttribute this[string targetName] { get; }
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        targetName | 
         | 
      
    
  
  Property Value
  
  
  
  
  MemberInfo
  For TypedRow-descendants returns a PropertyInfo object for the underlying property
 
  
  Declaration
  
    public PropertyInfo MemberInfo { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Reflection.PropertyInfo | 
         | 
      
    
  
  
  
  
  Name
  Returns the name of the field
 
  
  Declaration
  
    public string Name { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  NonNullableType
  For nullable value types returns the field type regardless of nullability, it is the type argument of Nullable struct;
For reference types returns the same type as Type property
 
  
  Declaration
  
    public Type NonNullableType { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Type | 
         | 
      
    
  
  
  
  
  NonUI
  Returns true when at least one attribute was marked as NonUI - meaning that this field must not be serialized-to/deserialized-from client UI
 
  
  Declaration
  
    public bool NonUI { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  Order
  Gets absolute field order index in a row
 
  
  Declaration
  
    public int Order { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
  
  
  Type
  
  
  Declaration
  
    public Type Type { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Type | 
         | 
      
    
  
  Methods
  
  
  
  
  Equals(Object)
  
  
  Declaration
  
    public override bool Equals(object obj)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Object | 
        obj | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  Overrides
  System.Object.Equals(System.Object)
  
  
  
  GetBackendNameForTarget(String)
  Returns the name of the field in backend that was possibly overriden for a particular target
 
  
  Declaration
  
    public string GetBackendNameForTarget(string targetName)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        targetName | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  GetBackendNameForTarget(String, out FieldAttribute)
  Returns the name of the field in backend that was possibly overriden for a particular target
along with store flag
 
  
  Declaration
  
    public string GetBackendNameForTarget(string targetName, out FieldAttribute attr)
   
  Parameters
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  GetHashCode()
  
  
  Declaration
  
    public override int GetHashCode()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  Overrides
  System.Object.GetHashCode()
  
  
  
  GetObjectData(SerializationInfo, StreamingContext)
  
  
  Declaration
  
    public void GetObjectData(SerializationInfo info, StreamingContext context)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Runtime.Serialization.SerializationInfo | 
        info | 
         | 
      
      
        | System.Runtime.Serialization.StreamingContext | 
        context | 
         | 
      
    
  
  
  
  
  ToString()
  
  
  Declaration
  
    public override string ToString()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  Overrides
  System.Object.ToString()
  
  
  
  ValueDescription(Object, String, Boolean)
  For fields with ValueList returns value's description per specified schema
 
  
  Declaration
  
    public string ValueDescription(object fieldValue, string target = null, bool caseSensitiveKeys = false)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Object | 
        fieldValue | 
         | 
      
      
        | System.String | 
        target | 
         | 
      
      
        | System.Boolean | 
        caseSensitiveKeys | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  WriteAsJSON(TextWriter, Int32, JSONWritingOptions)
  Writes fielddef as JSON. Do not call this method directly, instead call rowset.ToJSON() or use JSONWriter class
 
  
  Declaration
  
    public void WriteAsJSON(TextWriter wri, int nestingLevel, JSONWritingOptions options = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.IO.TextWriter | 
        wri | 
         | 
      
      
        | System.Int32 | 
        nestingLevel | 
         | 
      
      
        | JSONWritingOptions | 
        options | 
         | 
      
    
  
  Implements
  
  
  
      System.Runtime.Serialization.ISerializable
  
  
  Extension Methods