C# 클래스 NStub.CSharp.ObjectGeneration.Builders.BuilderSerializer

Helper class to serialize BuildParametersBase{T} data classes of the IMemberBuilder family.
상속: IBuilderSerializer
파일 보기 프로젝트 열기: Jedzia/NStub

공개 메소드들

메소드 설명
DeserializeAllSetupData ( string xml, IBuildDataDictionary properties, IEnumerable handlers ) : IEnumerable

Set the parameters in the properties storage from a specified xml representation of the data.

DetermineIMemberBuilderFromXmlFragment ( string xml, IEnumerable handlers ) : IBuildHandler

Determines the matching member builder by the first childs name from a XML fragment.

GetMultiParameter ( System.Guid key, Type builderType, Type paraType, IBuildDataDictionary properties ) : IMultiBuildParameters

Get the parameters for the specified builder type, possibly creating it, if there is not yet one in the build data collection.

GetMultiParameters ( Type builderType, Type paraType, IBuildDataDictionary properties ) : IBuilderData>.IReadOnlyDictionary

Get the parameters for the specified builder type, possibly creating it, if there is not yet one in the build data collection.

GetParameters ( Type builderType, Type paraType, IBuildDataDictionary properties ) : IMemberBuildParameters

Get the parameters for the specified builder type, possibly creating it, if there is not yet one in the build data collection.

GetSampleSetupData ( Type builderType, Type paraType ) : string

Gets the sample setup xml data for a specified IMemberBuilder.

SerializeAllHandlers ( IBuildDataDictionary properties, IEnumerable handlers ) : string

Gets the xml data representation of all registered IBuildHandlers.

SerializeParametersForBuilderType ( Type builderType, IMemberBuildParameters parameters ) : string

Gets the xml data representation of a single registered IMemberBuilders parameters.

SetParameters ( string xml, IBuildDataDictionary properties, IBuildHandler handler ) : IMemberBuildParameters

Set the parameters in the properties storage from a specified xml representation of the data.

비공개 메소드들

메소드 설명
PrettyPrintXml ( string xml ) : string

Pretty print XML data.

SerializeParameterToXmlDocument ( XmlDocument xmlDoc, XmlElement root, IMemberBuildParameters setupPara, string builderFullName ) : void
SerializeParametersForBuilderType ( Type builderType, string parameterTypeShortName, string parameterTypeXmlData ) : string

Gets the xml data representation of a single registered IMemberBuilders parameters.

SetSingleNode ( IBuildDataDictionary properties, IBuildHandler handler, XmlNode firstChild ) : IMemberBuildParameters

메소드 상세

DeserializeAllSetupData() 공개 메소드

Set the parameters in the properties storage from a specified xml representation of the data.
InvalidCastException Problem building from serialization data.
public DeserializeAllSetupData ( string xml, IBuildDataDictionary properties, IEnumerable handlers ) : IEnumerable
xml string The xml representation of the data.
properties IBuildDataDictionary The global properties storage.
handlers IEnumerable The list of existing handlers to investigate.
리턴 IEnumerable

DetermineIMemberBuilderFromXmlFragment() 공개 메소드

Determines the matching member builder by the first childs name from a XML fragment.
public DetermineIMemberBuilderFromXmlFragment ( string xml, IEnumerable handlers ) : IBuildHandler
xml string The xml fragment.
handlers IEnumerable The list of existing handlers to investigate.
리턴 IBuildHandler

GetMultiParameter() 공개 메소드

Get the parameters for the specified builder type, possibly creating it, if there is not yet one in the build data collection.
The given was not present in the lookup.
public GetMultiParameter ( System.Guid key, Type builderType, Type paraType, IBuildDataDictionary properties ) : IMultiBuildParameters
key System.Guid The unique identifier of the parameter data set.
builderType System.Type Type of the builder to request a set of sample data for.
paraType System.Type Type of the parameter class.
properties IBuildDataDictionary The global properties storage.
리턴 IMultiBuildParameters

GetMultiParameters() 공개 메소드

Get the parameters for the specified builder type, possibly creating it, if there is not yet one in the build data collection.
The given was not present in the lookup.
public GetMultiParameters ( Type builderType, Type paraType, IBuildDataDictionary properties ) : IBuilderData>.IReadOnlyDictionary
builderType System.Type Type of the builder to request a set of sample data for.
paraType System.Type Type of the parameter class.
properties IBuildDataDictionary The global properties storage.
리턴 IBuilderData>.IReadOnlyDictionary

GetParameters() 공개 메소드

Get the parameters for the specified builder type, possibly creating it, if there is not yet one in the build data collection.
The given was not present in the lookup.
public GetParameters ( Type builderType, Type paraType, IBuildDataDictionary properties ) : IMemberBuildParameters
builderType System.Type Type of the builder to request a set of sample data for.
paraType System.Type Type of the parameter class.
properties IBuildDataDictionary The global properties storage.
리턴 IMemberBuildParameters

GetSampleSetupData() 공개 메소드

Gets the sample setup xml data for a specified IMemberBuilder.
public GetSampleSetupData ( Type builderType, Type paraType ) : string
builderType System.Type Type of the builder to request a set of sample data for.
paraType System.Type Type of the parameter class.
리턴 string

SerializeAllHandlers() 공개 메소드

Gets the xml data representation of all registered IBuildHandlers.
public SerializeAllHandlers ( IBuildDataDictionary properties, IEnumerable handlers ) : string
properties IBuildDataDictionary The properties storage which stores the data to serialize.
handlers IEnumerable The handlers with the links to the types.
리턴 string

SerializeParametersForBuilderType() 공개 메소드

Gets the xml data representation of a single registered IMemberBuilders parameters.
public SerializeParametersForBuilderType ( Type builderType, IMemberBuildParameters parameters ) : string
builderType System.Type Type of the builder to request data for.
parameters IMemberBuildParameters The parameters with the data to serialize.
리턴 string

SetParameters() 공개 메소드

Set the parameters in the properties storage from a specified xml representation of the data.
InvalidCastException Problem building from serialization data.
public SetParameters ( string xml, IBuildDataDictionary properties, IBuildHandler handler ) : IMemberBuildParameters
xml string The xml representation of the data.
properties IBuildDataDictionary The global properties storage.
handler IBuildHandler The handler that holds the builder- to parameter-type relation.
리턴 IMemberBuildParameters