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.

This commit is contained in:
Tedd Hansen
2008-11-08 17:35:48 +00:00
parent cf0a14bec9
commit 9511a8c763
53 changed files with 2997 additions and 573 deletions

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ScriptAssemblies
{
public interface ICommandProvider
{
void ExecuteCommand(string functionName, params object[] args);
string Name { get; }
}
}

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ScriptAssemblies
{
public interface IScript
{
void ExecuteFunction(string functionName, params object[] args);
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.ScriptEngine.Shared.Script")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("OpenSim.ScriptEngine.Shared.Script")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ea77002b-c967-4368-ace9-6533f8147d4b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Remoting.Lifetime;
using System.Text;
namespace ScriptAssemblies
{
public class ScriptBase : MarshalByRefObject, IScript
{
#region AppDomain Serialization Keep-Alive
//
// Never expire this object
//
public override Object InitializeLifetimeService()
{
ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
{
lease.InitialLeaseTime = TimeSpan.Zero;
}
return lease;
}
#endregion
public delegate void ExecuteFunctionEventDelegate(string functionName, params object[] args);
public event ExecuteFunctionEventDelegate OnExecuteFunction;
private List<ICommandProvider> CommandProviders = new List<ICommandProvider>();
public ScriptBase()
{
}
public void ExecuteFunction(string functionName, params object[] args)
{
// We got a new command, fire event
if (OnExecuteFunction != null)
OnExecuteFunction(functionName, args);
}
}
}