ArchivableDictionary
Represents a dictionary class that can be attached to objects and can be serialized (saved) at necessity.
See remarks for layout.
Inheritance Hierarchy
System.Object
Rhino.Collections.ArchivableDictionary
Namespace: Rhino.Collections
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public class ArchivableDictionary : ICloneable, IDictionary<string, Object>, ICollection<KeyValuePair<string, Object>>, IEnumerable<KeyValuePair<string, Object>>, IEnumerable, ISerializable
The ArchivableDictionary type exposes the following members.
Constructors
Name
Description
Public Method
ArchivableDictionary.
Initializes an instance of a dictionary for writing to a 3dm archive.
Public Method
ArchivableDictionary(Int32)
Initializes an instance of a dictionary for writing to a 3dm archive.
Public Method
ArchivableDictionary(UserData)
Initializes an instance of a dictionary for writing to a 3dm archive
Public Method
ArchivableDictionary(Int32, String)
Initializes an instance of a dictionary for writing to a 3dm archive.
Protected Method
ArchivableDictionary(SerializationInfo, StreamingContext)
Protected constructor for internal use.
Properties
Name
Description
Public Property
ChangeSerialNumber
Retrieve current change serial number. This is a number that gets increased each time a datum is set or changed.
Public Property
Count
Gets the number of key/value pairs contained in the dictionary.
Public Property
Item
Gets the value associated with the specified key.
Public Property
Keys
Gets all entry names or keys.
Public Property
Name
Gets or sets the name string of this ArchivableDictionary.
Public Property
ParentUserData
If this dictionary is part of user-data (or is a UserDictionary), then this is the parent user data. null if this dictionary is not part of user-data
Public Property
Values
Gets all values in this dictionary.
Public Property
Version
Gets or sets the version of this ArchivableDictionary.
Methods
Name
Description
Public Method
AddContentsFrom
Add the contents from the source dictionary.
Public Method
Clear
Removes all keys and values from the dictionary.
Public Method
Clone
Constructs a deep copy of this object.
Public Method
ContainsKey
Determines whether the dictionary contains the specified key.
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected Method
Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public Method
GetBool(String)
Get value as Boolean, will only succeed if value was created using Set(string key, Boolean value)
Public Method
GetBool(String, Boolean)
Get value as Boolean, will return defaultValue unless value was created using Set(string key, Boolean value)
Public Method
GetBytes(String)
Get value as byte[], will only succeed if value was created using Set(string key, byte[] value)
Public Method
GetBytes(String, .Byte.)
Get value as byte[], will return defaultValue unless value was created using Set(string key, byte[] value)
Public Method
GetDictionary(String)
Get value as ArchivableDictionary, will only succeed if value was created using Set(string key, ArchivableDictionary value)
Public Method
GetDictionary(String, ArchivableDictionary)
Get value as ArchivableDictionary, will return defaultValue unless value was created using Set(string key, ArchivableDictionary value)
Public Method
GetDouble(String)
Get value as double, will only succeed if value was created using Set(string key, double value)
Public Method
GetDouble(String, Double)
Get value as double, will only succeed if value was created using Set(string key, double value)
Public Method
GetEnumerator
Gets the enumerator of this dictionary.
Public Method
GetEnumValue.T..
Get an enum value
Public Method
GetEnumValue.T.(String)
Get an enum value from the dictionary using a custom key.
Public Method
GetFloat(String)
Get value as float, will only succeed if value was created using Set(string key, float value)
Public Method
GetFloat(String, Single)
Get value as float, will return defaultValue unless value was created using Set(string key, float value)
Public Method
GetGuid(String)
Get value as Guid, will only succeed if value was created using Set(string key, Guid value)
Public Method
GetGuid(String, Guid)
Get value as Guid, will return defaultValue unless value was created using Set(string key, Guid value)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public Method
Getint
Get value as int, will return defaultValue unless value was created using Set(string key, int value)
Public Method
GetInteger(String)
Get value as int, will only succeed if value was created using Set(string key, int value)
Public Method
GetInteger(String, Int32)
Get value as int, will return defaultValue unless value was created using Set(string key, int value)
Public Method
GetObjectData
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Public Method
GetPlane(String)
Get value as Plane, will return defaultValue unless value was created using Set(string key, Plane value)
Public Method
GetPlane(String, Plane)
Get value as Plane, will return defaultValue unless value was created using Set(string key, Plane value)
Public Method
GetPoint3d(String)
Get value as Point3d, will only succeed if value was created using Set(string key, Point3d value)
Public Method
GetPoint3d(String, Point3d)
Get value as Point3d, will return defaultValue unless value was created using Set(string key, Point3d value)
Public Method
GetPoint3f(String)
Get value as Point3f, will only succeed if value was created using Set(string key, Point3f value)
Public Method
GetPoint3f(String, Point3f)
Get value as Point3f, will return defaultValue unless value was created using Set(string key, Point3f value)
Public Method
GetString(String)
Get value as string, will only succeed if value was created using Set(string key, string value)
Public Method
GetString(String, String)
Get value as string, will return defaultValue unless value was created using Set(string key, string value)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
GetVector3d(String)
Get value as Vector3d, will only succeed if value was created using Set(string key, Vector3d value)
Public Method
GetVector3d(String, Vector3d)
Get value as Vector3d, will return defaultValue unless value was created using Set(string key, Vector3d value)
Protected Method
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public Method
Remove
Removes the value with the specified key from the dictionary.
Public Method
RemoveEnumValue.T.
Remove an enum value from the dictionary.
Public Method
ReplaceContentsWith
Replace the contents of the dictionary with that of the given source dictionary.
Public Method
Set(String, ArchivableDictionary)
Sets another ArchivableDictionary as entry in this dictionary.
Public Method
Set(String, ObjRef)
Sets a ObjRef
Public Method
Set(String, BoundingBox)
Sets a BoundingBox.
Public Method
Set(String, GeometryBase)
Sets any class deriving from the GeometryBase base class.
Public Method
Set(String, Interval)
Sets an Interval.
Public Method
Set(String, Line)
Sets a Line.
Public Method
Set(String, MeshingParameters)
Sets a MeshingParameters.
Public Method
Set(String, Plane)
Sets a Plane.
Public Method
Set(String, Point2d)
Sets a Point2d.
Public Method
Set(String, Point3d)
Sets a Point3d.
Public Method
Set(String, Point3f)
Sets a Point3f.
Public Method
Set(String, Point4d)
Sets a Point4d.
Public Method
Set(String, Ray3d)
Sets a Ray3d.
Public Method
Set(String, Transform)
Sets a Transform.
Public Method
Set(String, Vector2d)
Sets a Vector2d.
Public Method
Set(String, Vector3d)
Sets a Vector3d.
Public Method
Set(String, Vector3f)
Sets a Vector3f.
Public Method
Set(String, Boolean)
Sets a Boolean.
Public Method
Set(String, Byte)
Sets a Byte.
Public Method
Set(String, IEnumerable.ObjRef.)
Sets an array of ObjRef
Public Method
Set(String, IEnumerable.GeometryBase.)
Sets an array of GeometryBase
Public Method
Set(String, IEnumerable.Boolean.)
Sets a list, an array or any enumerable of Boolean.
Public Method
Set(String, IEnumerable.Byte.)
Sets a list, an array or any enumerable of Byte.
Public Method
Set(String, IEnumerable.Double.)
Sets a list, an array or any enumerable of Double.
Public Method
Set(String, IEnumerable.Guid.)
Sets a list, an array or any enumerable of Guid.
Public Method
Set(String, IEnumerable.Int16.)
Sets a list, an array or any enumerable of Int16.
Public Method
Set(String, IEnumerable.Int32.)
Sets a list, an array or any enumerable of Int32.
Public Method
Set(String, IEnumerable.SByte.)
Sets a list, an array or any enumerable of SByte.
Public Method
Set(String, IEnumerable.Single.)
Sets a list, an array or any enumerable of Single.
Public Method
Set(String, IEnumerable.String.)
Sets a list, an array or any enumerable of String.
Public Method
Set(String, Double)
Sets a Double.
Public Method
Set(String, Color)
Sets a Color.
Public Method
Set(String, Font)
Sets a Font.
Public Method
Set(String, Point)
Sets a Point.
Public Method
Set(String, PointF)
Sets a PointF.
Public Method
Set(String, Rectangle)
Sets a Rectangle.
Public Method
Set(String, RectangleF)
Sets a RectangleF.
Public Method
Set(String, Size)
Sets a Size.
Public Method
Set(String, SizeF)
Sets a SizeF.
Public Method
Set(String, Guid)
Sets a Guid.
Public Method
Set(String, Int16)
Sets a Int16.
Public Method
Set(String, Int32)
Sets a Int32.
Public Method
Set(String, Int64)
Sets a Int64.
Public Method
Set(String, SByte)
Sets a SByte.
Public Method
Set(String, Single)
Sets a Single.
Public Method
Set(String, String)
Sets a String.
Public Method
Set(String, UInt16)
Sets a UInt16.
Public Method
Set(String, UInt32)
Sets a UInt32.
Public Method
SetEnumValue.T.(T)
Set an enum value
Public Method
SetEnumValue.T.(String, T)
Set an enum value in the dictionary with a custom key.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public Method
TryGetBool
Get value as Boolean, will only succeed if value was created using Set(string key, Boolean value)
Public Method
TryGetBytes
Get value as byte[], will only succeed if value was created using Set(string key, byte[] value)
Public Method
TryGetDictionary
Get value as ArchivableDictionary, will only succeed if value was created using Set(string key, ArchivableDictionary value)
Public Method
TryGetDouble
Get value as double, will only succeed if value was created using Set(string key, double value)
Public Method
TryGetEnumValue.T.
Attempt to get an enum value from the dictionary using a custom key.
Public Method
TryGetFloat
Get value as float, will only succeed if value was created using Set(string key, float value)
Public Method
TryGetGuid
Get value as Guid, will only succeed if value was created using Set(string key, Guid value)
Public Method
TryGetInteger
Get value as int, will only succeed if value was created using Set(string key, int value)
Public Method
TryGetPlane
Get value as Plane, will only succeed if value was created using Set(string key, Plane value)
Public Method
TryGetPoint3d
Get value as Point3d, will only succeed if value was created using Set(string key, Point3d value)
Public Method
TryGetPoint3f
Get value as Point3f, will only succeed if value was created using Set(string key, Point3f value)
Public Method
TryGetString
Get value as string, will only succeed if value was created using Set(string key, string value)
Public Method
TryGetValue
Gets the value associated with the specified key.
Public Method
TryGetVector3d
Get value as Vector3d, will only succeed if value was created using Set(string key, Vector3d value)
Remarks
This is the layout of this object:
.
BEGINCHUNK (TCODE_ANONYMOUS_CHUNK)
|- version (int)
|- entry count (int)
for entry count entries
|- BEGINCHUNK (TCODE_ANONYMOUS_CHUNK)
|- key (string)
|- entry contents
|- ENDCHUNK (TCODE_ANONYMOUS_CHUNK)
ENDCHUNK (TCODE_ANONYMOUS_CHUNK)