本文整理汇总了C#中IScriptModule类的典型用法代码示例。如果您正苦于以下问题:C# IScriptModule类的具体用法?C# IScriptModule怎么用?C# IScriptModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IScriptModule类属于命名空间,在下文中一共展示了IScriptModule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RegionLoaded
public void RegionLoaded(Scene scene)
{
m_scriptModule = scene.RequestModuleInterface<IScriptModule>();
if (m_scriptModule != null)
m_log.Info("[MODULE COMMANDS]: Script engine found, module active");
}
开发者ID:openmetaversefoundation,项目名称:fortis-opensim,代码行数:7,代码来源:ScriptModuleCommsModule.cs
示例2: Evaluate
/// <summary>
/// Execute code within a given module context and returns the result.
/// The module must be local with respect to the compiled code object.
/// </summary>
public object Evaluate(IScriptModule module) {
ScriptModule localModule;
if (module == null) {
localModule = RemoteWrapper.TryGetLocal<ScriptModule>(ScriptDomainManager.CurrentManager.Host.DefaultModule);
} else {
localModule = RemoteWrapper.GetLocalArgument<ScriptModule>(module, "module");
}
return _code.Run(localModule);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:15,代码来源:CompiledCode.cs
示例3: PublishModule
public void PublishModule(IScriptModule module, string publicName) {
_manager.PublishModule(RemoteWrapper.GetLocalArgument<ScriptModule>(module, "module"), publicName);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:3,代码来源:ScriptEnvironment.cs
示例4: RegionLoaded
public void RegionLoaded(IScene scene)
{
m_scriptModule = scene.RequestModuleInterface<IScriptModule>();
}
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:4,代码来源:ScriptsHttpRequests.cs
示例5: RequestSecureURL
public UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
{
UUID urlcode = UUID.Random();
string url = String.Empty;
if (m_HttpsServer == null)
{
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
return urlcode;
}
lock (m_UrlMap)
{
if (m_UrlMap.Count >= m_TotalUrls)
{
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
return urlcode;
}
url = m_HttpsServer.ServerURI + "/lslhttps/" + urlcode.ToString() + "/";
UrlData urlData = new UrlData
{
hostID = host.UUID,
itemID = itemID,
engine = engine,
url = url,
urlcode = urlcode,
requests = new List<UUID>()
};
m_UrlMap[url] = urlData;
}
string uri = "/lslhttps/" + urlcode.ToString() + "/";
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("POST", uri, AsyncHttpRequest));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("GET", uri, AsyncHttpRequest));
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });
return urlcode;
}
开发者ID:BogusCurry,项目名称:halcyon,代码行数:42,代码来源:UrlModule.cs
示例6: ModuleCreated
public void ModuleCreated(IScriptModule module) {
_host.ModuleCreated(module);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:3,代码来源:ScriptHost.Remote.cs
示例7: RequestSecureURL
public UUID RequestSecureURL(IScriptModule engine, ISceneChildEntity host, UUID itemID)
{
UUID urlcode = UUID.Random();
engine.PostScriptEvent(itemID, host.UUID, "http_request",
new Object[] {urlcode.ToString(), "URL_REQUEST_DENIED", ""});
return urlcode;
}
开发者ID:emperorstarfinder,项目名称:Virtual-Universe,代码行数:9,代码来源:UrlModule.cs
示例8: EvaluateAndWrap
public IObjectHandle EvaluateAndWrap(IScriptModule module) {
return _compiledCode.EvaluateAndWrap(module);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:3,代码来源:CompiledCode.Remote.cs
示例9: Execute
public void Execute(IScriptModule module) {
_compiledCode.Execute(module);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:3,代码来源:CompiledCode.Remote.cs
示例10: ModuleCreated
public virtual void ModuleCreated(IScriptModule module)
{
// nop
}
开发者ID:robertlj,项目名称:IronScheme,代码行数:4,代码来源:ScriptHost.cs
示例11: RequestSecureURL
public UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID, Hashtable options)
{
UUID urlcode = UUID.Random();
if (m_HttpsServer == null)
{
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
return urlcode;
}
lock (m_UrlMap)
{
if (m_UrlMap.Count >= TotalUrls)
{
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
return urlcode;
}
string url = "https://" + ExternalHostNameForLSL + ":" + m_HttpsServer.Port.ToString() + "/lslhttps/" + urlcode.ToString() + "/";
UrlData urlData = new UrlData();
urlData.hostID = host.UUID;
urlData.itemID = itemID;
urlData.engine = engine;
urlData.url = url;
urlData.urlcode = urlcode;
urlData.isSsl = true;
urlData.requests = new Dictionary<UUID, RequestData>();
urlData.allowXss = false;
if (options != null && options["allowXss"] != null)
urlData.allowXss = true;
m_UrlMap[url] = urlData;
string uri = "/lslhttps/" + urlcode.ToString() + "/";
PollServiceEventArgs args
= new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000);
args.Type = PollServiceEventArgs.EventType.LslHttp;
m_HttpsServer.AddPollServiceHTTPHandler(uri, args);
// m_log.DebugFormat(
// "[URL MODULE]: Set up incoming secure request url {0} for {1} in {2} {3}",
// uri, itemID, host.Name, host.LocalId);
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });
}
return urlcode;
}
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:50,代码来源:UrlModule.cs
示例12: AddRegion
public void AddRegion(Scene scene)
{
m_scene = scene;
m_scene.RegisterModuleInterface<IWorldComm>(this);
m_scriptModule = scene.RequestModuleInterface<IScriptModule> ();
m_scene.EventManager.OnChatFromClient += DeliverClientMessage;
m_scene.EventManager.OnChatBroadcast += DeliverClientMessage;
}
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:8,代码来源:WorldCommModule.cs
示例13: PublishModule
public void PublishModule(IScriptModule module, string publicName) {
_manager.Environment.PublishModule(module, publicName);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:3,代码来源:ScriptEnvironment.Remote.cs
示例14: CodeSenseProvider
public CodeSenseProvider(IScriptEngine engine, IScriptModule module) {
Contract.RequiresNotNull(engine, "engine");
_engine = engine;
_module = module;
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:5,代码来源:CodeSenseProvider.cs
示例15: Evaluate
/// <summary>
/// Execute code within a given module context and returns the result.
/// The module must be local with respect to the compiled code object.
/// </summary>
public object Evaluate(IScriptModule module)
{
IScriptModule localModule;
if (module == null) {
localModule = ScriptDomainManager.CurrentManager.Host.DefaultModule;
} else {
localModule = module;
}
return _code.Run((ScriptModule)localModule);
}
开发者ID:robertlj,项目名称:IronScheme,代码行数:16,代码来源:CompiledCode.cs
示例16: RegisterNewReceiver
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
{
scriptEngine.PostScriptEvent(itemID, objectID, "xmlrpc_uri", new Object[] {uri});
}
开发者ID:NickyPerian,项目名称:Aurora,代码行数:4,代码来源:XmlRpcRouterModule.cs
示例17: ModuleCreated
public virtual void ModuleCreated(IScriptModule module) {
Contract.RequiresNotNull(module, "module");
Debug.Assert(_remoteHost != null);
_remoteHost.ModuleCreated(RemoteWrapper.WrapRemotable<IScriptModule>(module));
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:5,代码来源:ScriptHost.Local.cs
示例18: Evaluate
// throws SerializationException
public object Evaluate(IScriptModule module) {
return _compiledCode.Evaluate(module);
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:4,代码来源:CompiledCode.Remote.cs
示例19: RegionLoaded
public void RegionLoaded(IScene scene)
{
if (IsEnabled() && !m_httpServerStarted)
{
m_httpServerStarted = true;
// Start http server
// Attach xmlrpc handlers
MainConsole.Instance.Info("[XMLRPC MODULE]: " +
"Starting up XMLRPC Server on port " + m_remoteDataPort +
" for llRemoteData commands.");
IHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort, MainServer.Instance.HostName,
false, 1);
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
httpServer.Start();
}
m_scriptModule = scene.RequestModuleInterface<IScriptModule>();
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:17,代码来源:XMLRPCModule.cs
示例20: RegisterNewReceiver
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
{
if (!m_Channels.ContainsKey(itemID))
{
XmlRpcInfo info = new XmlRpcInfo();
info.channel = channel;
info.uri = uri;
bool success = SynchronousRestObjectPoster.BeginPostObject<XmlRpcInfo, bool>(
"POST", m_ServerURI+"/RegisterChannel/", info);
if (!success)
{
m_log.Error("[XMLRPC GRID ROUTER] Error contacting server");
}
m_Channels[itemID] = channel;
}
}
开发者ID:openmetaversefoundation,项目名称:fortis-opensim,代码行数:19,代码来源:XmlRpcGridRouterModule.cs
注:本文中的IScriptModule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论