SymWriter SymWriter SymWriter SymWriter Class

Definition

Represents a symbol writer for managed code.

public ref class SymWriter : System::Diagnostics::SymbolStore::SymWriterBase, IDisposable, System::Diagnostics::SymbolStore::ISymbolWriter
[System.Runtime.InteropServices.ComVisible(true)]
public class SymWriter : System.Diagnostics.SymbolStore.SymWriterBase, IDisposable, System.Diagnostics.SymbolStore.ISymbolWriter
type SymWriter = class
    inherit SymWriterBase
    interface ISymbolWriter
    interface IDisposable
Public Class SymWriter
Inherits SymWriterBase
Implements IDisposable, ISymbolWriter
Inheritance
SymWriterSymWriterSymWriterSymWriter
Attributes
Implements

Remarks

The SymWriter class provides methods that define documents, sequence points, lexical scopes, and variables.

Constructors

SymWriter() SymWriter() SymWriter() SymWriter()

Initializes a new instance of the SymWriter class.

SymWriter(Boolean) SymWriter(Boolean) SymWriter(Boolean) SymWriter(Boolean)

Initializes a new instance of the SymWriter class, specifying whether to create an underlying symbol writer.

Methods

Close() Close() Close() Close()

Closes the SymWriter and commits the symbols to the symbol store.

CloseMethod() CloseMethod() CloseMethod() CloseMethod()

Closes the current method.

CloseNamespace() CloseNamespace() CloseNamespace() CloseNamespace()

Closes the most recent namespace.

CloseScope(Int32) CloseScope(Int32) CloseScope(Int32) CloseScope(Int32)

Closes the current lexical scope.

DefineDocument(String, Guid, Guid, Guid) DefineDocument(String, Guid, Guid, Guid) DefineDocument(String, Guid, Guid, Guid) DefineDocument(String, Guid, Guid, Guid)

Defines a source document.

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

Throws a NotSupportedException in all cases.

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

Throws a NotSupportedException in all cases.

DefineLocalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32, Int32, Int32) DefineLocalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32, Int32, Int32) DefineLocalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32, Int32, Int32) 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) DefineParameter(String, ParameterAttributes, Int32, SymAddressKind, Int32, Int32, Int32) DefineParameter(String, ParameterAttributes, Int32, SymAddressKind, Int32, Int32, Int32) DefineParameter(String, ParameterAttributes, Int32, SymAddressKind, Int32, Int32, Int32)

Throws a NotSupportedException in all cases.

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

Defines a group of sequence points within the current method.

Dispose() Dispose() Dispose() Dispose()

Releases the resources used by the current instance of the SymWriter class.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

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) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

Releases unmanaged resources and performs other cleanup operations before the SymWriter is reclaimed by garbage collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetWriter() GetWriter() GetWriter() GetWriter()

Gets the underlying unmanaged symbol writer.

Initialize(IntPtr, String, Boolean) Initialize(IntPtr, String, Boolean) Initialize(IntPtr, String, Boolean) Initialize(IntPtr, String, Boolean)

Sets the metadata emitter interface to associate with this writer.

InitWriter(Boolean) InitWriter(Boolean) InitWriter(Boolean) InitWriter(Boolean)

Initializes the symbol writer. This method should not be called directly; it is called by the constructor.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OpenMethod(SymbolToken) OpenMethod(SymbolToken) OpenMethod(SymbolToken) OpenMethod(SymbolToken)

Opens a method in which to place symbol information.

OpenNamespace(String) OpenNamespace(String) OpenNamespace(String) OpenNamespace(String)

Opens a new namespace.

OpenScope(Int32) OpenScope(Int32) OpenScope(Int32) OpenScope(Int32)

Opens a new lexical scope in the current method.

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

Throws a NotSupportedException in all cases.

SetScopeRange(Int32, Int32, Int32) SetScopeRange(Int32, Int32, Int32) SetScopeRange(Int32, Int32, Int32) SetScopeRange(Int32, Int32, Int32)

Defines the offset range for the specified lexical scope.

SetSymAttribute(SymbolToken, String, Byte[]) SetSymAttribute(SymbolToken, String, Byte[]) SetSymAttribute(SymbolToken, String, Byte[]) SetSymAttribute(SymbolToken, String, Byte[])

Defines an attribute when given the attribute name and the attribute value.

SetUnderlyingWriter(IntPtr) SetUnderlyingWriter(IntPtr) SetUnderlyingWriter(IntPtr) SetUnderlyingWriter(IntPtr)

Sets the underlying ISymUnmanagedWriter Interface (the corresponding unmanaged API) that a managed SymWriter uses to emit symbols.

SetUserEntryPoint(SymbolToken) SetUserEntryPoint(SymbolToken) SetUserEntryPoint(SymbolToken) SetUserEntryPoint(SymbolToken)

Identifies the user-defined method as the entry point for the current module.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
UsingNamespace(String) UsingNamespace(String) UsingNamespace(String) UsingNamespace(String)

Specifies that the given, fully qualified namespace name is used within the open lexical scope.

__dtor() __dtor() __dtor() __dtor()

Releases the resources held by the current instance of the SymWriter object.

{dtor}() {dtor}() {dtor}() {dtor}()

Releases the resources held by the current instance of the SymWriter object.

Applies to