Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SymLanguageVendor Class

Holds the public GUIDs for language vendors to be used with the symbol store.

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

[ComVisibleAttribute(true)] 
public class SymLanguageVendor
/** @attribute ComVisibleAttribute(true) */ 
public class SymLanguageVendor
ComVisibleAttribute(true) 
public class SymLanguageVendor
Not applicable.

The following code example demonstrates how SymLanguageVendor is used when calling DefineDocument.

using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Diagnostics.SymbolStore;

namespace ILGenServer
{
   public class CodeGenerator
   {
      ModuleBuilder myModuleBuilder ;
      AssemblyBuilder myAssemblyBuilder ;

      public CodeGenerator()
      {

         // Get the current application domain for the current thread.
         AppDomain currentDomain = AppDomain.CurrentDomain;
         AssemblyName myAssemblyName = 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.
         ISymbolDocumentWriter myDocument =
         myModuleBuilder.DefineDocument("RTAsm.il", SymDocumentType.Text,
                  SymLanguageType.ILAssembly,SymLanguageVendor.Microsoft);

         Console.WriteLine("The object representing the defined document is:"+myDocument);

      }
   }
   public class CallerClass
   {
      public static void Main()
      {
         CodeGenerator myGenerator = new CodeGenerator();
      }
   }
}

import System.*;
import System.Reflection.*;
import System.Reflection.Emit.*;
import System.Resources.*;
import System.Diagnostics.SymbolStore.*;

public class CodeGenerator
{
    private ModuleBuilder myModuleBuilder;
    private AssemblyBuilder myAssemblyBuilder;

    public CodeGenerator()
    {
        // Get the current application domain for the current thread.
        AppDomain currentDomain = AppDomain.get_CurrentDomain();
        AssemblyName myAssemblyName = new AssemblyName();
        myAssemblyName.set_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.
        ISymbolDocumentWriter myDocument = myModuleBuilder.DefineDocument(
            "RTAsm.il", SymDocumentType.Text, SymLanguageType.ILAssembly, 
            SymLanguageVendor.Microsoft);

        Console.WriteLine("The object representing the defined document is:" 
            + myDocument);
    } //CodeGenerator 
} //CodeGenerator

public class CallerClass
 {
     public static void main(String[] args)
     {
         CodeGenerator myGenerator = new CodeGenerator();
     } //main
 } //CallerClass

System.Object
  System.Diagnostics.SymbolStore.SymLanguageVendor
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.