Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Dynamo< T > Class Template Reference

Dynamic object implementation (used when inheriting) More...

Inheritance diagram for Utilities.DataTypes.Dynamo< T >:

Public Member Functions

 Dynamo ()
 Constructor More...
 
 Dynamo (object item)
 Constructor More...
 
 Dynamo (IDictionary< string, object > dictionary)
 Constructor More...
 
void Add (string key, object value)
 Adds a key/value pair to the object More...
 
void Add (KeyValuePair< string, object > item)
 Adds a key/value pair More...
 
void Clear ()
 Clears the key/value pairs More...
 
bool Contains (KeyValuePair< string, object > item)
 Does the object contain the key/value pair More...
 
bool ContainsKey (string key)
 Determines if the object contains a key More...
 
void Copy (object Item)
 Copies the properties from an item More...
 
void CopyTo (KeyValuePair< string, object >[] array, int arrayIndex)
 Copies the key/value pairs to an array More...
 
void CopyTo (object result)
 Copies data from here to another object More...
 
override bool Equals (object obj)
 Determines if two objects are equal More...
 
override IEnumerable< string > GetDynamicMemberNames ()
 Gets the dynamic member names More...
 
IEnumerator< KeyValuePair< string, object > > GetEnumerator ()
 Gets the enumerator for the object More...
 
override int GetHashCode ()
 Gets the hash code More...
 
virtual void GetObjectData (SerializationInfo info, StreamingContext context)
 Gets the object data and serializes it More...
 
System.Xml.Schema.XmlSchema GetSchema ()
 Not used More...
 
virtual void ReadXml (System.Xml.XmlReader reader)
 Reads the data from an XML doc More...
 
bool Remove (string key)
 Removes the value associated with the key More...
 
bool Remove (KeyValuePair< string, object > item)
 Removes a key/value pair More...
 
dynamic SubSet (params string[] Keys)
 Returns a subset of the current Dynamo object More...
 
To< T > ()
 Converts the object to the type specified More...
 
object To (Type ObjectType)
 Converts the object to the type specified More...
 
override string ToString ()
 Outputs the object graph More...
 
override bool TryConvert (ConvertBinder binder, out object result)
 Attempts to convert the object More...
 
override bool TryGetMember (GetMemberBinder binder, out object result)
 Attempts to get a member More...
 
bool TryGetValue (string key, out object value)
 Attempts to get a value More...
 
override bool TryInvoke (InvokeBinder binder, object[] args, out object result)
 Attempts to invoke a function More...
 
override bool TryInvokeMember (InvokeMemberBinder binder, object[] args, out object result)
 Attempts to invoke a member More...
 
override bool TrySetMember (SetMemberBinder binder, object value)
 Attempts to set the member More...
 
virtual void WriteXml (System.Xml.XmlWriter writer)
 Writes the data to an XML doc More...
 

Protected Member Functions

 Dynamo ()
 Constructor More...
 
 Dynamo (object item)
 Constructor More...
 
 Dynamo (IDictionary< string, object > dictionary)
 Constructor More...
 
 Dynamo (SerializationInfo info, StreamingContext context)
 Constructor More...
 
override object GetValue (string Name, Type ReturnType)
 Gets a value More...
 
override void SetValue (string key, object value)
 Sets a value More...
 
 Dynamo (SerializationInfo info, StreamingContext context)
 Constructor More...
 
virtual object GetValue (string Name, Type ReturnType)
 Gets a value More...
 
object RaiseGetValueEnd (string PropertyName, object Value)
 Raises the get value end event More...
 
object RaiseGetValueStart (string PropertyName)
 Raises the get value start event More...
 
void RaisePropertyChanged (string PropertyName, object NewValue)
 Raises the property changed event More...
 
virtual void SetValue (string key, object value)
 Sets a value More...
 

Properties

override ICollection< string > Keys [get]
 Keys to the dynamic type More...
 
override ICollection< object > Values [get]
 Gets the Values More...
 
ConcurrentDictionary< string, ChangeChangeLog [get]
 Change log More...
 
int Count [get]
 Number of items More...
 
bool IsReadOnly [get]
 Is this read only? More...
 
virtual ICollection< string > Keys [get]
 Keys More...
 
virtual ICollection< object > Values [get]
 Values More...
 
object this[string key] [get, set]
 Gets the value associated with the key specified More...
 
