Author: rolf
Date: 2007-10-10 03:41:47 -0400 (Wed, 10 Oct 2007)
New Revision: 87240
Modified:
trunk/olive/class/agmono/Mono/ChangeLog
trunk/olive/class/agmono/Mono/XamlLoaderCallbacks.cs
Log:
* Mono/XamlLoaderCallbacks.cs: Moved the static surface and plugin
fields here from ManagedXamlLoader.
Modified: trunk/olive/class/agmono/Mono/ChangeLog
===================================================================
--- trunk/olive/class/agmono/Mono/ChangeLog 2007-10-10 06:42:42 UTC (rev
87239)
+++ trunk/olive/class/agmono/Mono/ChangeLog 2007-10-10 07:41:47 UTC (rev
87240)
@@ -1,3 +1,8 @@
+2007-10-10 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * XamlLoaderCallbacks.cs: Moved the static surface and plugin fields
here
+ from ManagedXamlLoader.
+
2007-10-08 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* NativeMethods.cs: Add a few more native methods.
Modified: trunk/olive/class/agmono/Mono/XamlLoaderCallbacks.cs
===================================================================
--- trunk/olive/class/agmono/Mono/XamlLoaderCallbacks.cs 2007-10-10
06:42:42 UTC (rev 87239)
+++ trunk/olive/class/agmono/Mono/XamlLoaderCallbacks.cs 2007-10-10
07:41:47 UTC (rev 87240)
@@ -58,7 +58,42 @@
public abstract class XamlLoader : MarshalByRefObject
{
+ // Contains any surface/plugins already loaded in the current
domain.
+ private static IntPtr surface_in_domain;
+ private static IntPtr plugin_in_domain;
+
public abstract void Setup (IntPtr native_loader, IntPtr
plugin, IntPtr surface, string filename, string contents);
+
+ public static IntPtr SurfaceInDomain {
+ get {
+ return surface_in_domain;
+ }
+ set {
+ if (value == IntPtr.Zero || (value ==
surface_in_domain && value != IntPtr.Zero))
+ return;
+
+ if (surface_in_domain != IntPtr.Zero) {
+ Console.Error.WriteLine ("There already
is a surface in this AppDomain.");
+ } else {
+ surface_in_domain = value;
+ }
+ }
+ }
+ public static IntPtr PluginInDomain {
+ get {
+ return plugin_in_domain;
+ }
+ set {
+ if (value == IntPtr.Zero || (value ==
plugin_in_domain && value != IntPtr.Zero))
+ return;
+
+ if (plugin_in_domain != IntPtr.Zero) {
+ Console.Error.WriteLine ("There already
is a plugin in this AppDomain.");
+ } else {
+ plugin_in_domain = value;
+ }
+ }
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches