C# Класс SenseNet.ContentRepository.Field

Field represent an atomic data of a Content
A Field represents an atomic data type from the perspective of the system. It usually handles Fields usually handles a single ContentHandler property. It is also capable of handling of multiple ContentHandler properties (see the WhoAndWhen Field for an example). It may also consist of values computed from the handled ContentHandler propery(s) or even represent data independent of these properties. In the communication bus this atomic data type is resembled as a transfer object: ContentHandler<--properties--> Field <--transfer object--> FieldControl (Content, ContenView) The Field constructs a transfer object from ContentHandler properties and passes it up to the FieldControl. At the same time this tranfer object is disassembled to ContentHandler properties when passing its data down to the ContentHandler. The Field class is responsible for invoking data validation (data validation itself is done by the FieldSetting property). The class Field can be resembled as bridge between ContentHandlerproperties and ContentView (or any other ways of data output/input). The Field class is also one of the most important system extension points (among with ContentHandler). By defining a new Field class a system-wide usable atomic data type is defined. This kind of extension is usually done when having a need of a more complex or different type than ones already defined in the system.
Наследование: IIndexableField
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Create Field
DoValidate bool
Export void
Export2 void
GetExportName string
GetInnerXml string
Import void
Import void
ParseImportName string
Save void
SetDefaultValue void
Validate bool

Открытые методы

Метод Описание
GetData ( ) : object

Returns object data which is a transfer object.

GetIndexFieldInfos ( string &textExtract ) : IEnumerable
GetValidationMessage ( ) : string
HasValue ( ) : bool
Parse ( string value ) : bool
SetData ( object value ) : void

Sets object data which is a transfer object.

WriteXml ( XmlWriter writer ) : void

Защищенные методы

Метод Описание
ConvertFrom ( object value ) : object[]

Creates ContentHandler properties from the transfer object.

ConvertTo ( object handlerValues ) : object

Creates a transfer object from ContentHandler properties

ExportData ( XmlWriter writer, ExportContext context ) : void
ExportData2 ( XmlWriter writer, ExportContext context ) : void
ExportNotImplementedException ( ) : Exception
ExportNotImplementedException ( object notImplementedValue ) : Exception
Field ( ) : System
GetHandlerSlot ( int slotIndex ) : Type

Gets the type of the slot.

A slot type may represent numeros CLR types in compile time. In runtime, however a single type from the previously defined enumeration is assigned to this slot. This function returns this type in runtime.

GetXmlData ( ) : string
ImportData ( XmlNode fieldNode ) : void

For Powershell provider

ImportData ( XmlNode fieldNode, ImportContext context ) : void

For old-way-import

InvalidImportDataException ( string message ) : Exception
InvalidImportDataException ( string message, Exception innerException ) : Exception
OnSaveCompleted ( ) : void
ParseValue ( string value ) : bool
ReadProperties ( ) : object
ReadProperty ( string propertyName ) : object
WriteProperties ( object value ) : void
WriteProperty ( string propertyName, object value ) : void
WriteXmlData ( XmlWriter writer ) : void

Приватные методы

Метод Описание
Create ( Content content, FieldSetting fieldSetting ) : Field
DoValidate ( ) : bool
Export ( XmlWriter writer, ExportContext context ) : void
Export2 ( XmlWriter writer, ExportContext context ) : void
GetExportName ( string fieldName, FieldSubType &subType ) : string
GetInnerXml ( ) : string
Import ( XmlNode fieldNode ) : void

For Powershell provider

Import ( XmlNode fieldNode, ImportContext context ) : void

For old-way-import

ParseImportName ( string importName, FieldSubType subType ) : string
Save ( bool validOnly ) : void
SetDefaultValue ( ) : void
Validate ( ) : bool

Описание методов

ConvertFrom() защищенный Метод

Creates ContentHandler properties from the transfer object.
protected ConvertFrom ( object value ) : object[]
value object
Результат object[]

ConvertTo() защищенный Метод

Creates a transfer object from ContentHandler properties
protected ConvertTo ( object handlerValues ) : object
handlerValues object
Результат object

ExportData() защищенный Метод

protected ExportData ( XmlWriter writer, ExportContext context ) : void
writer System.Xml.XmlWriter
context ExportContext
Результат void

ExportData2() защищенный Метод

protected ExportData2 ( XmlWriter writer, ExportContext context ) : void
writer System.Xml.XmlWriter
context ExportContext
Результат void

ExportNotImplementedException() защищенный Метод

protected ExportNotImplementedException ( ) : Exception
Результат System.Exception

ExportNotImplementedException() защищенный Метод

protected ExportNotImplementedException ( object notImplementedValue ) : Exception
notImplementedValue object
Результат System.Exception

Field() защищенный Метод

protected Field ( ) : System
Результат System

GetData() публичный Метод

Returns object data which is a transfer object.
public GetData ( ) : object
Результат object

GetHandlerSlot() защищенный Метод

Gets the type of the slot.
A slot type may represent numeros CLR types in compile time. In runtime, however a single type from the previously defined enumeration is assigned to this slot. This function returns this type in runtime.
protected GetHandlerSlot ( int slotIndex ) : Type
slotIndex int Index of the slot of which the type is needed
Результат System.Type

GetIndexFieldInfos() публичный Метод

public GetIndexFieldInfos ( string &textExtract ) : IEnumerable
textExtract string
Результат IEnumerable

GetValidationMessage() публичный Метод

public GetValidationMessage ( ) : string
Результат string

GetXmlData() защищенный Метод

protected GetXmlData ( ) : string
Результат string

HasValue() публичный Метод

public HasValue ( ) : bool
Результат bool

ImportData() защищенный Метод

For Powershell provider
protected ImportData ( XmlNode fieldNode ) : void
fieldNode System.Xml.XmlNode
Результат void

ImportData() защищенный абстрактный Метод

For old-way-import
protected abstract ImportData ( XmlNode fieldNode, ImportContext context ) : void
fieldNode System.Xml.XmlNode
context ImportContext
Результат void

InvalidImportDataException() защищенный Метод

protected InvalidImportDataException ( string message ) : Exception
message string
Результат System.Exception

InvalidImportDataException() защищенный Метод

protected InvalidImportDataException ( string message, Exception innerException ) : Exception
message string
innerException System.Exception
Результат System.Exception

OnSaveCompleted() защищенный Метод

protected OnSaveCompleted ( ) : void
Результат void

Parse() публичный Метод

public Parse ( string value ) : bool
value string
Результат bool

ParseValue() защищенный Метод

protected ParseValue ( string value ) : bool
value string
Результат bool

ReadProperties() защищенный Метод

protected ReadProperties ( ) : object
Результат object

ReadProperty() защищенный Метод

protected ReadProperty ( string propertyName ) : object
propertyName string
Результат object

SetData() публичный Метод

Sets object data which is a transfer object.
public SetData ( object value ) : void
value object
Результат void

WriteProperties() защищенный Метод

protected WriteProperties ( object value ) : void
value object
Результат void

WriteProperty() защищенный Метод

protected WriteProperty ( string propertyName, object value ) : void
propertyName string
value object
Результат void

WriteXml() публичный Метод

public WriteXml ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
Результат void

WriteXmlData() защищенный Метод

protected WriteXmlData ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
Результат void