Action< Dynamo, string, EventArgs.OnEndEventArgsGetValueEnd
 Called when the value/property is found but before it is returned to the caller Sends (this, PropertyName, EventArgs) to items attached to the event More...
 
Action< Dynamo, EventArgs.OnStartEventArgsGetValueStart
 Called when beginning to get a value/property Sends (this, EventArgs) to items attached to the event More...
 
PropertyChangedEventHandler PropertyChanged
 Property changed event More...
 

Detailed Description

Dynamic object implementation (used when inheriting)

Dynamic object implementation

Template Parameters
TChild object type
Type Constraints
T :Dynamo<T> 

Definition at line 71 of file Dynamo.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.Dynamo< T >.Dynamo ( )
protected

Constructor

Definition at line 77 of file Dynamo.cs.

Utilities.DataTypes.Dynamo< T >.Dynamo ( object  item)
protected

Constructor

Parameters
itemItem to copy values from

Definition at line 86 of file Dynamo.cs.

Utilities.DataTypes.Dynamo< T >.Dynamo ( IDictionary< string, object >  dictionary)
protected

Constructor

Parameters
dictionaryDictionary to copy

Definition at line 95 of file Dynamo.cs.

Utilities.DataTypes.Dynamo< T >.Dynamo ( SerializationInfo  info,
StreamingContext  context 
)
protected

Constructor

Parameters
infoSerialization info
contextStreaming context

Definition at line 105 of file Dynamo.cs.

Constructor

Definition at line 198 of file Dynamo.cs.

Utilities.DataTypes.Dynamo< T >.Dynamo ( object  item)

Constructor

Parameters
itemItem to copy values from

Definition at line 207 of file Dynamo.cs.

Utilities.DataTypes.Dynamo< T >.Dynamo ( IDictionary< string, object >  dictionary)

Constructor

Parameters
dictionaryDictionary to copy

Definition at line 231 of file Dynamo.cs.

Utilities.DataTypes.Dynamo< T >.Dynamo ( SerializationInfo  info,
StreamingContext  context 
)
protected

Constructor

Parameters
infoSerialization info
contextStreaming context

Definition at line 243 of file Dynamo.cs.

Member Function Documentation

void Utilities.DataTypes.Dynamo< T >.Add ( string  key,
object  value 
)

Adds a key/value pair to the object

Parameters
keykey
valuevalue

Definition at line 389 of file Dynamo.cs.

void Utilities.DataTypes.Dynamo< T >.Add ( KeyValuePair< string, object >  item)

Adds a key/value pair

Parameters
itemItem to add

Definition at line 398 of file Dynamo.cs.

void Utilities.DataTypes.Dynamo< T >.Clear ( )

Clears the key/value pairs

Definition at line 406 of file Dynamo.cs.

bool Utilities.DataTypes.Dynamo< T >.Contains ( KeyValuePair< string, object >  item)

Does the object contain the key/value pair

Parameters
itemItem to check
Returns
True if it is found, false otherwise

Definition at line 417 of file Dynamo.cs.

bool Utilities.DataTypes.Dynamo< T >.ContainsKey ( string  key)

Determines if the object contains a key

Parameters
keyKey to check
Returns
True if it is found, false otherwise

Definition at line 427 of file Dynamo.cs.

void Utilities.DataTypes.Dynamo< T >.Copy ( object  Item)

Copies the properties from an item

Parameters
ItemItem to copy from

Definition at line 436 of file Dynamo.cs.

void Utilities.DataTypes.Dynamo< T >.CopyTo ( KeyValuePair< string, object >[]  array,
int  arrayIndex 
)

Copies the key/value pairs to an array

Parameters
arrayArray to copy to
arrayIndexArray index

Definition at line 463 of file Dynamo.cs.

void Utilities.DataTypes.Dynamo< T >.CopyTo ( object  result)

Copies data from here to another object

Parameters
resultResult

Definition at line 472 of file Dynamo.cs.

override bool Utilities.DataTypes.Dynamo< T >.Equals ( object  obj)

Determines if two objects are equal

Parameters
objObject to compare to
Returns
True if they're equal, false otherwise

Definition at line 485 of file Dynamo.cs.

override IEnumerable<string> Utilities.DataTypes.Dynamo< T >.GetDynamicMemberNames ( )

Gets the dynamic member names

