C# Class Sage.Integration.Northwind.Application.Base.Document

显示文件 Open project: Sage/SData-Contracts Class Usage Examples

Public Methods

Method Description
AddDefaultResourceElements ( XmlElement root ) : void
ClearTransactionStatus ( ) : void
GetOperationNotImplementedTransactionResult ( ) : TransactionResult
GetSchemaElement ( ) : XmlSchemaElement
GetSuccessTransactionResult ( ) : TransactionResult
GetTransactionResult ( ) : TransactionResult
GetTransactionResult ( List &result ) : void
GetTypePropertyValue ( ) : string

get the type on an documemt. If the document has no type propery or the property is null, it returns an emty string

GetXmlNode ( XmlDocument document ) : XmlNode

Returns the document as xml node

Merge ( Document sourceDocument ) : void

merge a document into the current.

ReadFromXmlNode ( XmlNode node ) : void

Read the Document from a given xml node

SetTransactionStatus ( TransactionStatus status ) : TransactionResult
SetTransactionStatus ( TransactionStatus status, string message ) : TransactionResult

Protected Methods

Method Description
AddCollection ( DocumentCollection collection ) : bool

add a new collection to the document. If the collection already exists, it returns false

AddProperty ( string propertyName, TypeCode type ) : bool

add a new property to the document. If the property already exists, it returns false

AddProperty ( string propertyName, TypeCode type, int maxLength ) : bool

add a new property to the document. If the property already exists, it returns false

Document ( string documentName ) : System

Private Methods

Method Description
CreateAttribute ( XmlDocument document, XmlElement element, string name, string value ) : void
CreateElement ( XmlDocument document, XmlNode parentElement, DocumentCollection collection ) : void
CreateElement ( XmlDocument document, XmlNode parentElement, Property property ) : void
LogstateToTransactionAction ( LogState logState ) : TransactionAction
ReadElement ( XmlNode parentNode, DocumentCollection collection ) : void
ReadElement ( XmlNode parentNode, Property property ) : void

Method Details

AddCollection() protected method

add a new collection to the document. If the collection already exists, it returns false
protected AddCollection ( DocumentCollection collection ) : bool
collection DocumentCollection the collection to add
return bool

AddDefaultResourceElements() public method

public AddDefaultResourceElements ( XmlElement root ) : void
root System.Xml.XmlElement
return void

AddProperty() protected method

add a new property to the document. If the property already exists, it returns false
protected AddProperty ( string propertyName, TypeCode type ) : bool
propertyName string the Name of the Property
type TypeCode the typecode of the property value
return bool

AddProperty() protected method

add a new property to the document. If the property already exists, it returns false
protected AddProperty ( string propertyName, TypeCode type, int maxLength ) : bool
propertyName string the Name of the Property
type TypeCode the typecode of the property value
maxLength int the max lentgh of the property value
return bool

ClearTransactionStatus() public method

public ClearTransactionStatus ( ) : void
return void

Document() protected method

protected Document ( string documentName ) : System
documentName string the name of the Document
return System

GetOperationNotImplementedTransactionResult() public method

public GetOperationNotImplementedTransactionResult ( ) : TransactionResult
return Sage.Integration.Northwind.Application.API.TransactionResult

GetSchemaElement() public method

public GetSchemaElement ( ) : XmlSchemaElement
return System.Xml.Schema.XmlSchemaElement

GetSuccessTransactionResult() public method

public GetSuccessTransactionResult ( ) : TransactionResult
return Sage.Integration.Northwind.Application.API.TransactionResult

GetTransactionResult() public method

public GetTransactionResult ( ) : TransactionResult
return Sage.Integration.Northwind.Application.API.TransactionResult

GetTransactionResult() public method

public GetTransactionResult ( List &result ) : void
result List
return void

GetTypePropertyValue() public method

get the type on an documemt. If the document has no type propery or the property is null, it returns an emty string
public GetTypePropertyValue ( ) : string
return string

GetXmlNode() public method

Returns the document as xml node
public GetXmlNode ( XmlDocument document ) : XmlNode
document System.Xml.XmlDocument The paren xmlDocument to work on
return System.Xml.XmlNode

Merge() public method

merge a document into the current.
public Merge ( Document sourceDocument ) : void
sourceDocument Document the source Document
return void

ReadFromXmlNode() public method

Read the Document from a given xml node
public ReadFromXmlNode ( XmlNode node ) : void
node System.Xml.XmlNode The xml node named as the document
return void

SetTransactionStatus() public method

public SetTransactionStatus ( TransactionStatus status ) : TransactionResult
status TransactionStatus
return Sage.Integration.Northwind.Application.API.TransactionResult

SetTransactionStatus() public method

public SetTransactionStatus ( TransactionStatus status, string message ) : TransactionResult
status TransactionStatus
message string
return Sage.Integration.Northwind.Application.API.TransactionResult