The Labs \ Source Viewer \ SSCLI \ Microsoft.Vsa \ IVsaDTCodeItem

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. [assembly: System.Runtime.InteropServices.Guid("D3295D86-D604-11D4-A704-00C04FA137E4")]
  16. [assembly: System.Security.AllowPartiallyTrustedCallers()]
  17. namespace Microsoft.Vsa
  18. {
  19.     using System.CodeDom;
  20.     using System.Runtime.InteropServices;
  21.     using System;
  22.     using System.Runtime.Serialization;
  23.     using System.Security.Permissions;
  24.    
  25. /* VsaItemType is also defined in vs\src\vsa\vbapkg\src\vbapkg.idl
  26.       If you want to change the definition here, you have to make changes there too.
  27.       See comment in vs\src\vsa\vbapkg\src\vbapkg.idl which explain why we need
  28.       this definition twice */   
  29.     [Guid("a9f6f86e-fcf5-3d8d-97e4-0fe6c7fe2274")]
  30.     [Obsolete(VsaObsolete.Description)]
  31.     public enum VsaItemType
  32.     {
  33.         Reference,
  34.         // IVsaReferenceItem - COM+ Assembly or RCW
  35.         AppGlobal,
  36.         // IVsaItem - application object
  37.         Code
  38.         // IVsaCodeItem - vsa code
  39.     }
  40.    
  41.     [Guid("40d8ce77-8139-3483-8674-bb9e3acd9b89")]
  42.     [Obsolete(VsaObsolete.Description)]
  43.     public enum VsaItemFlag
  44.     {
  45.         None,
  46.         // No special flags required or flags not accepted
  47.         Module,
  48.         // Global Module
  49.         Class
  50.         // Instantiable COM+ class.
  51.     }
  52.    
  53.     [Guid("05a1147d-6c8d-3bb8-888f-8bfa319b2e6f")]
  54.     [Obsolete(VsaObsolete.Description)]
  55.     public enum VsaIDEMode
  56.     {
  57.         Break,
  58.         // Break mode - debugger is attached and in break mode
  59.         Design,
  60.         // Design mode - debugger is not attached
  61.         Run
  62.         // Run mode - debugger is attached
  63.     }
  64.    
  65.     [Guid("E0C0FFE1-7eea-4ee2-b7e4-0080c7eb0b74")]
  66.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  67.     [Obsolete(VsaObsolete.Description)]
  68.     public interface IVsaEngine
  69.     {
  70.         // === Site ===
  71.         IVsaSite Site {
  72.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  73.             get;
  74.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  75.             set;
  76.         }
  77.        
  78.         // === Properties ===
  79.         // Name, RootMoniker, RootNameSpace are first class properties of the engine
  80.         // Never assume get, set operations of first class properties can be the
  81.         // equivalent of calling SetOption and GetOption
  82.        
  83.         string Name {
  84.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  85.             get;
  86.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  87.             set;
  88.         }
  89.         string RootMoniker {
  90.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  91.             get;
  92.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  93.             set;
  94.         }
  95.         // Default namespace used by the engine
  96.         string RootNamespace {
  97.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  98.             get;
  99.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  100.             set;
  101.         }
  102.        
  103.         int LCID {
  104.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  105.             get;
  106.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  107.             set;
  108.         }
  109.        
  110.         bool GenerateDebugInfo {
  111.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  112.             get;
  113.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  114.             set;
  115.         }
  116.        
  117.         System.Security.Policy.Evidence Evidence {
  118.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  119.             get;
  120.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  121.             set;
  122.         }
  123.        
  124.         // collection of items
  125.         IVsaItems Items {
  126.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  127.             get;
  128.         }
  129.        
  130.         // returns TRUE if any item in the engine has been dirtied
  131.         bool IsDirty {
  132.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  133.             get;
  134.         }
  135.        
  136.         // return the programming language of the engine (e.g. VB or JScript)
  137.         string Language {
  138.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  139.             get;
  140.         }
  141.        
  142.         // returns the engine version
  143.         string Version {
  144.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  145.             get;
  146.         }
  147.        
  148.         // engine options (methods)
  149.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  150.         object GetOption(string name);
  151.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  152.         void SetOption(string name, object value);
  153.        
  154.         // === State management ===
  155.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  156.         bool Compile();
  157.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  158.         void Run();
  159.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  160.         void Reset();
  161.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  162.         void Close();
  163.        
  164.         bool IsRunning {
  165.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  166.             get;
  167.         }
  168.         bool IsCompiled {
  169.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  170.             get;
  171.         }
  172.        
  173.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  174.         void RevokeCache();
  175.        
  176.         // === Source State ===
  177.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  178.         void SaveSourceState(IVsaPersistSite site);
  179.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  180.         void LoadSourceState(IVsaPersistSite site);
  181.        
  182.         // === Compiled State ===
  183.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  184.         void SaveCompiledState(out byte[] pe, out byte[] pdb);
  185.        
  186.         // Called if the engine state will be set by calls (rather than a call to by LoadSourceState)
  187.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  188.         void InitNew();
  189.        
  190.         // returns TRUE if the identifier if legal for the language of the engine
  191.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  192.         bool IsValidIdentifier(string identifier);
  193.        
  194.         // === Assembly ===
  195.         System.Reflection.Assembly Assembly {
  196.             get;
  197.         }
  198.     }
  199.     // IVsaEngine
  200.     [Guid("E0C0FFE2-7eea-4ee2-b7e4-0080c7eb0b74")]
  201.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  202.     [Obsolete(VsaObsolete.Description)]
  203.     public interface IVsaSite
  204.     {
  205.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  206.         void GetCompiledState(out byte[] pe, out byte[] debugInfo);
  207.        
  208.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  209.         bool OnCompilerError(IVsaError error);
  210.        
  211.         object GetGlobalInstance(string name);
  212.        
  213.         object GetEventSourceInstance(string itemName, string eventSourceName);
  214.        
  215.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  216.         void Notify(string notify, object info);
  217.        
  218.     }
  219.     // IVSaSite
  220.     [Guid("E0C0FFE3-7eea-4ee2-b7e4-0080c7eb0b74")]
  221.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  222.     [Obsolete(VsaObsolete.Description)]
  223.     public interface IVsaPersistSite
  224.     {
  225.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  226.         void SaveElement(string name, string source);
  227.        
  228.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  229.         string LoadElement(string name);
  230.     }
  231.     // IVsaPersistSite
  232.     [Guid("E0C0FFE4-7eea-4ee2-b7e4-0080c7eb0b74")]
  233.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  234.     [Obsolete(VsaObsolete.Description)]
  235.     public interface IVsaError
  236.     {
  237.         int Line {
  238.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  239.             get;
  240.         }
  241.         int Severity {
  242.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  243.             get;
  244.         }
  245.         string Description {
  246.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  247.             get;
  248.         }
  249.         string LineText {
  250.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  251.             get;
  252.         }
  253.         IVsaItem SourceItem {
  254.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  255.             get;
  256.         }
  257.         // returns the ending column of the text creating the error
  258.         int EndColumn {
  259.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  260.             get;
  261.         }
  262.         // returns the beginning column of the text creating the error
  263.         int StartColumn {
  264.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  265.             get;
  266.         }
  267.         // Error number
  268.         int Number {
  269.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  270.             get;
  271.         }
  272.         // (fully qualified?) moniker of item with error
  273.         string SourceMoniker {
  274.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  275.             get;
  276.         }
  277.     }
  278.     // IVsaError
  279.     [Guid("E0C0FFE5-7eea-4ee5-b7e4-0080c7eb0b74")]
  280.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  281.     [Obsolete(VsaObsolete.Description)]
  282.     public interface IVsaItem
  283.     {
  284.         string Name {
  285.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  286.             get;
  287.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  288.             set;
  289.         }
  290.         VsaItemType ItemType {
  291.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  292.             get;
  293.         }
  294.         // returns TRUE if item is dirty
  295.         bool IsDirty {
  296.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  297.             get;
  298.         }
  299.         // item option (property)
  300.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  301.         object GetOption(string name);
  302.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  303.         void SetOption(string name, object value);
  304.     }
  305.     // IVsaItem
  306.     [Guid("0AB1EB6A-12BD-44d0-B941-0580ADFC73DE")]
  307.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  308.     [Obsolete(VsaObsolete.Description)]
  309.     public interface IVsaItems : System.Collections.IEnumerable
  310.     {
  311.         int Count {
  312.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  313.             get;
  314.         }
  315.         IVsaItem this[string name]
  316.         {
  317.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  318.             get;
  319.         }
  320.         IVsaItem this[int index]
  321.         {
  322.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  323.             get;
  324.         }
  325.         // Create an item
  326.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  327.         IVsaItem CreateItem(string name, VsaItemType itemType, VsaItemFlag itemFlag);
  328.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  329.         void Remove(string name);
  330.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  331.         void Remove(int index);
  332.     }
  333.     // IVsaItems
  334.     [Guid("E0C0FFE6-7eea-4ee5-b7e4-0080c7eb0b74")]
  335.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  336.     [Obsolete(VsaObsolete.Description)]
  337.     public interface IVsaReferenceItem : IVsaItem
  338.     {
  339.         string AssemblyName {
  340.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  341.             get;
  342.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  343.             set;
  344.         }
  345.     }
  346.     // IVsaReferenceItem
  347.     [Guid("E0C0FFE7-7eea-4ee5-b7e4-0080c7eb0b74")]
  348.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  349.     [Obsolete(VsaObsolete.Description)]
  350.     public interface IVsaCodeItem : IVsaItem
  351.     {
  352.         string SourceText {
  353.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  354.             get;
  355.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  356.             set;
  357.         }
  358.        
  359.         // returns a CodeDom tree for this code item. The CodeObject returned is of type
  360.         // System.CodeDom.CodeCompileUnit
  361.         System.CodeDom.CodeObject CodeDOM {
  362.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  363.             get;
  364.         }
  365.        
  366.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  367.         void AppendSourceText(string text);
  368.        
  369.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  370.         void AddEventSource(string eventSourceName, string eventSourceType);
  371.        
  372.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  373.         void RemoveEventSource(string eventSourceName);
  374.        
  375.     }
  376.     // IVsaCodeItem
  377.    
  378.     [Guid("4E76D92E-E29D-46f3-AE22-0333158109F1")]
  379.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  380.     [Obsolete(VsaObsolete.Description)]
  381.     public interface IVsaGlobalItem : IVsaItem
  382.     {
  383.         string TypeString {
  384.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  385.             set;
  386.         }
  387.        
  388.         bool ExposeMembers {
  389.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  390.             get;
  391.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  392.             set;
  393.         }
  394.     }
  395.     // IVsaGlobalItem
  396.     [Guid("7BD84086-1FB5-4b5d-8E05-EAA2F17218E0")]
  397.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  398.     [Obsolete(VsaObsolete.Description)]
  399.     public interface IVsaIDESite
  400.     {
  401.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  402.         void Notify(string notify, object optional);
  403.     }
  404.     // IVsaIDESite
  405.     [Guid("78470A10-8153-407d-AB1B-05067C54C36B")]
  406.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  407.     [Obsolete(VsaObsolete.Description)]
  408.     public interface IVsaIDE
  409.     {
  410.         // === Site ===
  411.         IVsaIDESite Site {
  412.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  413.             get;
  414.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  415.             set;
  416.         }
  417.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  418.         void ShowIDE(bool showOrHide);
  419.        
  420.         // determines default starting search path of the Find dialog
  421.         string DefaultSearchPath {
  422.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  423.             get;
  424.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  425.             set;
  426.         }
  427.        
  428.         object ExtensibilityObject {
  429.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  430.             get;
  431.         }
  432.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  433.         void EnableMainWindow(bool isEnable);
  434.         VsaIDEMode IDEMode {
  435.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  436.             get;
  437.         }
  438.     }
  439.     // IVsaIDE
  440.     [Guid("E0C0FFEE-7eea-4ee5-b7e4-0080c7eb0b74")]
  441.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  442.     [Obsolete(VsaObsolete.Description)]
  443.     public interface IVsaDTEngine
  444.     {
  445.         // remote debugging properties
  446.         string TargetURL {
  447.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  448.             get;
  449.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  450.             set;
  451.         }
  452.         // methods
  453.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  454.         void InitCompleted();
  455.         IVsaIDE GetIDE();
  456.         [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  457.         void AttachDebugger(bool isAttach);
  458.     }
  459.     // IVsaDTEngine
  460.    
  461.     [Guid("E0C0FFED-7eea-4ee5-b7e4-0080c7eb0b74")]
  462.     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  463.     [Obsolete(VsaObsolete.Description)]
  464.     public interface IVsaDTCodeItem
  465.     {
  466.         // IDE control attributes
  467.         bool CanDelete {
  468.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  469.             get;
  470.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  471.             set;
  472.         }
  473.         bool CanMove {
  474.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  475.             get;
  476.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  477.             set;
  478.         }
  479.         bool CanRename {
  480.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  481.             get;
  482.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  483.             set;
  484.         }
  485.         bool Hidden {
  486.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  487.             get;
  488.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  489.             set;
  490.         }
  491.        
  492.         // TRUE means buffer cannot be edited
  493.         bool ReadOnly {
  494.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  495.             get;
  496.             [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
  497.             set;
  498.         }
  499.     }
  500.     // IVsaDTCodeItem
  501.     // Make it contiguous so that it's easy to determine whether this is a VsaError.
  502.     // WARNING: If you change the error code below, you MUST make the corresponding changes in vs\src\common\inc\vsa\vsares.h
  503.     // Note we are using the int (as opposed to unsigned hex) values for CLS Compliance
  504.     [Guid("c216f805-8fab-3d33-bf81-7b1035e917b9")]
  505.     [Obsolete(VsaObsolete.Description)]
  506.     public enum VsaError : int
  507.     {
  508.         AppDomainCannotBeSet = -2146226176,
  509.         // 0x80133000
  510.         AppDomainInvalid = -2146226175,
  511.         // 0x80133001
  512.         ApplicationBaseCannotBeSet = -2146226174,
  513.         // 0x80133002
  514.         ApplicationBaseInvalid = -2146226173,
  515.         // 0x80133003
  516.         AssemblyExpected = -2146226172,
  517.         // 0x80133004
  518.         AssemblyNameInvalid = -2146226171,
  519.         // 0x80133005
  520.         BadAssembly = -2146226170,
  521.         // 0x80133006
  522.         CachedAssemblyInvalid = -2146226169,
  523.         // 0x80133007
  524.         CallbackUnexpected = -2146226168,
  525.         // 0x80133008
  526.         CodeDOMNotAvailable = -2146226167,
  527.         // 0x80133009
  528.         CompiledStateNotFound = -2146226166,
  529.         // 0x8013300A
  530.         DebugInfoNotSupported = -2146226165,
  531.         // 0x8013300B
  532.         ElementNameInvalid = -2146226164,
  533.         // 0x8013300C
  534.         ElementNotFound = -2146226163,
  535.         // 0x8013300D
  536.         EngineBusy = -2146226162,
  537.         // 0x8013300E
  538.         EngineCannotClose = -2146226161,
  539.         // 0x8013300F
  540.         EngineCannotReset = -2146226160,
  541.         // 0x80133010
  542.         EngineClosed = -2146226159,
  543.         // 0x80133011
  544.         EngineEmpty = -2146226159,
  545.         // 0x80133012
  546.         EngineInitialized = -2146226157,
  547.         // 0x80133013
  548.         EngineNameInUse = -2146226156,
  549.         // 0x80133014
  550.         EngineNotCompiled = -2146226155,
  551.         // 0x80133015
  552.         EngineNotInitialized = -2146226154,
  553.         // 0x80133016
  554.         EngineNotRunning = -2146226153,
  555.         // 0x80133017
  556.         EngineRunning = -2146226152,
  557.         // 0x80133018
  558.         EventSourceInvalid = -2146226151,
  559.         // 0x80133019
  560.         EventSourceNameInUse = -2146226150,
  561.         // 0x8013301A
  562.         EventSourceNameInvalid = -2146226149,
  563.         // 0x8013301B
  564.         EventSourceNotFound = -2146226148,
  565.         // 0x8013301C
  566.         EventSourceTypeInvalid = -2146226147,
  567.         // 0x8013301D
  568.         GetCompiledStateFailed = -2146226146,
  569.         // 0x8013301E
  570.         GlobalInstanceInvalid = -2146226145,
  571.         // 0x8013301F
  572.         GlobalInstanceTypeInvalid = -2146226144,
  573.         // 0x80133020
  574.         InternalCompilerError = -2146226143,
  575.         // 0x80133021
  576.         ItemCannotBeRemoved = -2146226142,
  577.         // 0x80133022
  578.         ItemFlagNotSupported = -2146226141,
  579.         // 0x80133023
  580.         ItemNameInUse = -2146226140,
  581.         // 0x80133024
  582.         ItemNameInvalid = -2146226139,
  583.         // 0x80133025
  584.         ItemNotFound = -2146226138,
  585.         // 0x80133026
  586.         ItemTypeNotSupported = -2146226137,
  587.         // 0x80133027
  588.         LCIDNotSupported = -2146226136,
  589.         // 0x80133028
  590.         LoadElementFailed = -2146226135,
  591.         // 0x80133029
  592.         NotificationInvalid = -2146226134,
  593.         // 0x8013302A
  594.         OptionInvalid = -2146226133,
  595.         // 0x8013302B
  596.         OptionNotSupported = -2146226132,
  597.         // 0x8013302C
  598.         RevokeFailed = -2146226131,
  599.         // 0x8013302D
  600.         RootMonikerAlreadySet = -2146226130,
  601.         // 0x8013302E
  602.         RootMonikerInUse = -2146226129,
  603.         // 0x8013302F
  604.         RootMonikerInvalid = -2146226128,
  605.         // 0x80133030
  606.         RootMonikerNotSet = -2146226127,
  607.         // 0x80133031
  608.         RootMonikerProtocolInvalid = -2146226126,
  609.         // 0x80133032
  610.         RootNamespaceInvalid = -2146226125,
  611.         // 0x80133033
  612.         RootNamespaceNotSet = -2146226124,
  613.         // 0x80133034
  614.         SaveCompiledStateFailed = -2146226123,
  615.         // 0x80133035
  616.         SaveElementFailed = -2146226122,
  617.         // 0x80133036
  618.         SiteAlreadySet = -2146226121,
  619.         // 0x80133037
  620.         SiteInvalid = -2146226120,
  621.         // 0x80133038
  622.         SiteNotSet = -2146226119,
  623.         // 0x80133039
  624.         SourceItemNotAvailable = -2146226118,
  625.         // 0x8013303A
  626.         SourceMonikerNotAvailable = -2146226117,
  627.         // 0x8013303B
  628.         URLInvalid = -2146226116,
  629.         // 0x8013303C
  630.         BrowserNotExist = -2146226115,
  631.         // 0x8013303D
  632.         DebuggeeNotStarted = -2146226114,
  633.         // 0x8013303E
  634.         EngineNameInvalid = -2146226113,
  635.         // 0x8013303F
  636.         EngineNotExist = -2146226112,
  637.         // 0x80133040
  638.         FileFormatUnsupported = -2146226111,
  639.         // 0x80133041
  640.         FileTypeUnknown = -2146226110,
  641.         // 0x80133042
  642.         ItemCannotBeRenamed = -2146226109,
  643.         // 0x80133043
  644.         MissingSource = -2146226108,
  645.         // 0x80133044
  646.         NotInitCompleted = -2146226107,
  647.         // 0x80133045
  648.         NameTooLong = -2146226106,
  649.         // 0x80133046
  650.         ProcNameInUse = -2146226105,
  651.         // 0x80133047
  652.         ProcNameInvalid = -2146226104,
  653.         // 0x80133048
  654.         VsaServerDown = -2146226103,
  655.         // 0x80133049
  656.         MissingPdb = -2146226102,
  657.         // 0x8013304A
  658.         NotClientSideAndNoUrl = -2146226101,
  659.         // 0x8013304B
  660.         CannotAttachToWebServer = -2146226100,
  661.         // 0x8013304C
  662.         EngineNameNotSet = -2146226099,
  663.         // 0x8013304D
  664.         UnknownError = -2146225921
  665.         // 0x801330FF
  666.     }
  667.     // VsaErr
  668.     [System.SerializableAttribute()]
  669.     [PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
  670.     [Guid("5f44bb1a-465a-37db-8e84-acc733bf7541")]
  671.     [Obsolete(VsaObsolete.Description)]
  672.     public class VsaException : ExternalException
  673.     {
  674.         //Standard constructors
  675.         public VsaException()
  676.         {
  677.         }
  678.         public VsaException(string message) : base(message)
  679.         {
  680.         }
  681.         public VsaException(string message, Exception innerException) : base(message, innerException)
  682.         {
  683.         }
  684.        
  685.         //Serialization constructor
  686.         public VsaException(SerializationInfo info, StreamingContext context) : base(info, context)
  687.         {
  688.             //deserialize value
  689.             HResult = (Int32)info.GetValue("VsaException_HResult", typeof(Int32));
  690.             HelpLink = (string)info.GetValue("VsaException_HelpLink", typeof(string));
  691.             Source = (string)info.GetValue("VsaException_Source", typeof(string));
  692.         }
  693.        
  694.         //serializes the object
  695.         [PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
  696.         [SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
  697.         public override void GetObjectData(SerializationInfo info, StreamingContext context)
  698.         {
  699.             base.GetObjectData(info, context);
  700.            
  701.             //serialize value
  702.             info.AddValue("VsaException_HResult", HResult);
  703.             info.AddValue("VsaException_HelpLink", HelpLink);
  704.             info.AddValue("VsaException_Source", Source);
  705.         }
  706.        
  707.         public override string ToString()
  708.         {
  709.             if ((null != this.Message) && ("" != this.Message))
  710.                 return "Microsoft.Vsa.VsaException: " + System.Enum.GetName(((VsaError)HResult).GetType(), (VsaError)HResult) + " (0x" + String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0,8:X}", HResult) + "): " + Message;
  711.             else
  712.                 return "Microsoft.Vsa.VsaException: " + System.Enum.GetName(((VsaError)HResult).GetType(), (VsaError)HResult) + " (0x" + String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0,8:X}", HResult) + ").";
  713.         }
  714.        
  715.         public VsaException(VsaError error) : base(String.Empty, (int)error)
  716.         {
  717.         }
  718.        
  719.         public VsaException(VsaError error, string message) : base(message, (int)error)
  720.         {
  721.         }
  722.        
  723.         public VsaException(VsaError error, string message, Exception innerException) : base(message, innerException)
  724.         {
  725.             HResult = (int)error;
  726.         }
  727.        
  728.         public new VsaError ErrorCode {
  729.             get { return (VsaError)HResult; }
  730.         }
  731.     }
  732.     // VsaException
  733.     // A custom attribute to identify this assembly as being generated by VSA
  734.     [type: System.AttributeUsageAttribute(System.AttributeTargets.All)]
  735.     [PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
  736.     [Guid("7f64f934-c1cc-338e-b695-f64d71e820fe")]
  737.     [Obsolete(VsaObsolete.Description)]
  738.     public class VsaModule : System.Attribute
  739.     {
  740.         public VsaModule(bool bIsVsaModule)
  741.         {
  742.             IsVsaModule = bIsVsaModule;
  743.         }
  744.        
  745.         public bool IsVsaModule {
  746.             get { return isVsaModule; }
  747.             set { isVsaModule = value; }
  748.         }
  749.        
  750.         private bool isVsaModule;
  751.     }
  752.     // VsaModule
  753. }
  754. // Microsoft.Vsa

Developer Fusion