Returns
The keys used internally

Definition at line 497 of file Dynamo.cs.

IEnumerator<KeyValuePair<string, object> > Utilities.DataTypes.Dynamo< T >.GetEnumerator ( )

Gets the enumerator for the object

Returns
The enumerator

Definition at line 506 of file Dynamo.cs.

override int Utilities.DataTypes.Dynamo< T >.GetHashCode ( )

Gets the hash code

Returns
The hash code

Definition at line 518 of file Dynamo.cs.

virtual void Utilities.DataTypes.Dynamo< T >.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
virtual

Gets the object data and serializes it

Parameters
infoSerialization info object
contextStreaming context object

Definition at line 541 of file Dynamo.cs.

System.Xml.Schema.XmlSchema Utilities.DataTypes.Dynamo< T >.GetSchema ( )

Not used

Returns
Null

Definition at line 553 of file Dynamo.cs.

override object Utilities.DataTypes.Dynamo< T >.GetValue ( string  Name,
Type  ReturnType 
)
protected

Gets a value

Parameters
NameName of the item
ReturnTypeReturn value type
Returns
The returned value

Definition at line 151 of file Dynamo.cs.

virtual object Utilities.DataTypes.Dynamo< T >.GetValue ( string  Name,
Type  ReturnType 
)
protectedvirtual

Gets a value

Parameters
NameName of the item
ReturnTypeReturn value type
Returns
The returned value

Definition at line 754 of file Dynamo.cs.

object Utilities.DataTypes.Dynamo< T >.RaiseGetValueEnd ( string  PropertyName,
object  Value 
)
protected

Raises the get value end event

Parameters
PropertyNameProperty name
ValueValue initially being returned
Returns
Returns null if the function should continue, any other value should be immediately returned to the user

Definition at line 790 of file Dynamo.cs.

object Utilities.DataTypes.Dynamo< T >.RaiseGetValueStart ( string  PropertyName)
protected

Raises the get value start event

Parameters
PropertyNameProperty name
Returns
Returns null if the function should continue, any other value should be immediately returned to the user

Definition at line 807 of file Dynamo.cs.

void Utilities.DataTypes.Dynamo< T >.RaisePropertyChanged ( string  PropertyName,
object  NewValue 
)
protected

Raises the property changed event

Parameters
PropertyNameProperty name
NewValueNew value for the property

Definition at line 821 of file Dynamo.cs.

virtual void Utilities.DataTypes.Dynamo< T >.ReadXml ( System.Xml.XmlReader  reader)
virtual

Reads the data from an XML doc

Parameters
readerXML reader

Definition at line 562 of file Dynamo.cs.

bool Utilities.DataTypes.Dynamo< T >.Remove ( string  key)

Removes the value associated with the key

Parameters
keyKey to remove
Returns
True if it is removed, false otherwise

Definition at line 576 of file Dynamo.cs.

bool Utilities.DataTypes.Dynamo< T >.Remove ( KeyValuePair< string, object >  item)

Removes a key/value pair

Parameters
itemItem to remove
Returns
True if it is removed, false otherwise

Definition at line 588 of file Dynamo.cs.

override void Utilities.DataTypes.Dynamo< T >.SetValue ( string  key,
object  value 
)
protected

Sets a value

Parameters
keyName of the item
valueValue associated with the key

Definition at line 175 of file Dynamo.cs.

virtual void Utilities.DataTypes.Dynamo< T >.SetValue ( string  key,
object  value 
)
protectedvirtual

Sets a value

Parameters
keyName of the item
valueValue to set

Definition at line 838 of file Dynamo.cs.

dynamic Utilities.DataTypes.Dynamo< T >.SubSet ( params string[]  Keys)

Returns a subset of the current Dynamo object

Parameters
KeysProperty keys to return
Returns
A new Dynamo object containing only the keys specified

Definition at line 600 of file Dynamo.cs.

object Utilities.DataTypes.Dynamo< T >.To ( Type  ObjectType)

Converts the object to the type specified

Parameters
ObjectTypeObject type
Returns
The object converted to the type specified

Definition at line 637 of file Dynamo.cs.

T Utilities.DataTypes.Dynamo< T >.To< T > ( )

Converts the object to the type specified

Template Parameters
TObject type
Returns
The object converted to the type specified

Definition at line 627 of file Dynamo.cs.

