SymWriter 类

定义

表示托管代码的符号编写器。Represents a symbol writer for managed code.

public ref class SymWriter : System::Diagnostics::SymbolStore::ISymbolWriter
public ref class SymWriter : System::Diagnostics::SymbolStore::SymWriterBase, IDisposable, System::Diagnostics::SymbolStore::ISymbolWriter
public class SymWriter : System.Diagnostics.SymbolStore.ISymbolWriter
[System.Runtime.InteropServices.ComVisible(true)]
public class SymWriter : System.Diagnostics.SymbolStore.ISymbolWriter
[System.Runtime.InteropServices.ComVisible(true)]
public class SymWriter : System.Diagnostics.SymbolStore.SymWriterBase, IDisposable, System.Diagnostics.SymbolStore.ISymbolWriter
type SymWriter = class
    interface ISymbolWriter
[<System.Runtime.InteropServices.ComVisible(true)>]
type SymWriter = class
    interface ISymbolWriter
[<System.Runtime.InteropServices.ComVisible(true)>]
type SymWriter = class
    inherit SymWriterBase
    interface ISymbolWriter
    interface IDisposable
Public Class SymWriter
Implements ISymbolWriter
Public Class SymWriter
Inherits SymWriterBase
Implements IDisposable, ISymbolWriter
继承
SymWriter
继承
SymWriter
属性
实现

注解

SymWriter类提供定义文档、序列点、词法范围和变量的方法。The SymWriter class provides methods that define documents, sequence points, lexical scopes, and variables.

构造函数

SymWriter()

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

SymWriter(Boolean)

初始化 SymWriter 类的新实例,指定是否创建基础符号编写器。Initializes a new instance of the SymWriter class, specifying whether to create an underlying symbol writer.

方法

__dtor()

此 API 支持产品基础结构,不能在代码中直接使用。

释放由 SymWriter 对象的当前实例控制的资源。Releases the resources held by the current instance of the SymWriter object.

{dtor}()

此 API 支持产品基础结构,不能在代码中直接使用。

释放由 SymWriter 对象的当前实例控制的资源。Releases the resources held by the current instance of the SymWriter object.

{dtor}()

释放由当前实例所持有的资源。Releases the resources held by the current instance.

(继承自 SymWriterBase)
Close()

关闭 SymWriter,并将符号提交到符号存储区。Closes the SymWriter and commits the symbols to the symbol store.

CloseMethod()

关闭当前方法。Closes the current method.

CloseNamespace()

关闭最近的命名空间。Closes the most recent namespace.

CloseScope(Int32)

关闭当前词法范围。Closes the current lexical scope.

DefineDocument(String, Guid, Guid, Guid)

定义源文档。Defines a source document.

DefineField(SymbolToken, String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32)

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

DefineGlobalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32)

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

DefineLocalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32, Int32, Int32)

在当前词法范围内定义单个变量。Defines a single variable in the current lexical scope.

DefineParameter(String, ParameterAttributes, Int32, SymAddressKind, Int32, Int32, Int32)

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

DefineSequencePoints(ISymbolDocumentWriter, Int32[], Int32[], Int32[], Int32[], Int32[])

在当前方法内定义一组序列点。Defines a group of sequence points within the current method.

Dispose()

释放 SymWriter 类的当前实例使用的资源。Releases the resources used by the current instance of the SymWriter class.

Dispose(Boolean)

Dispose()Finalize() 方法调用,以释放 SymWriter 类的当前实例所占用的托管资源和非托管资源。Called by the Dispose() and Finalize() methods to release the managed and unmanaged resources used by the current instance of the SymWriter class.

Equals(Object)

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

(继承自 Object)
Finalize()

在通过垃圾回收将 SymWriter 回收之前,释放非托管资源并执行其他清理操作。Releases unmanaged resources and performs other cleanup operations before the SymWriter is reclaimed by garbage collection.

GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
GetWriter()

获取基础非托管符号编写器。Gets the underlying unmanaged symbol writer.

Initialize(IntPtr, String, Boolean)

设置元数据发射器接口与此编写器相关联。Sets the metadata emitter interface to associate with this writer.

InitWriter(Boolean)

初始化符号编写器。Initializes the symbol writer. 不应直接调用此方法;它通过构造函数来调用。This method should not be called directly; it is called by the constructor.

MemberwiseClone()

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

(继承自 Object)
OpenMethod(SymbolToken)

打开一个在其中放置符号信息的方法。Opens a method in which to place symbol information.

OpenNamespace(String)

打开一个新的命名空间。Opens a new namespace.

OpenScope(Int32)

在当前方法中打开新的词法范围。Opens a new lexical scope in the current method.

SetMethodSourceRange(ISymbolDocumentWriter, Int32, Int32, ISymbolDocumentWriter, Int32, Int32)

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

SetScopeRange(Int32, Int32, Int32)

定义指定词法范围的偏移量范围。Defines the offset range for the specified lexical scope.

SetSymAttribute(SymbolToken, String, Byte[])

在给定特性名称和特性值的情况下,定义特性。Defines an attribute when given the attribute name and the attribute value.

SetUnderlyingWriter(IntPtr)

设置基础 ISymUnmanagedWriter 接口(相应的非托管 API),托管 SymWriter 使用它来发出符号。Sets the underlying ISymUnmanagedWriter Interface (the corresponding unmanaged API) that a managed SymWriter uses to emit symbols.

SetUserEntryPoint(SymbolToken)

将用户定义的方法标识为当前模块的入口点。Identifies the user-defined method as the entry point for the current module.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
UsingNamespace(String)

指定在打开的词法范围内使用给定的、完全限定的命名空间名称。Specifies that the given, fully qualified namespace name is used within the open lexical scope.

适用于