aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs
diff options
context:
space:
mode:
authorTedd Hansen2008-11-08 17:35:48 +0000
committerTedd Hansen2008-11-08 17:35:48 +0000
commit9511a8c76370f21e839114007dcd2b25c69b009a (patch)
treeb63323dfd96ecd1cc3cd560939bd66bb43ec9c1c /OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs
parent* Added IClientIM to IClientCore interfaces (diff)
downloadopensim-SC-9511a8c76370f21e839114007dcd2b25c69b009a.zip
opensim-SC-9511a8c76370f21e839114007dcd2b25c69b009a.tar.gz
opensim-SC-9511a8c76370f21e839114007dcd2b25c69b009a.tar.bz2
opensim-SC-9511a8c76370f21e839114007dcd2b25c69b009a.tar.xz
Work in progress on SECS stuff. Have been holding it off until after 0.6 release. Still messy as hell and doesn't really work yet. Will undergo dramatic changes. AND MOST IMPORTANTLY: Will be conformed to work in coop with todays DNE and XEngine, hopefully one day providing a common interface for all components.
Diffstat (limited to 'OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs')
-rw-r--r--OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs b/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs
new file mode 100644
index 0000000..587314f
--- /dev/null
+++ b/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs
@@ -0,0 +1,45 @@
1using System;
2using System.Collections.Generic;
3using System.Reflection;
4using System.Runtime.Remoting.Lifetime;
5using System.Text;
6
7namespace ScriptAssemblies
8{
9 public class ScriptBase : MarshalByRefObject, IScript
10 {
11
12 #region AppDomain Serialization Keep-Alive
13 //
14 // Never expire this object
15 //
16 public override Object InitializeLifetimeService()
17 {
18 ILease lease = (ILease)base.InitializeLifetimeService();
19
20 if (lease.CurrentState == LeaseState.Initial)
21 {
22 lease.InitialLeaseTime = TimeSpan.Zero;
23 }
24 return lease;
25 }
26 #endregion
27
28 public delegate void ExecuteFunctionEventDelegate(string functionName, params object[] args);
29 public event ExecuteFunctionEventDelegate OnExecuteFunction;
30
31 private List<ICommandProvider> CommandProviders = new List<ICommandProvider>();
32
33 public ScriptBase()
34 {
35 }
36
37 public void ExecuteFunction(string functionName, params object[] args)
38 {
39 // We got a new command, fire event
40 if (OnExecuteFunction != null)
41 OnExecuteFunction(functionName, args);
42
43 }
44 }
45}