diff options
author | Tedd Hansen | 2007-08-18 18:18:14 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-18 18:18:14 +0000 |
commit | 1284369a329d3ae621c0ef0596d01d67e8c70e62 (patch) | |
tree | b6243963c10008b7aeb4ce9e2260becd3c2b21d0 /OpenSim/Region/ScriptEngine/DotNetEngine/MarshalByRefType.cs | |
parent | When teleporting to distant region, you can now go to the point you want to g... (diff) | |
download | opensim-SC_OLD-1284369a329d3ae621c0ef0596d01d67e8c70e62.zip opensim-SC_OLD-1284369a329d3ae621c0ef0596d01d67e8c70e62.tar.gz opensim-SC_OLD-1284369a329d3ae621c0ef0596d01d67e8c70e62.tar.bz2 opensim-SC_OLD-1284369a329d3ae621c0ef0596d01d67e8c70e62.tar.xz |
Started on AppDomains for ScriptEngine. Moved llFunctions in LSL_BaseClass.cs to LSL_BuiltIn_Commands.cs. Changed how scripts are loaded.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/MarshalByRefType.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/MarshalByRefType.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/MarshalByRefType.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/MarshalByRefType.cs new file mode 100644 index 0000000..36bb146 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/MarshalByRefType.cs | |||
@@ -0,0 +1,34 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using System.Threading; | ||
5 | |||
6 | namespace OpenSim.Region.ScriptEngine.DotNetEngine | ||
7 | { | ||
8 | // Because this class is derived from MarshalByRefObject, a proxy | ||
9 | // to a MarshalByRefType object can be returned across an AppDomain | ||
10 | // boundary. | ||
11 | public class MarshalByRefType : MarshalByRefObject | ||
12 | { | ||
13 | // Call this method via a proxy. | ||
14 | public void SomeMethod(string callingDomainName) | ||
15 | { | ||
16 | // Get this AppDomain's settings and display some of them. | ||
17 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; | ||
18 | Console.WriteLine("AppName={0}, AppBase={1}, ConfigFile={2}", | ||
19 | ads.ApplicationName, | ||
20 | ads.ApplicationBase, | ||
21 | ads.ConfigurationFile | ||
22 | ); | ||
23 | |||
24 | // Display the name of the calling AppDomain and the name | ||
25 | // of the second domain. | ||
26 | // NOTE: The application's thread has transitioned between | ||
27 | // AppDomains. | ||
28 | Console.WriteLine("Calling from '{0}' to '{1}'.", | ||
29 | callingDomainName, | ||
30 | Thread.GetDomain().FriendlyName | ||
31 | ); | ||
32 | } | ||
33 | } | ||
34 | } | ||