Click or drag to resize
ArchivableDictionary Class

Represents a dictionary class that can be attached to objects and can be serialized (saved) at necessity.

See remarks for layout.

Inheritance Hierarchy
SystemObject
  Rhino.CollectionsArchivableDictionary

Namespace: Rhino.Collections
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public class ArchivableDictionary : ICloneable, 
	IDictionary<string, Object>, ICollection<KeyValuePair<string, Object>>, 
	IEnumerable<KeyValuePair<string, Object>>, IEnumerable

The ArchivableDictionary type exposes the following members.

Constructors
  NameDescription
Public methodArchivableDictionary
Initializes an instance of a dictionary for writing to a 3dm archive.
Public methodArchivableDictionary(Int32)
Initializes an instance of a dictionary for writing to a 3dm archive.
Public methodArchivableDictionary(UserData)
Initializes an instance of a dictionary for writing to a 3dm archive
Public methodArchivableDictionary(Int32, String)
Initializes an instance of a dictionary for writing to a 3dm archive.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of key/value pairs contained in the dictionary.
Public propertyItem
Gets the value associated with the specified key.
Public propertyKeys
Gets all entry names or keys.
Public propertyName
Gets or sets the name string of this ArchivableDictionary.
Public propertyParentUserData
If this dictionary is part of userdata (or is a UserDictionary), then this is the parent user data. null if this dictionary is not part of userdata
Public propertyValues
Gets all values in this dictionary.
Public propertyVersion
Gets or sets the version of this ArchivableDictionary.
Top
Methods
  NameDescription
