dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/compat Vsa.cs,1.6,1.7


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/compat Vsa.cs,1.6,1.7
Date: Wed, 03 Sep 2003 02:49:17 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/compat
In directory subversions:/tmp/cvs-serv22991/compat

Modified Files:
        Vsa.cs 
Log Message:


Signature-compatibility fixes in "Microsoft.Vsa".


Index: Vsa.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/compat/Vsa.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Vsa.cs      29 May 2003 01:22:39 -0000      1.6
--- Vsa.cs      3 Sep 2003 06:49:15 -0000       1.7
***************
*** 2,6 ****
   * Vsa.cs - Scripting engine interfaces.
   *
!  * Copyright (C) 2002  Southern Storm Software, Pty Ltd.
   *
   * This library is free software; you can redistribute it and/or
--- 2,6 ----
   * Vsa.cs - Scripting engine interfaces.
   *
!  * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
   *
   * This library is free software; you can redistribute it and/or
***************
*** 29,32 ****
--- 29,33 ----
  using System.Security.Policy;
  using System.Runtime.Serialization;
+ using System.Runtime.InteropServices;
  
  // Script item flags.
***************
*** 49,52 ****
--- 50,57 ----
  
  // Interface for querying error information.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE4-7eea-4ee2-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaError
  {
***************
*** 64,67 ****
--- 69,76 ----
  
  // Interface to a script item.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE5-7eea-4ee5-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaItem
  {
***************
*** 75,78 ****
--- 84,91 ----
  
  // Collection of script items.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("0AB1EB6A-12BD-44d0-B941-0580ADFC73DE")]
+ #endif
  public interface IVsaItems : IEnumerable
  {
***************
*** 87,90 ****
--- 100,107 ----
  
  // Interface to a script code item.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE7-7eea-4ee5-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaCodeItem : IVsaItem
  {
***************
*** 100,103 ****
--- 117,124 ----
  
  // Interface to a global script item.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("4E76D92E-E29D-46f3-AE22-0333158109F1")]
+ #endif
  public interface IVsaGlobalItem : IVsaItem
  {
***************
*** 108,111 ****
--- 129,136 ----
  
  // Interface to a reference script item.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE6-7eea-4ee5-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaReferenceItem : IVsaItem
  {
***************
*** 115,118 ****
--- 140,147 ----
  
  // Interface to a site that can be used to persist script source.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE3-7eea-4ee2-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaPersistSite
  {
***************
*** 123,126 ****
--- 152,159 ----
  
  // Interface to a site that is used to communicate with an engine.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE2-7eea-4ee2-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaSite
  {
***************
*** 134,137 ****
--- 167,174 ----
  
  // Interface to a scripting engine.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFE1-7eea-4ee2-b7e4-0080c7eb0b74")]
+ #endif
  public interface IVsaEngine
  {
***************
*** 168,171 ****
--- 205,273 ----
  }; // interface IVsaEngine
  
+ // DT code items.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFED-7eea-4ee5-b7e4-0080c7eb0b74")]
+ #endif
+ public interface IVsaDTCodeItem
+ {
+       bool CanDelete { get; set; }
+       bool CanMove { get; set; }
+       bool CanRename { get; set; }
+       bool Hidden { get; set; }
+       bool ReadOnly { get; set; }
+ 
+ }; // interface IVsaDTCodeItem
+ 
+ // DT engine interface.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("E0C0FFEE-7eea-4ee5-b7e4-0080c7eb0b74")]
+ #endif
+ public interface IVsaDTEngine
+ {
+       void AttachDebugger(bool isAttach);
+       IVsaIDE GetIDE();
+       void InitCompleted();
+       String TargetURL { get; set; }
+ 
+ }; // interface IVsaDTEngine
+ 
+ // IDE interface for VSA.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("78470A10-8153-407d-AB1B-05067C54C36B")]
+ #endif
+ public interface IVsaIDE
+ {
+       void EnableMainWindow(bool isEnable);
+       void ShowIDE(bool showOrHide);
+       String DefaultSearchPath { get; set; }
+       Object ExtensibilityObject { get; }
+       VsaIDEMode IDEMode { get; }
+       IVsaIDESite Site { get; set; }
+ 
+ }; // interface IVsaIDE
+ 
+ // IDE site interface for VSA.
+ #if CONFIG_COM_INTEROP
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("7BD84086-1FB5-4b5d-8E05-EAA2F17218E0")]
+ #endif
+ public interface IVsaIDESite
+ {
+       void Notify(String notify, Object optional);
+ 
+ }; // interface IVsaIDESite
+ 
+ // VSA IDE mode values.
+ public enum VsaIDEMode
+ {
+       Break           = 0,
+       Design          = 1,
+       Run                     = 2
+ 
+ }; // enum VsaIDEMode
+ 
  // Scripting error codes.
  public enum VsaError
***************
*** 257,261 ****
  [Serializable]
  #endif
! public class VsaException : Exception
  {
        // Internal state.
--- 359,363 ----
  [Serializable]
  #endif
! public class VsaException : ExternalException
  {
        // Internal state.
***************
*** 271,276 ****
                        : base(message, innerException)
                        {
-                               // TODO: set Exception.HResult
                                this.error = error;
                        }
  
--- 373,380 ----
                        : base(message, innerException)
                        {
                                this.error = error;
+                       #if !ECMA_COMPAT
+                               this.HResult = (int)error;
+                       #endif
                        }
  
***************
*** 279,293 ****
        public VsaException(SerializationInfo info, StreamingContext context)
                        {
!                               // TODO
                        }
        public override void GetObjectData(SerializationInfo info,
                                                                           
StreamingContext context)
                        {
!                               // TODO
                        }
  #endif
  
        // Get the error code.
!       public VsaError ErrorCode
                        {
                                get
--- 383,414 ----
        public VsaException(SerializationInfo info, StreamingContext context)
                        {
!                               if(info == null)
!                               {
!                                       throw new ArgumentNullException("info");
!                               }
!                               error = 
(VsaError)(info.GetInt32("VsaException_HResult"));
!                       #if !ECMA_COMPAT
!                               HResult = (int)error;
!                               HelpLink = 
info.GetString("VsaException_HelpLink");
!                               Source = info.GetString("VsaException_Source");
!                       #endif
                        }
        public override void GetObjectData(SerializationInfo info,
                                                                           
StreamingContext context)
                        {
!                               if(info == null)
!                               {
!                                       throw new ArgumentNullException("info");
!                               }
!                               info.AddValue("VsaException_HResult", 
(int)error);
!                       #if !ECMA_COMPAT
!                               info.AddValue("VsaException_HelpLink", 
HelpLink);
!                               info.AddValue("VsaException_Source", Source);
!                       #endif
                        }
  #endif
  
        // Get the error code.
!       public new VsaError ErrorCode
                        {
                                get
***************
*** 300,305 ****
        public override String ToString()
                        {
!                               // TODO
!                               return base.ToString();
                        }
  
--- 421,426 ----
        public override String ToString()
                        {
!                               return base.ToString() + Environment.NewLine +
!                                          "ErrorCode: " + error;
                        }
  
***************
*** 333,336 ****
--- 454,658 ----
  
  }; // class VsaModule
+ 
+ // Vsa loader.  Not used in this implementation.
+ public sealed class VsaLoader : IVsaEngine
+ {
+       // Internal state.
+       private Assembly assembly;
+       private Evidence evidence;
+       private bool generateDebugInfo;
+       private bool isCompiled;
+       private bool isDirty;
+       private bool isRunning;
+       private IVsaItems items;
+       private String language;
+       private int lcid;
+       private String name;
+       private String rootMoniker;
+       private String rootNamespace;
+       private IVsaSite site;
+       private String version;
+ 
+       // Constructor.
+       public VsaLoader()
+                       {
+                               rootNamespace = String.Empty;
+                       }
+ 
+       // Implement the IVsaEngine interface.
+       public Assembly Assembly
+                       {
+                               get
+                               {
+                                       return assembly;
+                               }
+                       }
+       public Evidence Evidence
+                       {
+                               get
+                               {
+                                       return evidence;
+                               }
+                               set
+                               {
+                                       evidence = value;
+                               }
+                       }
+       public bool GenerateDebugInfo
+                       {
+                               get
+                               {
+                                       return generateDebugInfo;
+                               }
+                               set
+                               {
+                                       generateDebugInfo = value;
+                               }
+                       }
+       public bool IsCompiled
+                       {
+                               get
+                               {
+                                       return isCompiled;
+                               }
+                       }
+       public bool IsDirty
+                       {
+                               get
+                               {
+                                       return isDirty;
+                               }
+                       }
+       public bool IsRunning
+                       {
+                               get
+                               {
+                                       return isRunning;
+                               }
+                       }
+       public IVsaItems Items
+                       {
+                               get
+                               {
+                                       return items;
+                               }
+                       }
+       public String Language
+                       {
+                               get
+                               {
+                                       return language;
+                               }
+                       }
+       public int LCID
+                       {
+                               get
+                               {
+                                       return lcid;
+                               }
+                               set
+                               {
+                                       lcid = value;
+                               }
+                       }
+       public String Name
+                       {
+                               get
+                               {
+                                       return name;
+                               }
+                       }
+       public String RootMoniker
+                       {
+                               get
+                               {
+                                       return rootMoniker;
+                               }
+                               set
+                               {
+                                       rootMoniker = value;
+                               }
+                       }
+       public String RootNamespace
+                       {
+                               get
+                               {
+                                       return rootNamespace;
+                               }
+                               set
+                               {
+                                       rootNamespace = value;
+                               }
+                       }
+       public IVsaSite Site
+                       {
+                               get
+                               {
+                                       return site;
+                               }
+                               set
+                               {
+                                       site = value;
+                               }
+                       }
+       public String Version
+                       {
+                               get
+                               {
+                                       return version;
+                               }
+                       }
+       public void Close()
+                       {
+                               site = null;
+                               Reset();
+                       }
+       public bool Compile()
+                       {
+                               throw new NotSupportedException();
+                       }
+       public Object GetOption(String name)
+                       {
+                               // Nothing to do here.
+                               return null;
+                       }
+       public void InitNew()
+                       {
+                               // Nothing to do here.
+                       }
+       public bool IsValidIdentifier(String identifier)
+                       {
+                               throw new NotSupportedException();
+                       }
+       public void LoadSourceState(IVsaPersistSite site)
+                       {
+                               throw new NotSupportedException();
+                       }
+       public void Reset()
+                       {
+                               // Nothing to do here.
+                       }
+       public void RevokeCache()
+                       {
+                               // Nothing to do here.
+                       }
+       public void Run()
+                       {
+                               // Nothing to do here.
+                       }
+       public void SaveCompiledState(out byte[] pe, out byte[] pdb)
+                       {
+                               throw new NotSupportedException();
+                       }
+       public void SaveSourceState(IVsaPersistSite site)
+                       {
+                               throw new NotSupportedException();
+                       }
+       public void SetOption(String name, Object value)
+                       {
+                               // Nothing to do here.
+                       }
+ 
+ }; // class VsaLoader
  
  } // namespace Microsoft.Vsa





reply via email to

[Prev in Thread] Current Thread [Next in Thread]