Export (0) Print
Expand All

PrintPropertyDictionary Class

Represents a collection of properties and values that are associated with an object in the System.Printing namespace.

System::Object
  System.Collections::Hashtable
    System.Printing.IndexedProperties::PrintPropertyDictionary

Namespace:  System.Printing.IndexedProperties
Assembly:  System.Printing (in System.Printing.dll)

[SerializableAttribute]
public ref class PrintPropertyDictionary : public Hashtable, 
	ISerializable, IDeserializationCallback, IDisposable

The PrintPropertyDictionary type exposes the following members.

  NameDescription
Public methodPrintPropertyDictionary()Initializes a new instance of the PrintPropertyDictionary class.
Protected methodPrintPropertyDictionary(SerializationInfo, StreamingContext)Initializes a new instance of the PrintPropertyDictionary class and provides it with the specified SerializationInfo and StreamingContext.
Top

  NameDescription
Protected propertycomparer Obsolete. Gets or sets the IComparer to use for the Hashtable. (Inherited from Hashtable.)
Public propertyCountGets the number of key/value pairs contained in the Hashtable. (Inherited from Hashtable.)
Protected propertyEqualityComparerGets the IEqualityComparer to use for the Hashtable. (Inherited from Hashtable.)
Protected propertyhcp Obsolete. Gets or sets the object that can dispense hash codes. (Inherited from Hashtable.)
Public propertyIsFixedSizeGets a value indicating whether the Hashtable has a fixed size. (Inherited from Hashtable.)
Public propertyIsReadOnlyGets a value indicating whether the Hashtable is read-only. (Inherited from Hashtable.)
Public propertyIsSynchronizedGets a value indicating whether access to the Hashtable is synchronized (thread safe). (Inherited from Hashtable.)
Public propertyItemGets or sets the value associated with the specified key. (Inherited from Hashtable.)
Public propertyKeysGets an ICollection containing the keys in the Hashtable. (Inherited from Hashtable.)
Public propertySyncRootGets an object that can be used to synchronize access to the Hashtable. (Inherited from Hashtable.)
Public propertyValuesGets an ICollection containing the values in the Hashtable. (Inherited from Hashtable.)
Top

  NameDescription
Public methodAdd(PrintProperty)Adds the specified object (of a class that is derived from PrintProperty) into the dictionary.
Public methodAdd(Object, Object)Adds an element with the specified key and value into the Hashtable. (Inherited from Hashtable.)
Public methodClearRemoves all elements from the Hashtable. (Inherited from Hashtable.)
Public methodCloneCreates a shallow copy of the Hashtable. (Inherited from Hashtable.)
Public methodContainsDetermines whether the Hashtable contains a specific key. (Inherited from Hashtable.)
Public methodContainsKeyDetermines whether the Hashtable contains a specific key. (Inherited from Hashtable.)
Public methodContainsValueDetermines whether the Hashtable contains a specific value. (Inherited from Hashtable.)
Public methodCopyToCopies the Hashtable elements to a one-dimensional Array instance at the specified index. (Inherited from Hashtable.)
Public methodDispose()Releases all the resources that are being used by the PrintPropertyDictionary.
Protected methodDispose(Boolean)Releases the unmanaged resources that are being used by the PrintPropertyDictionary and optionally releases the managed resources.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorReturns an IDictionaryEnumerator that iterates through the Hashtable. (Inherited from Hashtable.)
Protected methodGetHashReturns the hash code for the specified key. (Inherited from Hashtable.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetObjectDataPopulates a SerializationInfo with the data that is needed to serialize the PrintPropertyDictionary. (Overrides Hashtable::GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetPropertyGets the object (of a class that is derived from PrintProperty) that represents the specified property.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodKeyEqualsCompares a specific Object with a specific key in the Hashtable. (Inherited from Hashtable.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnDeserializationImplements the ISerializable interface and raises the deserialization event when the deserialization is complete. (Overrides Hashtable::OnDeserialization(Object).)
Public methodRemoveRemoves the element with the specified key from the Hashtable. (Inherited from Hashtable.)
Public methodSetPropertySets the value of the specified attribute to an object of a class that is derived from PrintProperty.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable::GetEnumeratorReturns an enumerator that iterates through a collection. (Inherited from Hashtable.)
Top

The collection takes the form of a Hashtable dictionary. The Value property of each DictionaryEntry in the collection is an instance of a class that is derived from PrintProperty.

The following example shows how to use this class to install a second printer that differs in its properties from an existing printer only in location, port, and shared status.

No code example is currently available or this language may not be supported.

The following example shows how to use this class to discover at run time the properties, and the types of those properties, of a print system object, without using reflection.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft