Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ISymbolDocumentWriter Interface

 

Represents a document referenced by a symbol store.

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

<ComVisibleAttribute(True)>
Public Interface ISymbolDocumentWriter

NameDescription
System_CAPS_pubmethodSetCheckSum(Guid, Byte())

Sets checksum information.

System_CAPS_pubmethodSetSource(Byte())

Stores the raw source for a document in the symbol store.

A document is defined by a URL and a document type GUID. Optionally, the document source can be stored in the symbol store.

System_CAPS_noteNote

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

The following code example demonstrates how an ISymbolDocumentWriter can be obtained when calling DefineDocument.

Imports System
Imports System.Reflection
Imports System.Reflection.Emit
Imports System.Resources
Imports System.Diagnostics.SymbolStore

Namespace ILGenServer

   Public Class CodeGenerator
      Private myModuleBuilder As ModuleBuilder
      Private myAssemblyBuilder As AssemblyBuilder

      Public Sub New()

         ' Get the current application domain for the current thread.
         Dim currentDomain As AppDomain = AppDomain.CurrentDomain
         Dim myAssemblyName As New AssemblyName()
         myAssemblyName.Name = "TempAssembly"

         ' Define a dynamic assembly in the current domain.
         myAssemblyBuilder = currentDomain.DefineDynamicAssembly(myAssemblyName, _
                                                         AssemblyBuilderAccess.RunAndSave)
         ' Define a dynamic module in "TempAssembly" assembly.
         myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule", "Resource.mod", True)

         ' Define a document for source.on 'TempModule' module.
         Dim myDocument As ISymbolDocumentWriter = myModuleBuilder.DefineDocument("RTAsm.il", _
                     SymDocumentType.Text, SymLanguageType.ILAssembly, SymLanguageVendor.Microsoft)
         Console.WriteLine("The object representing the defined document is:" + _
                                                             CObj(myDocument).ToString())

      End Sub 'NewNew
   End Class 'CodeGenerator

   Public Class CallerClass

      Public Shared Sub Main()
         Dim myGenerator As New CodeGenerator()
      End Sub 'Main
   End Class 'CallerClass
End Namespace 'ILGenServer

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show:
© 2017 Microsoft