PrintProperty 클래스

정의

인쇄 시스템 하드웨어 또는 소프트웨어 구성 요소의 속성 및 속성 값을 나타냅니다.

public ref class PrintProperty abstract : IDisposable, System::Runtime::Serialization::IDeserializationCallback
[System.Serializable]
public abstract class PrintProperty : IDisposable, System.Runtime.Serialization.IDeserializationCallback
public abstract class PrintProperty : IDisposable, System.Runtime.Serialization.IDeserializationCallback
[<System.Serializable>]
type PrintProperty = class
    interface IDisposable
    interface IDeserializationCallback
type PrintProperty = class
    interface IDisposable
    interface IDeserializationCallback
Public MustInherit Class PrintProperty
Implements IDeserializationCallback, IDisposable
상속
PrintProperty
파생
특성
구현

예제

다음 예제에서는 리플렉션을 사용하지 않고 런타임에 이 클래스를 사용하여 인쇄 시스템 개체의 속성 및 해당 속성 형식을 검색하는 방법을 보여 있습니다.


// 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 클래스의 새 인스턴스를 초기화합니다.

속성

IsDisposed

개체가 삭제되었는지 여부를 나타내는 값을 가져오거나 설정합니다.

IsInitialized

개체가 초기화되었는지 여부를 나타내는 값을 가져오거나 설정합니다.

Name

파생 클래스에서 재정의되는 경우 개체가 나타내는 속성의 이름을 가져옵니다.

Value

파생 클래스에서 재정의되는 경우 개체가 나타내는 속성의 값을 가져오거나 설정합니다.

메서드

Dispose()

PrintProperty에서 사용하는 모든 리소스를 해제합니다.

Dispose(Boolean)

PrintProperty에서 사용하는 관리되지 않는 리소스를 해제하고 관리되는 리소스를 선택적으로 해제합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
Finalize()

가비지 수집기에서 PrintProperty를 회수하기 전에 PrintProperty가 리소스를 해제하고 다른 정리 작업을 수행할 수 있게 합니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
InternalDispose(Boolean)

PrintProperty에서 사용하는 관리되지 않는 리소스를 해제하고 관리되는 리소스를 선택적으로 해제합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnDeserialization(Object)

파생 클래스에서 재정의되는 경우 ISerializable 인터페이스를 구현하고 deserialization이 완료되면 deserialization 이벤트를 발생시킵니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상