override string Utilities.DataTypes.Dynamo< T >.ToString ( )

Outputs the object graph

Returns
The string version of the object

Definition at line 650 of file Dynamo.cs.

override bool Utilities.DataTypes.Dynamo< T >.TryConvert ( ConvertBinder  binder,
out object  result 
)

Attempts to convert the object

Parameters
binderConvert binder
resultResult
Returns
True if it is converted, false otherwise

Definition at line 671 of file Dynamo.cs.

override bool Utilities.DataTypes.Dynamo< T >.TryGetMember ( GetMemberBinder  binder,
out object  result 
)

Attempts to get a member

Parameters
binderGetMemberBinder object
resultResult
Returns
True if it gets the member, false otherwise

Definition at line 683 of file Dynamo.cs.

bool Utilities.DataTypes.Dynamo< T >.TryGetValue ( string  key,
out object  value 
)

Attempts to get a value

Parameters
keyKey to get
valueValue object
Returns
True if it the key is found, false otherwise

Definition at line 695 of file Dynamo.cs.

override bool Utilities.DataTypes.Dynamo< T >.TryInvoke ( InvokeBinder  binder,
object[]  args,
out object  result 
)

Attempts to invoke a function

Parameters
binderInvoke binder
argsFunction args
resultResult
Returns
True if it invokes, false otherwise

Definition at line 707 of file Dynamo.cs.

override bool Utilities.DataTypes.Dynamo< T >.TryInvokeMember ( InvokeMemberBinder  binder,
object[]  args,
out object  result 
)

Attempts to invoke a member

Parameters
binderInvoke binder
argsFunction args
resultResult
Returns
True if it invokes, false otherwise

Definition at line 719 of file Dynamo.cs.

override bool Utilities.DataTypes.Dynamo< T >.TrySetMember ( SetMemberBinder  binder,
object  value 
)

Attempts to set the member

Parameters
binderMember binder
valueValue
Returns
True if it is set, false otherwise

Definition at line 730 of file Dynamo.cs.

virtual void Utilities.DataTypes.Dynamo< T >.WriteXml ( System.Xml.XmlWriter  writer)
virtual

Writes the data to an XML doc

Parameters
writerXML writer

Definition at line 740 of file Dynamo.cs.

Property Documentation

ConcurrentDictionary<string, Change> Utilities.DataTypes.Dynamo< T >.ChangeLog
get

Change log

Definition at line 258 of file Dynamo.cs.

int Utilities.DataTypes.Dynamo< T >.Count
get

Number of items

Definition at line 263 of file Dynamo.cs.

Action<Dynamo, string, EventArgs.OnEndEventArgs> Utilities.DataTypes.Dynamo< T >.GetValueEnd
addremove

Called when the value/property is found but before it is returned to the caller Sends (this, PropertyName, EventArgs) to items attached to the event

Definition at line 339 of file Dynamo.cs.

Action<Dynamo, EventArgs.OnStartEventArgs> Utilities.DataTypes.Dynamo< T >.GetValueStart
addremove

Called when beginning to get a value/property Sends (this, EventArgs) to items attached to the event

Definition at line 356 of file Dynamo.cs.

bool Utilities.DataTypes.Dynamo< T >.IsReadOnly
get

Is this read only?

Definition at line 268 of file Dynamo.cs.

override ICollection<string> Utilities.DataTypes.Dynamo< T >.Keys
get

Keys to the dynamic type

Definition at line 115 of file Dynamo.cs.

virtual ICollection<string> Utilities.DataTypes.Dynamo< T >.Keys
get

Keys

Definition at line 273 of file Dynamo.cs.

PropertyChangedEventHandler Utilities.DataTypes.Dynamo< T >.PropertyChanged
addremove

Property changed event

Definition at line 372 of file Dynamo.cs.

object Utilities.DataTypes.Dynamo< T >.this[string key]
getset

Gets the value associated with the key specified

Parameters
keyKey to get
Returns
The object associated with the key

Definition at line 308 of file Dynamo.cs.

override ICollection<object> Utilities.DataTypes.Dynamo< T >.Values
get

Gets the Values

Definition at line 133 of file Dynamo.cs.

virtual ICollection<object> Utilities.DataTypes.Dynamo< T >.Values
get

Values

Definition at line 278 of file Dynamo.cs.


The documentation for this class was generated from the following file: