[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System AppDomainSetup.cs,NON
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System AppDomainSetup.cs,NONE,1.1 IAppDomainSetup.cs,NONE,1.1 AppDomain.cs,1.5,1.6 LoaderOptimization.cs,1.1.1.1,1.2 |
Date: |
Fri, 31 Jan 2003 22:31:47 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System
In directory subversions:/tmp/cvs-serv32548/runtime/System
Modified Files:
AppDomain.cs LoaderOptimization.cs
Added Files:
AppDomainSetup.cs IAppDomainSetup.cs
Log Message:
Add some non-ECMA classes that are required by SharpDevelop.
--- NEW FILE ---
/*
* AppDomainSetup.cs - Implementation of the "System.AppDomainSetup" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System
{
#if !ECMA_COMPAT
using System.Runtime.InteropServices;
[Serializable]
[ClassInterface(ClassInterfaceType.None)]
public sealed class AppDomainSetup : IAppDomainSetup
{
// Internal state.
private String applicationBase;
private String applicationName;
private String cachePath;
private String configurationFile;
private String dynamicBase;
private String licenseFile;
private String privateBinPath;
private String privateBinPathProbe;
private String shadowCopyDirectories;
private String shadowCopyFiles;
private bool disallowPublisherPolicy;
private LoaderOptimization loaderOptimization;
// Constructor.
public AppDomainSetup()
{
// Nothing to do here.
}
// Implement the IAppDomainSetup interface.
public String ApplicationBase
{
get
{
return applicationBase;
}
set
{
applicationBase = value;
}
}
public String ApplicationName
{
get
{
return applicationName;
}
set
{
applicationName = value;
}
}
public String CachePath
{
get
{
return cachePath;
}
set
{
cachePath = value;
}
}
public String ConfigurationFile
{
get
{
return configurationFile;
}
set
{
configurationFile = value;
}
}
public String DynamicBase
{
get
{
return dynamicBase;
}
set
{
dynamicBase = value;
}
}
public String LicenseFile
{
get
{
return licenseFile;
}
set
{
licenseFile = value;
}
}
public String PrivateBinPath
{
get
{
return privateBinPath;
}
set
{
privateBinPath = value;
}
}
public String PrivateBinPathProbe
{
get
{
return privateBinPathProbe;
}
set
{
privateBinPathProbe = value;
}
}
public String ShadowCopyDirectories
{
get
{
return shadowCopyDirectories;
}
set
{
shadowCopyDirectories = value;
}
}
public String ShadowCopyFiles
{
get
{
return shadowCopyFiles;
}
set
{
shadowCopyFiles = value;
}
}
// Other properties.
public bool DisallowPublisherPolicy
{
get
{
return disallowPublisherPolicy;
}
set
{
disallowPublisherPolicy = value;
}
}
public LoaderOptimization LoaderOptimization
{
get
{
return loaderOptimization;
}
set
{
loaderOptimization = value;
}
}
}; // class AppDomainSetup
#endif // !ECMA_COMPAT
}; // namespace System
--- NEW FILE ---
/*
* IAppDomainSetup.cs - Implementation of the "System.IAppDomainSetup" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System
{
#if !ECMA_COMPAT
public interface IAppDomainSetup
{
String ApplicationBase { get; set; }
String ApplicationName { get; set; }
String CachePath { get; set; }
String ConfigurationFile { get; set; }
String DynamicBase { get; set; }
String LicenseFile { get; set; }
String PrivateBinPath { get; set; }
String PrivateBinPathProbe { get; set; }
String ShadowCopyDirectories { get; set; }
String ShadowCopyFiles { get; set; }
}; // interface IAppDomainSetup
#endif // !ECMA_COMPAT
}; // namespace System
Index: AppDomain.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/AppDomain.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** AppDomain.cs 20 Dec 2001 10:11:39 -0000 1.5
--- AppDomain.cs 1 Feb 2003 03:31:45 -0000 1.6
***************
*** 22,29 ****
--- 22,34 ----
{
+ using System.Reflection;
+ using System.Globalization;
+ using System.Security.Policy;
+
public sealed class AppDomain : MarshalByRefObject, _AppDomain
{
// Internal state.
private String friendlyName;
+ private static AppDomain currentDomain;
// Construct a new AppDomain instance.
***************
*** 94,97 ****
--- 99,198 ----
// Event that is emitted when an exception is unhandled by the domain.
public event UnhandledExceptionEventHandler UnhandledException;
+
+ #if !ECMA_COMPAT
+
+ // Get the current domain.
+ [TODO]
+ public static AppDomain CurrentDomain
+ {
+ get
+ {
+ lock(typeof(AppDomain))
+ {
+ // TODO - this is a temporary
hack until the
+ // runtime engine has real app
domains.
+ if(currentDomain == null)
+ {
+ currentDomain = new
AppDomain("current");
+ }
+ return currentDomain;
+ }
+ }
+ }
+
+ // Get the security evidence that was used to load the app domain.
+ [TODO]
+ public Evidence Evidence
+ {
+ get
+ {
+ // TODO
+ return null;
+ }
+ }
+
+ // Event that is emitted to resolve assemblies.
+ public event ResolveEventHandler AssemblyResolve;
+
+ // Event that is emitted on process exit.
+ public event EventHandler ProcessExit;
+
+ // Event that is emitted to resolve resources.
+ public event ResolveEventHandler ResourceResolve;
+
+ // Event that is emitted to resolve types.
+ public event ResolveEventHandler TypeResolve;
+
+ // Get the assemblies in use by this domain.
+ [TODO]
+ public Assembly[] GetAssemblies()
+ {
+ // TODO
+ return new Assembly [0];
+ }
+
+ // Create a new application domain.
+ [TODO]
+ public static AppDomain CreateDomain(String friendlyName,
+
Evidence evidence,
+
AppDomainSetup setup)
+ {
+ if(friendlyName == null)
+ {
+ throw new
ArgumentNullException("friendlyName");
+ }
+ // TODO
+ return new AppDomain(friendlyName);
+ }
+
+ // Create an instance of an assembly and unwrap its handle.
+ [TODO]
+ public Object CreateInstanceAndUnwrap(String assemblyName, String
typeName)
+ {
+ // TODO
+ return null;
+ }
+ public Object CreateInstanceAndUnwrap(String assemblyName,
+
String typeName,
+
Object[] activationAttributes)
+ {
+ // TODO
+ return null;
+ }
+ public Object CreateInstanceAndUnwrap(String assemblyName,
+
String typeName,
+ bool
ignoreCase,
+
BindingFlags bindingAttr,
+
Binder binder,
+
Object[] args,
+
CultureInfo culture,
+
Object[] activationAttributes,
+
Evidence securityAttributes)
+ {
+ // TODO
+ return null;
+ }
+
+ #endif // !ECMA_COMPAT
}; // class AppDomain
Index: LoaderOptimization.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/LoaderOptimization.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** LoaderOptimization.cs 7 Aug 2001 22:51:39 -0000 1.1.1.1
--- LoaderOptimization.cs 1 Feb 2003 03:31:45 -0000 1.2
***************
*** 24,27 ****
--- 24,28 ----
public enum LoaderOptimization
{
+ NotSpecified = 0,
SingleDomain = 1,
MultiDomain = 2,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System AppDomainSetup.cs,NONE,1.1 IAppDomainSetup.cs,NONE,1.1 AppDomain.cs,1.5,1.6 LoaderOptimization.cs,1.1.1.1,1.2,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System ResolveEventArgs.cs,NONE,1.1 ResolveEventHandler.cs,NONE,1.1
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Policy Evidence.cs,1.2,1.3
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System ResolveEventArgs.cs,NONE,1.1 ResolveEventHandler.cs,NONE,1.1
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Policy Evidence.cs,1.2,1.3
- Index(es):