C# Class NAnt.Core.PropertyDictionary

Inheritance: System.Collections.DictionaryBase
Show file Open project: skolima/NAnt Class Usage Examples

Public Methods

Method Description
Add ( string name, string value ) : void

Adds a property to the collection.

AddReadOnly ( string name, string value ) : void

Adds a property that cannot be changed.

Properties added with this method can never be changed. Note that they are removed if the DictionaryBase.Clear method is called.

Contains ( string name ) : bool

Determines whether a property already exists.

ExpandProperties ( string input, Location location ) : string

Expands a string from known properties.

Inherit ( PropertyDictionary source, StringCollection excludes ) : void

Inherits properties from an existing property dictionary Instance.

IsDynamicProperty ( string name ) : bool

Determines whether the specified property is listed as dynamic.

IsReadOnlyProperty ( string name ) : bool

Determines whether the specified property is listed as read-only.

MarkDynamic ( string name ) : void

Marks a property as a property of which the value is expanded at execution time.

PropertyDictionary ( Project project ) : System

Initializes a new instance of the PropertyDictionary class holding properties for the given Project instance.

Remove ( string name ) : void

Removes the property with the specified name.

this ( string name ) : string

Indexer property.

Protected Methods

Method Description
OnClear ( ) : void
OnInsert ( object key, object value ) : void

Performs additional custom processes before inserting a new element into the DictionaryBase instance.

OnRemove ( object key, object value ) : void

Performs additional custom processes before removing an element from the DictionaryBase instance.

OnSet ( object key, object oldValue, object newValue ) : void
OnValidate ( object key, object value ) : void

Performs additional custom processes when validating the element with the specified key and value.

Private Methods

Method Description
CheckDeprecation ( string name ) : void

Checks whether the specified property is deprecated.

CreateCircularException ( string end, Stack stack ) : BuildException

Builds an appropriate exception detailing a specified circular reference.

EvaluateEmbeddedExpressions ( string input, Location location, Hashtable state, Stack visiting ) : string

Evaluates the given expression string and returns the result

ExpandProperties ( string input, Location location, Hashtable state, Stack visiting ) : string

Expands a string from known properties.

GetPropertyValue ( string propertyName ) : string
ValidatePropertyName ( string propertyName, Location location ) : void
ValidatePropertyValue ( object value, Location location ) : void

Method Details

Add() public method

Adds a property to the collection.
public Add ( string name, string value ) : void
name string The name of the property.
value string The value to assign to the property.
return void

AddReadOnly() public method

Adds a property that cannot be changed.
Properties added with this method can never be changed. Note that they are removed if the DictionaryBase.Clear method is called.
public AddReadOnly ( string name, string value ) : void
name string The name of the property.
value string The value to assign to the property.
return void

Contains() public method

Determines whether a property already exists.
public Contains ( string name ) : bool
name string The name of the property to check.
return bool

ExpandProperties() public method

Expands a string from known properties.
public ExpandProperties ( string input, Location location ) : string
input string The replacement tokens.
location Location The to pass through for any exceptions.
return string

Inherit() public method

Inherits properties from an existing property dictionary Instance.
public Inherit ( PropertyDictionary source, StringCollection excludes ) : void
source PropertyDictionary Property list to inherit.
excludes System.Collections.Specialized.StringCollection The list of properties to exclude during inheritance.
return void

IsDynamicProperty() public method

Determines whether the specified property is listed as dynamic.
public IsDynamicProperty ( string name ) : bool
name string The name of the property to check.
return bool

IsReadOnlyProperty() public method

Determines whether the specified property is listed as read-only.
public IsReadOnlyProperty ( string name ) : bool
name string The name of the property to check.
return bool

MarkDynamic() public method

Marks a property as a property of which the value is expanded at execution time.
public MarkDynamic ( string name ) : void
name string The name of the property to mark as dynamic.
return void

OnClear() protected method

protected OnClear ( ) : void
return void

OnInsert() protected method

Performs additional custom processes before inserting a new element into the DictionaryBase instance.
protected OnInsert ( object key, object value ) : void
key object The key of the element to insert.
value object The value of the element to insert.
return void

OnRemove() protected method

Performs additional custom processes before removing an element from the DictionaryBase instance.
protected OnRemove ( object key, object value ) : void
key object The key of the element to remove.
value object The value of the element to remove.
return void

OnSet() protected method

protected OnSet ( object key, object oldValue, object newValue ) : void
key object
oldValue object
newValue object
return void

OnValidate() protected method

Performs additional custom processes when validating the element with the specified key and value.
protected OnValidate ( object key, object value ) : void
key object The key of the element to validate.
value object The value of the element to validate.
return void

PropertyDictionary() public method

Initializes a new instance of the PropertyDictionary class holding properties for the given Project instance.
public PropertyDictionary ( Project project ) : System
project Project The project for which the dictionary will hold properties.
return System

Remove() public method

Removes the property with the specified name.
public Remove ( string name ) : void
name string The name of the property to remove.
return void

this() public method

Indexer property.
public this ( string name ) : string
name string
return string