Class MetaField
Inheritance
System.Object
MetaField
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Mediachase.MetaDataPlus.dll
Version: 10.8.0
Constructors
MetaField(MetaDataContext)
Declaration
[Obsolete("This constructor exists for backwards compatibility only. Will remain at least until November 2016.")]
protected MetaField(MetaDataContext context)
Parameters
Properties
If true, the field may store null values.
Declaration
public bool AllowNulls { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
If true, search providers will attempt to index values of this meta field.
Declaration
[Obsolete("Use SafeAllowSearch or SetAllowSearch. Will remain at least until November 2016.")]
public bool AllowSearch { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
A collection of attributes describing additional properties of the meta field.
Declaration
public MetaAttributeCollection Attributes { get; }
Property Value
Context
The meta data context used to load or create this field.
Declaration
public MetaDataContext Context { get; }
Property Value
The type of data stored in the meta field.
Declaration
public MetaDataType DataType { get; }
Property Value
The long description of the meta field.
Declaration
public string Description { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
public MetaDictionary Dictionary { get; }
Property Value
True if this meta field is enabled in OwnerMetaClass, otherwise false.
Declaration
[Obsolete("Depends on faulty OwnerMetaClass implementation. Use GetFieldEnabled or SetFieldEnabled on the target meta class instead. Will remain at least until November 2016.")]
public bool Enabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
The friendly name of the meta field.
Declaration
public string FriendlyName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
The unique ID of the meta field.
Declaration
Property Value
| Type |
Description |
| System.Int32 |
|
If true, the values of this meta field will be encrypted.
Declaration
public bool IsEncrypted { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
If true, the field is defined in a system table and cannot be modifed.
Declaration
public bool IsSystem { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
If true, the field is defined by the meta data system.
Declaration
public bool IsUser { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
The length (in bytes, not characters) of the database storage used for the field.
Declaration
public int Length { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
If true, this meta field stores different values for different languages.
Declaration
public bool MultiLanguageValue { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
The unique name of the meta field.
Declaration
public string Name { get; }
Property Value
| Type |
Description |
| System.String |
|
The namespace of the meta field.
Declaration
public string Namespace { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
[Obsolete("OwnerMetaClass may vary depending on how the field was loaded and/or cached. Use OwnerMetaClassIdList. Will remain at least until November 2016.")]
public MetaClass OwnerMetaClass { get; }
Property Value
A collection of the meta classes that include this meta field.
Declaration
public MetaClassIdCollection OwnerMetaClassIdList { get; }
Property Value
Declaration
public bool SafeAllowSearch { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
SaveHistory
If true, a history of changes to value in this meta field will be saved.
Declaration
[Obsolete("SaveHistory is no longer supported. Will remain at least until November 2016.")]
public bool SaveHistory { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
A binary value attached to the meta field.
Declaration
public object Tag { get; set; }
Property Value
| Type |
Description |
| System.Object |
|
The ordering weight of this meta field in OwnerMetaClass.
Declaration
[Obsolete("Depends on faulty OwnerMetaClass implementation. Use GetFieldWeight or SetFieldWeight on the target meta class instead. Will remain at least until November 2016.")]
public int Weight { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
Methods
Declaration
[Obsolete("This method exists for backwards compatibility only. Will remain at least until November 2016.")]
protected void CheckOwnerMetaClass()
Clear meta classes in the cache.
Declaration
public static void ClearCache()
Create(MetaDataContext, String, String, String, String, MetaDataType, Int32, Boolean, Boolean, Boolean, Boolean)
Creates a new meta field with the specified properties.
Declaration
public static MetaField Create(MetaDataContext context, string metaNamespace, string name, string friendlyName, string description, MetaDataType dataType, int length, bool allowNulls, bool multiLanguageValue, bool allowSearch, bool isEncrypted)
Parameters
| Type |
Name |
Description |
| MetaDataContext |
context |
|
| System.String |
metaNamespace |
|
| System.String |
name |
|
| System.String |
friendlyName |
|
| System.String |
description |
|
| MetaDataType |
dataType |
|
| System.Int32 |
length |
|
| System.Boolean |
allowNulls |
|
| System.Boolean |
multiLanguageValue |
|
| System.Boolean |
allowSearch |
|
| System.Boolean |
isEncrypted |
|
Returns
| Type |
Description |
| MetaField |
The newly created meta field.
|
Create(MetaDataContext, String, String, String, String, MetaDataType, Int32, Boolean, Boolean, Boolean, Boolean, Boolean)
Creates a new meta field with the specified properties.
Declaration
[Obsolete("The save history feature did not function and has been removed. Use the Create call without the saveHistory parameter. Will remain at least until November 2016.")]
public static MetaField Create(MetaDataContext context, string metaNamespace, string name, string friendlyName, string description, MetaDataType dataType, int length, bool allowNulls, bool saveHistory, bool multiLanguageValue, bool allowSearch, bool isEncrypted)
Parameters
| Type |
Name |
Description |
| MetaDataContext |
context |
|
| System.String |
metaNamespace |
|
| System.String |
name |
|
| System.String |
friendlyName |
|
| System.String |
description |
|
| MetaDataType |
dataType |
|
| System.Int32 |
length |
|
| System.Boolean |
allowNulls |
|
| System.Boolean |
saveHistory |
|
| System.Boolean |
multiLanguageValue |
|
| System.Boolean |
allowSearch |
|
| System.Boolean |
isEncrypted |
|
Returns
| Type |
Description |
| MetaField |
The newly created meta field.
|
CreateVirtual(MetaDataContext, String, String, String, String, MetaDataType, Int32, Boolean, Boolean, Boolean, Boolean, Boolean)
Creates a mock-up of a meta field with the specified parameters, but does not save the field to any backing store.
Declaration
public static MetaField CreateVirtual(MetaDataContext context, string metaNamespace, string name, string friendlyName, string description, MetaDataType dataType, int length, bool allowNulls, bool saveHistory, bool multiLanguageValue, bool allowSearch, bool isEncrypted)
Parameters
| Type |
Name |
Description |
| MetaDataContext |
context |
|
| System.String |
metaNamespace |
|
| System.String |
name |
|
| System.String |
friendlyName |
|
| System.String |
description |
|
| MetaDataType |
dataType |
|
| System.Int32 |
length |
|
| System.Boolean |
allowNulls |
|
| System.Boolean |
saveHistory |
|
| System.Boolean |
multiLanguageValue |
|
| System.Boolean |
allowSearch |
|
| System.Boolean |
isEncrypted |
|
Returns
| Type |
Description |
| MetaField |
The mock meta field.
|
Delete(MetaDataContext, Int32)
Declaration
public static void Delete(MetaDataContext context, int metaFieldId)
Parameters
GetDataReader(MetaDataContext)
Declaration
[Obsolete("Use methods to load fully created fields, instead of handling the IDataReader directly. Will remain at least until November 2016.")]
public static IDataReader GetDataReader(MetaDataContext context)
Parameters
Returns
| Type |
Description |
| System.Data.IDataReader |
|
GetDataReader(MetaDataContext, MetaClass)
Declaration
[Obsolete("Use methods to load fully created fields, instead of handling the IDataReader directly. Will remain at least until November 2016.")]
public static IDataReader GetDataReader(MetaDataContext context, MetaClass metaClass)
Parameters
Returns
| Type |
Description |
| System.Data.IDataReader |
|
GetDataReader(MetaDataContext, Int32)
Declaration
[Obsolete("Use methods to load fully created fields, instead of handling the IDataReader directly. Will remain at least until November 2016.")]
public static IDataReader GetDataReader(MetaDataContext context, int metaClassId)
Parameters
Returns
| Type |
Description |
| System.Data.IDataReader |
|
GetList(MetaDataContext)
Declaration
public static MetaFieldCollection GetList(MetaDataContext context)
Parameters
Returns
GetList(MetaDataContext, Int32)
Declaration
public static MetaFieldCollection GetList(MetaDataContext context, int metaClassId)
Parameters
Returns
GetList(MetaDataContext, String, Boolean)
Declaration
public static MetaFieldCollection GetList(MetaDataContext context, string metaNamespace, bool deep)
Parameters
| Type |
Name |
Description |
| MetaDataContext |
context |
|
| System.String |
metaNamespace |
|
| System.Boolean |
deep |
|
Returns
GetList(MetaDataContext, String[])
Declaration
public static MetaFieldCollection GetList(MetaDataContext context, params string[] namespaceItems)
Parameters
| Type |
Name |
Description |
| MetaDataContext |
context |
|
| System.String[] |
namespaceItems |
|
Returns
GetUniqueName(MetaDataContext, String)
Declaration
public static string GetUniqueName(MetaDataContext context, string name)
Parameters
Returns
| Type |
Description |
| System.String |
|
Clear a specific meta class in the cache.
Declaration
public static void InvalidateCache(int metaFieldId)
Parameters
| Type |
Name |
Description |
| System.Int32 |
metaFieldId |
The meta field id.
|
Load(MetaDataContext, IDataReader)
Declaration
[Obsolete("This method exists for backwards compatibility only. Will remain at least until November 2016.")]
protected static MetaField Load(MetaDataContext context, IDataReader reader)
Parameters
| Type |
Name |
Description |
| MetaDataContext |
context |
|
| System.Data.IDataReader |
reader |
|
Returns
Load(MetaDataContext, Int32)
Declaration
public static MetaField Load(MetaDataContext context, int metaFieldId)
Parameters
Returns
Load(MetaDataContext, String)
Declaration
public static MetaField Load(MetaDataContext context, string name)
Parameters
Returns
Raises Meta field updated event.
Declaration
Validate Name using regular expresions
Declaration
public static bool RegularExpressionValidatorIsValidName(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The name.
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public void SetAllowNulls(bool value)
Parameters
| Type |
Name |
Description |
| System.Boolean |
value |
|
Declaration
public void SetAllowSearch(bool value)
Parameters
| Type |
Name |
Description |
| System.Boolean |
value |
|
Declaration
public bool UseStandardEditControl(IRequiredMetaFieldCollection requiredFieldCollection)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Extension Methods