2004-07-13 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 13 Jul 2004 16:35:31 +0000 (16:35 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 13 Jul 2004 16:35:31 +0000 (16:35 -0000)
* ActivationContext.cs: New class in Fx 2.0. Required for
System.Security.Policy.
* ApplicationIdentity.cs: New class in Fx 2.0. Required for
System.Security.Policy.
* IApplicationDescription.cs: New interface in Fx 2.0. Required for
System.Security.Policy.
* IHostContext.cs: New interface in Fx 2.0. Required for
System.Security.Policy.

svn path=/trunk/mcs/; revision=31094

mcs/class/corlib/System/ActivationContext.cs [new file with mode: 0644]
mcs/class/corlib/System/ApplicationIdentity.cs [new file with mode: 0644]
mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/IApplicationDescription.cs [new file with mode: 0644]
mcs/class/corlib/System/IHostContext.cs [new file with mode: 0644]

diff --git a/mcs/class/corlib/System/ActivationContext.cs b/mcs/class/corlib/System/ActivationContext.cs
new file mode 100644 (file)
index 0000000..5207a61
--- /dev/null
@@ -0,0 +1,109 @@
+//
+// System.ActivationContext class
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System {
+
+       public sealed class ActivationContext : IDisposable {
+
+               [Serializable]
+               public enum ContextForm {
+                       Loose = 1,
+                       StoreBounded
+               }
+
+               private ContextForm _form;
+               private ApplicationIdentity _appid;
+               private bool _disposed;
+
+               private ActivationContext (ApplicationIdentity identity)
+               {
+                       _appid = identity;
+               }
+
+               ~ActivationContext ()
+               {
+                       Dispose (false);
+               }
+
+               [MonoTODO ("default ?")]
+               public ContextForm Form {
+                       get { return _form; }
+               }
+
+               public ApplicationIdentity Identity {
+                       get { return _appid; }
+               }
+
+               [MonoTODO]
+               static public ActivationContext CreatePartialActivationContext (ApplicationIdentity identity)
+               {
+                       if (identity == null)
+                               throw new ArgumentNullException ("identity");
+
+                       // TODO - throw new ArgumentException
+                       // - for invalid ApplicationIdentity
+
+                       return new ActivationContext (identity);
+               }
+
+               [MonoTODO]
+               static public ActivationContext CreatePartialActivationContext (ApplicationIdentity identity, string[] manifestPaths)
+               {
+                       if (identity == null)
+                               throw new ArgumentNullException ("identity");
+                       if (manifestPaths == null)
+                               throw new ArgumentNullException ("manifestPaths");
+
+                       // TODO - throw new ArgumentException
+                       // - for invalid ApplicationIdentity
+                       // - not matching manifests
+                       // - number components != # manifest paths
+
+                       return new ActivationContext (identity);
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               void Dispose (bool disposing)
+               {
+                       if (_disposed) {
+                               if (disposing) {
+                               }
+                               _disposed = true;
+                       }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/corlib/System/ApplicationIdentity.cs b/mcs/class/corlib/System/ApplicationIdentity.cs
new file mode 100644 (file)
index 0000000..d95274f
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// System.ApplicationIdentity class
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System {
+
+       public sealed class ApplicationIdentity {
+
+               private string _fullName;
+               private string _codeBase;
+
+               public ApplicationIdentity (string applicationIdentityFullName)
+               {
+                       _fullName = applicationIdentityFullName;
+               }
+
+               [MonoTODO ("URL but where does it comes from?")]
+               public string CodeBase {
+                       get { return _codeBase; }
+               }
+
+               public string FullName {
+                       get { return _fullName; }
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       return base.ToString ();
+               }
+       }
+}
+
+#endif
index 74cd84993ccb2f27f0c5c7adff560ed803b650e8..c42943a0c7e38b3586bd103f11faf76350c9481f 100644 (file)
@@ -1,3 +1,14 @@
+2004-07-13  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * ActivationContext.cs: New class in Fx 2.0. Required for 
+       System.Security.Policy.
+       * ApplicationIdentity.cs: New class in Fx 2.0. Required for 
+       System.Security.Policy.
+       * IApplicationDescription.cs: New interface in Fx 2.0. Required for 
+       System.Security.Policy.
+       * IHostContext.cs: New interface in Fx 2.0. Required for 
+       System.Security.Policy.
+
 2004-07-12  Geoff Norton <gnorton@customerdna.com>
 
        * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
diff --git a/mcs/class/corlib/System/IApplicationDescription.cs b/mcs/class/corlib/System/IApplicationDescription.cs
new file mode 100644 (file)
index 0000000..d8bc0fd
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// System.IApplicationDescription interface
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System {
+
+       public interface IApplicationDescription : ICloneable {
+
+               string ApplicationCodeBase {
+                       get;
+               }
+
+               string ApplicationManifest {
+                       get;
+               }
+
+               string ApplicationManifestPath {
+                       get;
+               }
+
+               string DeploymentCodeBase {
+                       get;
+               }
+
+               string DeploymentManifest {
+                       get;
+               }
+
+               string DeploymentManifestPath {
+                       get;
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/corlib/System/IHostContext.cs b/mcs/class/corlib/System/IHostContext.cs
new file mode 100644 (file)
index 0000000..bcdb7a2
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// System.IHostContext interface
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System {
+
+       public interface IHostContext {
+
+               bool AssumeTrust {
+                       get;
+               }
+
+               bool ExclusiveGrant {
+                       get;
+               }
+
+               bool IsFirstTimeInstall {
+                       get;
+               }
+
+               bool NoPrompt {
+                       get;
+               }
+
+               bool Persist {
+                       get;
+               }
+       }
+}
+
+#endif