This documentation is archived and is not being maintained.

ISymbolWriter Interface

Represents a symbol writer for managed code.

Namespace:  System.Diagnostics.SymbolStore
Assembly:  mscorlib (in mscorlib.dll)

public interface ISymbolWriter

The ISymbolWriter type exposes the following members.

Public methodCloseCloses ISymbolWriter and commits the symbols to the symbol store.
Public methodCloseMethodCloses the current method.
Public methodCloseNamespaceCloses the most recent namespace.
Public methodCloseScopeCloses the current lexical scope.
Public methodDefineDocumentDefines a source document.
Public methodDefineFieldDefines a field in a type or a global field.
Public methodDefineGlobalVariableDefines a single global variable.
Public methodDefineLocalVariableDefines a single variable in the current lexical scope.
Public methodDefineParameterDefines a single parameter in the current method. The type of each parameter is taken from its position within the signature of the method.
Public methodDefineSequencePointsDefines a group of sequence points within the current method.
Public methodInitializeSets the metadata emitter interface to associate with a writer.
Public methodOpenMethodOpens a method to place symbol information into.
Public methodOpenNamespaceOpens a new namespace.
Public methodOpenScopeOpens a new lexical scope in the current method.
Public methodSetMethodSourceRangeSpecifies the true start and end of a method within a source file. Use SetMethodSourceRange to specify the extent of a method, independent of the sequence points that exist within the method.
Public methodSetScopeRangeDefines the offset range for the specified lexical scope.
Public methodSetSymAttributeDefines an attribute when given the attribute name and the attribute value.
Public methodSetUnderlyingWriterSets the underlying ISymUnmanagedWriter (the corresponding unmanaged interface) that a managed ISymbolWriter uses to emit symbols.
Public methodSetUserEntryPointIdentifies the user-defined method as the entry point for the current module.
Public methodUsingNamespaceSpecifies that the given, fully qualified namespace name is used within the open lexical scope.

The ISymbolWriter interface provides methods that define documents, sequence points, lexical scopes, and variables.


This interface is the managed counterpart of the ISymUnmanagedWriter interface, which is one of the unmanaged symbol store interfaces that provides an alternative way to read and write debug symbol information.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.