Public methodAddContentsFrom
Add the contents from the source dictionary.
Public methodClear
Removes all keys and values from the dictionary.
Public methodClone
Constructs a deep copy of this object.
Public methodContainsKey
Determines whether the dictionary contains the specified key.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBool(String)
Get value as bool, will only succeed if value was created using Set(string key, bool value)
Public methodGetBool(String, Boolean)
Get value as bool, will return defaultValue unless value was created using Set(string key, bool value)
Public methodGetBytes(String)
Get value as byte[], will only succeed if value was created using Set(string key, byte[] value)
Public methodGetBytes(String, Byte)
Get value as byte[], will return defaultValue unless value was created using Set(string key, byte[] value)
Public methodGetDictionary(String)
Get value as ArchivableDictionary, will only succeed if value was created using Set(string key, ArchivableDictionary value)
Public methodGetDictionary(String, ArchivableDictionary)
Get value as ArchivableDictionary, will return defaultValue unless value was created using Set(string key, ArchivableDictionary value)
Public methodGetDouble(String)
Get value as double, will only succeed if value was created using Set(string key, double value)
Public methodGetDouble(String, Double)
Get value as double, will only succeed if value was created using Set(string key, double value)
Public methodGetEnumerator
Gets the enumerator of this dictionary.
Public methodGetEnumValueT
Get an enum value
Public methodGetEnumValueT(String)
Get an enum value from the dictionary using a custom key.
Public methodGetFloat(String)
Get value as float, will only succeed if value was created using Set(string key, float value)
Public methodGetFloat(String, Single)
Get value as float, will return defaultValue unless value was created using Set(string key, float value)
Public methodGetGuid(String)
Get value as Guid, will only succeed if value was created using Set(string key, Guid value)
Public methodGetGuid(String, Guid)
Get value as Guid, will return defaultValue unless value was created using Set(string key, Guid value)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetint
Get value as int, will return defaultValue unless value was created using Set(string key, int value)
Public methodGetInteger(String)
Get value as int, will only succeed if value was created using Set(string key, int value)
Public methodGetInteger(String, Int32)
Get value as int, will return defaultValue unless value was created using Set(string key, int value)
Public methodGetPoint3d(String)
Get value as Point3d, will only succeed if value was created using Set(string key, Point3d value)
Public methodGetPoint3d(String, Point3d)
Get value as Point3d, will return defaultValue unless value was created using Set(string key, Point3d value)
Public methodGetPoint3f(String)
Get value as Point3f, will only succeed if value was created using Set(string key, Point3f value)
Public methodGetPoint3f(String, Point3f)
Get value as Point3f, will return defaultValue unless value was created using Set(string key, Point3f value)
Public methodGetString(String)
Get value as string, will only succeed if value was created using Set(string key, string value)
Public methodGetString(String, String)
Get value as string, will return defaultValue unless value was created using Set(string key, string value)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVector3d(String)
Get value as Vector3d, will only succeed if value was created using Set(string key, Vector3d value)
Public methodGetVector3d(String, Vector3d)
Get value as Vector3d, will return defaultValue unless value was created using Set(string key, Vector3d value)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes the value with the specified key from the dictionary.
Public methodRemoveEnumValueT
Remmove an enum value from the dictionary.
Public methodReplaceContentsWith
Replace the contents of the dictionary with that of the given source dictionary.
Public methodSet(String, ArchivableDictionary)
Sets another ArchivableDictionary as entry in this dictionary.
Public methodSet(String, ObjRef)
Sets a ObjRef
Public methodSet(String, BoundingBox)
Sets a BoundingBox.
Public methodSet(String, GeometryBase)
Sets any class deriving from the GeometryBase base class.
Public methodSet(String, Interval)
Sets an Interval.
Public methodSet(String, Line)
Sets a Line.
Public methodSet(String, MeshingParameters)
Public methodSet(String, Plane)
Sets a Plane.
Public methodSet(String, Point2d)
Sets a Point2d.
Public methodSet(String, Point3d)
Sets a Point3d.
Public methodSet(String, Point3f)
Sets a Point3f.
Public methodSet(String, Point4d)
Sets a Point4d.
Public methodSet(String, Ray3d)
Sets a Ray3d.
Public methodSet(String, Transform)
Sets a Transform.
Public methodSet(String, Vector2d)
Sets a Vector2d.
Public methodSet(String, Vector3d)
Sets a Vector3d.
Public methodSet(String, Vector3f)
Sets a Vector3f.
Public methodSet(String, Boolean)
Sets a Boolean.
Public methodSet(String, Byte)
Sets a Byte.
Public methodSet(String, IEnumerableObjRef)
Sets an array of ObjRef
Public methodSet(String, IEnumerableBoolean)
Sets a list, an array or any enumerable of Boolean.
Public methodSet(String, IEnumerableByte)
Sets a list, an array or any enumerable of Byte.
Public methodSet(String, IEnumerableDouble)
Sets a list, an array or any enumerable of Double.
Public methodSet(String, IEnumerableGuid)
Sets a list, an array or any enumerable of Guid.
Public methodSet(String, IEnumerableInt16)
Sets a list, an array or any enumerable of Int16.
Public methodSet(String, IEnumerableInt32)
Sets a list, an array or any enumerable of Int32.
Public methodSet(String, IEnumerableSByte)
Sets a list, an array or any enumerable of SByte.
Public methodSet(String, IEnumerableSingle)
Sets a list, an array or any enumerable of Single.
Public methodSet(String, IEnumerableString)
Sets a list, an array or any enumerable of String.
Public methodSet(String, Double)
Sets a Double.
Public methodSet(String, Color)
Sets a Color.
Public methodSet(String, Font)
Sets a Font.
Public methodSet(String, Point)
Sets a Point.
Public methodSet(String, PointF)
Sets a PointF.
Public methodSet(String, Rectangle)
Sets a Rectangle.
Public methodSet(String, RectangleF)
Sets a RectangleF.
Public methodSet(String, Size)
Sets a Size.
Public methodSet(String, SizeF)
Sets a SizeF.
Public methodSet(String, Guid)
Sets a Guid.
Public methodSet(String, Int16)
Sets a Int16.
Public methodSet(String, Int32)
Sets a Int32.
Public methodSet(String, Int64)
Sets a Int64.
Public methodSet(String, SByte)
Sets a SByte.
Public methodSet(String, Single)
Sets a Single.
Public methodSet(String, String)
Sets a String.
Public methodSet(String, UInt16)
Sets a UInt16.
Public methodSet(String, UInt32)
Sets a UInt32.
Public methodSetEnumValueT(T)
Set an enum value
Public methodSetEnumValueT(String, T)
Set an enum value in the dictionary with a custom key.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetBool
Get value as bool, will only succeed if value was created using Set(string key, bool value)
Public methodTryGetBytes
Get value as byte[], will only succeed if value was created using Set(string key, byte[] value)
Public methodTryGetDictionary
Get value as ArchivableDictionary, will only succeed if value was created using Set(string key, ArchivableDictionary value)
Public methodTryGetDouble
Get value as double, will only succeed if value was created using Set(string key, double value)
Public methodTryGetEnumValueT
Attempt to get an enum value from the dictionary using a custom key.
Public methodTryGetFloat
Get value as float, will only succeed if value was created using Set(string key, float value)
Public methodTryGetGuid
Get value as Guid, will only succeed if value was created using Set(string key, Guid value)
Public methodTryGetInteger
Get value as int, will only succeed if value was created using Set(string key, int value)
Public methodTryGetPoint3d
Get value as Point3d, will only succeed if value was created using Set(string key, Point3d value)
Public methodTryGetPoint3f
Get value as Point3f, will only succeed if value was created using Set(string key, Point3f value)
Public methodTryGetString
Get value as string, will only succeed if value was created using Set(string key, string value)
Public methodTryGetValue
Gets the value associated with the specified key.
Public methodTryGetVector3d
Get value as Vector3d, will only succeed if value was created using Set(string key, Vector3d value)
Top
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)

See Also