PrintProperty クラス
定義
印刷システムのハードウェア コンポーネントまたはソフトウェア コンポーネントのプロパティ (およびこのプロパティの値) を表します。Represents a property (and the value of the property) of a printing system hardware or software component.
public ref class PrintProperty abstract : IDisposable, System::Runtime::Serialization::IDeserializationCallback
public abstract class PrintProperty : IDisposable, System.Runtime.Serialization.IDeserializationCallback
[System.Serializable]
public abstract class PrintProperty : IDisposable, System.Runtime.Serialization.IDeserializationCallback
type PrintProperty = class
interface IDisposable
interface IDeserializationCallback
[<System.Serializable>]
type PrintProperty = class
interface IDisposable
interface IDeserializationCallback
Public MustInherit Class PrintProperty
Implements IDeserializationCallback, IDisposable
- 継承
-
PrintProperty
- 派生
- 属性
- 実装
例
次の例では、リフレクションを使用せずに、このクラスを使用して、印刷システムオブジェクトのプロパティおよびそれらのプロパティの型を検出する方法を示します。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.
// Enumerate the properties, and their types, of a queue without using Reflection
LocalPrintServer localPrintServer = new LocalPrintServer();
PrintQueue defaultPrintQueue = LocalPrintServer.GetDefaultPrintQueue();
PrintPropertyDictionary printQueueProperties = defaultPrintQueue.PropertiesCollection;
Console.WriteLine("These are the properties, and their types, of {0}, a {1}", defaultPrintQueue.Name, defaultPrintQueue.GetType().ToString() +"\n");
foreach (DictionaryEntry entry in printQueueProperties)
{
PrintProperty property = (PrintProperty)entry.Value;
if (property.Value != null)
{
Console.WriteLine(property.Name + "\t(Type: {0})", property.Value.GetType().ToString());
}
}
Console.WriteLine("\n\nPress Return to continue...");
Console.ReadLine();
' Enumerate the properties, and their types, of a queue without using Reflection
Dim localPrintServer As New LocalPrintServer()
Dim defaultPrintQueue As PrintQueue = LocalPrintServer.GetDefaultPrintQueue()
Dim printQueueProperties As PrintPropertyDictionary = defaultPrintQueue.PropertiesCollection
Console.WriteLine("These are the properties, and their types, of {0}, a {1}", defaultPrintQueue.Name, defaultPrintQueue.GetType().ToString() + vbLf)
For Each entry As DictionaryEntry In printQueueProperties
Dim [property] As PrintProperty = CType(entry.Value, PrintProperty)
If [property].Value IsNot Nothing Then
Console.WriteLine([property].Name & vbTab & "(Type: {0})", [property].Value.GetType().ToString())
End If
Next entry
Console.WriteLine(vbLf & vbLf & "Press Return to continue...")
Console.ReadLine()
コンストラクター
PrintProperty(String) |
PrintProperty クラスの新しいインスタンスを初期化します。Initializes a new instance of the PrintProperty class. |
プロパティ
IsDisposed |
オブジェクトが破棄されたかどうかを示す値を取得または設定します。Gets or sets a value that indicates whether the object has been disposed. |
IsInitialized |
オブジェクトが初期化されているかどうかを示す値を取得または設定します。Gets or sets a value that indicates whether the object has been initialized. |
Name |
派生クラスでオーバーライドされると、オブジェクトが表すプロパティの名前を取得します。When overridden in a derived class, gets the name of the property that the object represents. |
Value |
派生クラスでオーバーライドされると、オブジェクトが表すプロパティの値を取得または設定します。When overridden in a derived class, gets or sets the value of the property that the object represents. |
メソッド
Dispose() |
PrintProperty によって使用されているすべてのリソースを解放します。Releases all resources that are being used by the PrintProperty. |
Dispose(Boolean) |
PrintProperty によって使用されているアンマネージド リソースを解放します。オプションでマネージド リソースも解放できます。Releases the unmanaged resources that are being used by the PrintProperty and optionally releases the managed resource. |
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object. (継承元 Object) |
Finalize() |
PrintProperty がガベージ コレクションによって収集される前に、その PrintProperty がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。Enables a PrintProperty to attempt to free resources and to perform other cleanup operations before the PrintProperty is reclaimed by garbage collection. |
GetHashCode() |
既定のハッシュ関数として機能します。Serves as the default hash function. (継承元 Object) |
GetType() |
現在のインスタンスの Type を取得します。Gets the Type of the current instance. (継承元 Object) |
InternalDispose(Boolean) |
PrintProperty によって使用されているアンマネージド リソースを解放します。オプションでマネージド リソースも解放できます。Releases the unmanaged resources that are being used by the PrintProperty and optionally releases the managed resources. |
MemberwiseClone() |
現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object. (継承元 Object) |
OnDeserialization(Object) |
派生クラスでオーバーライドされると、ISerializable インターフェイスを実装し、逆シリアル化が完了したときに逆シリアル化イベントを発生させます。When overridden in a derived class, implements the ISerializable interface and raises the deserialization event when the deserialization is complete. |
ToString() |
現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object. (継承元 Object) |