C# Class NStub.CSharp.ObjectGeneration.BuildDataDictionary

Lookup of IBuilderData organized as a dictionary of strings, categorized into main categories.
Inheritance: IBuildDataDictionary
Mostra file Open project: Jedzia/NStub Class Usage Examples

Public Methods

Method Description
AddDataItem ( string key, IBuilderData item ) : void

Adds the specified data item to the "General" topic of this list.

AddDataItem ( string key, IBuilderData item, bool replace ) : void

Adds the specified data item to the "General" topic of this list.

AddDataItem ( string category, string key, IBuilderData item ) : void

Adds the specified data item to the specified category of this list.

AddDataItem ( string category, string key, IBuilderData item, bool replace ) : void

Adds the specified data item to the specified category of this list.

If the item is already present, then the add operation throws an exception.

AddDataItem ( string category, string key, IBuilderData item, bool replace, bool skip ) : void

Adds the specified data item to the specified category of this list.

If replace is true, skip is true and the item is already present, then the add operation is skipped. if skip is false an exception is thrown.

AddGeneralString ( string key, string value ) : void

Adds a NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value to the general category data set associated with the specified key.

Already present items are skipped (not replaced) and no exception is thrown.

AddGeneralString ( string category, string key, string value ) : void

Adds a NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value to the specified category data set associated with the specified key.

Already present items are skipped (not replaced) and no exception is thrown.

BuildDataDictionary ( ) : System

Initializes a new instance of the BuildDataDictionary class.

Data ( ) : IBuildDataReadOnlyDictionary

Gets the data of this instance.

GeneralString ( string key ) : string

Gets the NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value out of the general data set associated with the specified key.

GeneralString ( string category, string key ) : string

Gets the NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value out of the general data set associated with the specified key.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through the collection.

Save ( ) : void

Resets the dirty flag ( Save this instance not implemented ).

TryGetCategory ( string category, IBuilderData>.IDictionary &value ) : bool

Gets the value out of the specified category, associated with the specified key.

TryGetValue ( string key, IBuilderData &value ) : bool

Gets the value out of the general data set associated with the specified key.

TryGetValue ( string category, string key, IBuilderData &value ) : bool

Gets the value associated with the specified category and key.

this ( string category ) : IBuilderData>.IDictionary

Gets the IBuilderData lookup of the specified category.

Private Methods

Method Description
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

Method Details

AddDataItem() public method

Adds the specified data item to the "General" topic of this list.
public AddDataItem ( string key, IBuilderData item ) : void
key string The key of the item.
item IBuilderData The data item to add.
return void

AddDataItem() public method

Adds the specified data item to the "General" topic of this list.
public AddDataItem ( string key, IBuilderData item, bool replace ) : void
key string The key of the item.
item IBuilderData The data item to add.
replace bool if set to true replaces the data if present.
return void

AddDataItem() public method

Adds the specified data item to the specified category of this list.
public AddDataItem ( string category, string key, IBuilderData item ) : void
category string The category of the item.
key string The key of the item.
item IBuilderData The data item to add.
return void

AddDataItem() public method

Adds the specified data item to the specified category of this list.
If the item is already present, then the add operation throws an exception.
public AddDataItem ( string category, string key, IBuilderData item, bool replace ) : void
category string The category of the item.
key string The key of the item.
item IBuilderData The data item to add.
replace bool if set to true replaces the data if present.
return void

AddDataItem() public method

Adds the specified data item to the specified category of this list.
If replace is true, skip is true and the item is already present, then the add operation is skipped. if skip is false an exception is thrown.
public AddDataItem ( string category, string key, IBuilderData item, bool replace, bool skip ) : void
category string The category of the item.
key string The key of the item.
item IBuilderData The data item to add.
replace bool if set to true replaces the data if present.
skip bool if set to true skip already present items.
return void

AddGeneralString() public method

Adds a NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value to the general category data set associated with the specified key.
Already present items are skipped (not replaced) and no exception is thrown.
public AddGeneralString ( string key, string value ) : void
key string The key of the item.
value string The string value of the item.
return void

AddGeneralString() public method

Adds a NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value to the specified category data set associated with the specified key.
Already present items are skipped (not replaced) and no exception is thrown.
public AddGeneralString ( string category, string key, string value ) : void
category string The category of the item.
key string The key of the item.
value string The string value of the item.
return void

BuildDataDictionary() public method

Initializes a new instance of the BuildDataDictionary class.
public BuildDataDictionary ( ) : System
return System

Data() public method

Gets the data of this instance.
public Data ( ) : IBuildDataReadOnlyDictionary
return IBuildDataReadOnlyDictionary

GeneralString() public method

Gets the NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value out of the general data set associated with the specified key.
public GeneralString ( string key ) : string
key string The key of the value to get.
return string

GeneralString() public method

Gets the NStub.CSharp.ObjectGeneration.Builders.StringConstantBuildParameter.Value out of the general data set associated with the specified key.
public GeneralString ( string category, string key ) : string
category string The category of the value to get.
key string The key of the value to get.
return string

GetEnumerator() public method

Returns an enumerator that iterates through the collection.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

Save() public method

Resets the dirty flag ( Save this instance not implemented ).
public Save ( ) : void
return void

TryGetCategory() public method

Gets the value out of the specified category, associated with the specified key.
key is null.
public TryGetCategory ( string category, IBuilderData>.IDictionary &value ) : bool
category string The category of the value to get.
value IBuilderData>.IDictionary When this method returns, contains the value associated with the specified /// key, if the key is found; otherwise, the default value for the type of the /// value parameter. This parameter is passed uninitialized.
return bool

TryGetValue() public method

Gets the value out of the general data set associated with the specified key.
key is null.
public TryGetValue ( string key, IBuilderData &value ) : bool
key string The key of the value to get.
value IBuilderData When this method returns, contains the value associated with the specified /// key, if the key is found; otherwise, the default value for the type of the /// value parameter. This parameter is passed uninitialized.
return bool

TryGetValue() public method

Gets the value associated with the specified category and key.
key is null.
public TryGetValue ( string category, string key, IBuilderData &value ) : bool
category string The requested category.
key string The key of the value to get.
value IBuilderData When this method returns, contains the value associated with the specified /// key, if the key is found; otherwise, the default value for the type of the /// value parameter. This parameter is passed uninitialized.
return bool

this() public method

Gets the IBuilderData lookup of the specified category.
public this ( string category ) : IBuilderData>.IDictionary
category string The category of the requested data items.
return IBuilderData>.IDictionary