PrintSystemObject 类

定义

定义打印系统对象所共有的基本属性和方法。Defines basic properties and methods that are common to the objects of the printing system. 从此类派生的类表示诸如打印队列、打印服务器和打印作业之类的对象。Classes that derive from this class represent such objects as print queues, print servers, and print jobs.

public ref class PrintSystemObject abstract : IDisposable
public abstract class PrintSystemObject : IDisposable
type PrintSystemObject = class
    interface IDisposable
Public MustInherit Class PrintSystemObject
Implements IDisposable
继承
PrintSystemObject
派生
实现

注解

除了作为打印系统对象的基类之外,当您的应用程序不知道或不关心它所使用的特定类型的打印系统对象时,此类对于调用方法非常有用。In addition to being the base class for print system objects, this class can be useful for calling methods when your application does not know or does not care what particular type of print system object it is using. 例如,可以枚举PrintSystemObjects不同对象类型的集合,依次对每个对象类型Commit调用方法。For example, you could enumerate through a PrintSystemObjects collection of different object types, calling the Commit method on each of them in turn.

注意

System.Printing命名空间中的类不支持在 Windows 服务或 ASP.NET 应用程序或服务中使用。Classes within the System.Printing namespace are not supported for use within a Windows service or ASP.NET application or service. 尝试从这些应用程序类型之一中使用这些类可能会产生意外的问题,例如降低服务性能和运行时异常。Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.

如果要从 Windows 窗体应用程序进行打印,请参阅System.Drawing.Printing命名空间。If you want to print from a Windows Forms application, see the System.Drawing.Printing namespace.

实施者说明

如果从PrintSystemObject派生类,可能需要从PrintSystemObjects派生该类的对象的集合。If you derive a class from PrintSystemObject, you may want to derive a collection of objects of that class from PrintSystemObjects.

构造函数

PrintSystemObject()

初始化 PrintSystemObject 类的新实例。Initializes a new instance of the PrintSystemObject class.

PrintSystemObject(PrintSystemObjectLoadMode)

使用指定的 PrintSystemObject 初始化 PrintSystemObjectLoadMode 类的新实例。Initializes a new instance of the PrintSystemObject class by using the specified PrintSystemObjectLoadMode.

属性

IsDisposed

获取或设置一个值,该值指示该对象是否已被释放。Gets or sets a value that indicates whether the object has been disposed.

Name

获取对象的名称。Gets the name of the object.

Parent

获取对象的父级。Gets the parent of the object.

PropertiesCollection

获取特性和值对的集合。Gets a collection of attribute and value pairs.

方法

BaseAttributeNames()

获取派生类特性的名称。Gets the names of the attributes of the derived class.

Commit()

在派生类中重写时,会将程序对对象属性所做的所有更改写入该对象表示的实际软件或硬件组件。When overridden in a derived class, writes any changes that your program has made to the object's properties to the actual software or hardware component that the object represents.

Dispose()

释放由 PrintSystemObject 使用的所有资源。Releases all resources used by the PrintSystemObject.

Dispose(Boolean)

释放由 PrintSystemObject 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the PrintSystemObject and optionally releases the managed resources.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Finalize()

释放正在由 PrintSystemObject 使用的资源。Releases the resources that are being used by the PrintSystemObject.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
Initialize()

初始化 PrintSystemObject 的属性。Initializes the properties of the PrintSystemObject.

InternalDispose(Boolean)

在派生类中重写时,请释放正在由 PrintSystemObject 使用的非托管资源,也可以选择性地释放正在使用的托管资源。When overridden in a derived class, releases the unmanaged resources that are being used by the PrintSystemObject, and optionally releases the managed resources that are being used.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Refresh()

在派生类中重写时,会将更新派生类对象的属性,以使其值与该对象表示的实际软件或硬件组件的值相匹配。When overridden in a derived class, updates the properties of an object of the derived class so that its values match the values of the actual software or hardware component that the object represents.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于