• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AuroraDotNetEngine.ScriptData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Aurora.ScriptEngine.AuroraDotNetEngine.ScriptData的典型用法代码示例。如果您正苦于以下问题:C# ScriptData类的具体用法?C# ScriptData怎么用?C# ScriptData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ScriptData类属于Aurora.ScriptEngine.AuroraDotNetEngine命名空间,在下文中一共展示了ScriptData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Deserialize

        public static void Deserialize(ScriptData instance, ScriptEngine engine, StateSave save)
        {
            Dictionary<string, object> vars = save.Variables as Dictionary<string, object>;
            instance.State = save.State;
            instance.Running = save.Running;

            if (vars != null && vars.Count != 0)
                instance.Script.SetStoreVars(vars);

            if(save.Plugins is object[])
                instance.PluginData = (object[])save.Plugins;
            else
                instance.PluginData = new object[1] {(object)save.Plugins};

            if (save.Permissions != " " && save.Permissions != "")
            {
                instance.InventoryItem.PermsGranter = new UUID(save.Permissions.Split(',')[0]);
                instance.InventoryItem.PermsMask = int.Parse(save.Permissions.Split(',')[1], NumberStyles.Integer, Culture.NumberFormatInfo);
            }
            instance.EventDelayTicks = (long)save.MinEventDelay;
            instance.AssemblyName = save.AssemblyName;
            instance.Disabled = save.Disabled;
            instance.UserInventoryItemID = save.UserInventoryID;
            // Add it to our script memstruct
            ScriptEngine.ScriptProtection.AddNewScript(instance);
        }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:26,代码来源:ScriptDataSerializers.cs


示例2: SaveStateTo

        public void SaveStateTo (ScriptData script)
        {
            StateSave stateSave = new StateSave ();
            stateSave.State = script.State;
            stateSave.ItemID = script.ItemID;
            stateSave.Running = script.Running;
            stateSave.MinEventDelay = script.EventDelayTicks;
            stateSave.Disabled = script.Disabled;
            stateSave.UserInventoryID = script.UserInventoryItemID;
            //Allow for the full path to be put down, not just the assembly name itself
            stateSave.AssemblyName = script.AssemblyName;
            stateSave.Source = script.Source;
            if (script.InventoryItem != null)
            {
                stateSave.PermsGranter = script.InventoryItem.PermsGranter;
                stateSave.PermsMask = script.InventoryItem.PermsMask;
            }
            else
            {
                stateSave.PermsGranter = UUID.Zero;
                stateSave.PermsMask = 0;
            }
            stateSave.TargetOmegaWasSet = script.TargetOmegaWasSet;

            //Vars
            Dictionary<string, Object> vars = new Dictionary<string, object> ();
            if (script.Script != null)
                vars = script.Script.GetStoreVars ();
            stateSave.Variables = WebUtils.BuildXmlResponse (vars);

            //Plugins
            stateSave.Plugins = m_module.GetSerializationData (script.ItemID, script.Part.UUID);

            CreateOSDMapForState (script, stateSave);
        }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:35,代码来源:ScriptDataSerializers.cs


示例3: SaveStateTo

        public void SaveStateTo(ScriptData script, bool forced, bool saveBackup)
        {
            if (!forced)
            {
                if (script.Script == null)
                    return; //If it didn't compile correctly, this happens
                if (!script.Script.NeedsStateSaved)
                    return; //If it doesn't need a state save, don't save one
            }
            if (script.Script != null)
                script.Script.NeedsStateSaved = false;
            if (saveBackup)
                script.Part.ParentEntity.HasGroupChanged = true;
            StateSave stateSave = new StateSave
                                      {
                                          State = script.State,
                                          ItemID = script.ItemID,
                                          Running = script.Running,
                                          MinEventDelay = script.EventDelayTicks,
                                          Disabled = script.Disabled,
                                          UserInventoryID = script.UserInventoryItemID,
                                          AssemblyName = script.AssemblyName,
                                          Compiled = script.Compiled,
                                          Source = script.Source
                                      };
            //Allow for the full path to be put down, not just the assembly name itself
            if (script.InventoryItem != null)
            {
                stateSave.PermsGranter = script.InventoryItem.PermsGranter;
                stateSave.PermsMask = script.InventoryItem.PermsMask;
            }
            else
            {
                stateSave.PermsGranter = UUID.Zero;
                stateSave.PermsMask = 0;
            }
            stateSave.TargetOmegaWasSet = script.TargetOmegaWasSet;

            //Vars
            Dictionary<string, Object> vars = new Dictionary<string, object>();
            if (script.Script != null)
                vars = script.Script.GetStoreVars();
            try
            {
                stateSave.Variables = WebUtils.BuildXmlResponse(vars);
            }
            catch
            {
            }

            //Plugins
            stateSave.Plugins = m_module.GetSerializationData(script.ItemID, script.Part.UUID);

            CreateOSDMapForState(script, stateSave);
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:55,代码来源:ScriptDataSerializers.cs


示例4: SaveState

        public static void SaveState(ScriptData instance, ScriptEngine engine)
        {
            StateSave Insert = new StateSave();
            Insert.State = instance.State;
            Insert.ItemID = instance.ItemID;
            string source = instance.Source.Replace("\n", " ");
            Insert.Source = source.Replace("'", " ");
            Insert.Running = instance.Running;
            //Vars
            Dictionary<string, Object> vars = new Dictionary<string, object>();
            if (instance.Script != null)
                vars = instance.Script.GetVars();
            string varsmap = "";
            foreach (KeyValuePair<string, Object> var in vars)
            {
                varsmap += var.Key + "," + var.Value + "\n";
            }
            Insert.Variables = varsmap;
            //Plugins
            object[] Plugins = engine.GetSerializationData( instance.ItemID, instance.part.UUID);
            string plugins = "";
            foreach (object plugin in Plugins)
                plugins += plugin + ",";
            Insert.Plugins = plugins;

            //perms
            string perms = "";
            if (instance.InventoryItem != null)
            {
                if (instance.InventoryItem.PermsMask != 0 && instance.InventoryItem.PermsGranter != UUID.Zero)
                {
                    perms += instance.InventoryItem.PermsGranter.ToString() + "," + instance.InventoryItem.PermsMask.ToString();

                }
            }
            Insert.Permissions = perms;

            Insert.MinEventDelay = instance.EventDelayTicks;
            string[] AN = instance.AssemblyName.Split('\\');
            if(AN.Length > 2)
                Insert.AssemblyName = instance.AssemblyName.Split('\\')[2];
            else
            	Insert.AssemblyName = instance.AssemblyName;
            Insert.Disabled = instance.Disabled;
            Insert.UserInventoryID = instance.UserInventoryItemID;
            IScriptDataConnector ScriptFrontend = Aurora.DataManager.DataManager.RequestPlugin<IScriptDataConnector>();
            if(ScriptFrontend != null)
                ScriptFrontend.SaveStateSave(Insert);
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:49,代码来源:ScriptDataSerializers.cs


示例5: DeleteFrom

 public void DeleteFrom(ScriptData script)
 {
     bool changed = false;
     lock (StateSaveLock)
     {
         //if we did remove something, resave it
         if (script.Part.StateSaves.Remove(script.ItemID))
             changed = true;
         if (script.Part.StateSaves.Remove(script.InventoryItem.OldItemID))
             changed = true;
         if (script.Part.StateSaves.Remove(script.InventoryItem.ItemID))
             changed = true;
     }
     if (changed)
         script.Part.ParentEntity.HasGroupChanged = true;
 }
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:16,代码来源:ScriptDataSerializers.cs


示例6: AddEventSchQueue

        public void AddEventSchQueue(ScriptData ID, string FunctionName, DetectParams[] qParams, EventPriority priority,
                                     params object[] param)
        {
            QueueItemStruct QIS;

            if (ID == null || ID.Script == null || ID.IgnoreNew)
                return;

            if (!ID.SetEventParams(FunctionName, qParams)) // check events delay rules
                return;

            QIS = new QueueItemStruct
                      {
                          EventsProcData = new ScriptEventsProcData(),
                          ID = ID,
                          functionName = FunctionName,
                          llDetectParams = qParams,
                          param = param,
                          VersionID = Interlocked.Read(ref ID.VersionID),
                          State = ID.State,
                          CurrentlyAt = null
                      };

            ScriptEvents.Enqueue(QIS);

            long threadCount = Interlocked.Read(ref scriptThreadpool.nthreads);
            if (threadCount == 0 || threadCount < (ScriptEvents.Count + (SleepingScriptEventCount/2))*EventPerformance)
            {
                scriptThreadpool.QueueEvent(eventLoop, 2);
            }
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:31,代码来源:MaintenanceThread.cs


示例7: RemoveFromEventSchQueue

        public void RemoveFromEventSchQueue(ScriptData ID, bool abortcur)
        {
            if (ID == null)
                return;

            //Ignore any events to be added after this
            ID.IgnoreNew = true;
            //Clear out the old events
            Interlocked.Increment(ref ID.VersionID);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:10,代码来源:MaintenanceThread.cs


示例8: DeleteFrom

 public void DeleteFrom(ScriptData script)
 {
     OSDMap component = m_manager.GetComponentState(script.Part, m_componentName) as OSDMap;
     //Attempt to find the state saves we have
     if (component != null)
     {
         bool changed = false;
         //if we did remove something, resave it
         if (component.Remove(script.ItemID.ToString()))
             changed = true;
         if (component.Remove(script.InventoryItem.OldItemID.ToString()))
             changed = true;
         if (component.Remove(script.InventoryItem.ItemID.ToString()))
             changed = true;
         if (changed)
         {
             if (component.Count == 0)
                 m_manager.RemoveComponentState(script.Part.UUID, m_componentName);
             else
                 m_manager.SetComponentState(script.Part, m_componentName, component);
             script.Part.ParentEntity.HasGroupChanged = true;
         }
     }
 }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:24,代码来源:ScriptDataSerializers.cs


示例9: Deserialize

        public void Deserialize(ScriptData instance, StateSave save)
        {
            instance.State = save.State;
            instance.Running = save.Running;
            instance.EventDelayTicks = (long)save.MinEventDelay;
            instance.AssemblyName = save.AssemblyName;
            instance.Disabled = save.Disabled;
            instance.UserInventoryItemID = save.UserInventoryID;
            instance.PluginData = save.Plugins;
            m_module.CreateFromData(instance.Part.UUID, instance.ItemID, instance.Part.UUID,
                                    instance.PluginData);
            instance.Source = save.Source;
            instance.InventoryItem.PermsGranter = save.PermsGranter;
            instance.InventoryItem.PermsMask = save.PermsMask;
            instance.TargetOmegaWasSet = save.TargetOmegaWasSet;

            try
            {
                Dictionary<string, object> vars = WebUtils.ParseXmlResponse(save.Variables);
                if (vars != null && vars.Count != 0 || instance.Script != null)
                    instance.Script.SetStoreVars(vars);
            }
            catch
            {
            }
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:26,代码来源:ScriptDataSerializers.cs


示例10: AddEventSchQueue

        public void AddEventSchQueue(ScriptData ID, string FunctionName, DetectParams[] qParams, EventPriority priority, params object[] param)
        {
            QueueItemStruct QIS;

            if (ID == null || ID.Script == null || ID.IgnoreNew)
                return;

            if (!ID.SetEventParams(FunctionName, qParams)) // check events delay rules
                return;

            QIS = new QueueItemStruct();
            QIS.EventsProcData = new ScriptEventsProcData ();
            QIS.ID = ID;
            QIS.functionName = FunctionName;
            QIS.llDetectParams = qParams;
            QIS.param = param;
            QIS.VersionID = Interlocked.Read(ref ID.VersionID);
            QIS.State = ID.State;
            QIS.CurrentlyAt = null;

            lock (ScriptEvents)
            {
                ScriptEvents.Enqueue (QIS);
                ScriptEventCount++;
#if Debug
                m_log.Warn (ScriptEventCount + ", " + QIS.functionName);
#endif
            }

            long threadCount = Interlocked.Read (ref scriptThreadpool.nthreads);
            if (threadCount == 0 || threadCount < (ScriptEventCount + (SleepingScriptEventCount / 2)) * EventPerformance)
            {
                scriptThreadpool.QueueEvent (eventLoop, 2);
            }
        }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:35,代码来源:MaintenanceThread.cs


示例11: AddNewScript

 public void AddNewScript(ScriptData ID)
 {
     lock (Scripts)
     {
         ScriptsItems[ID.ItemID] = ID.part.UUID;
         Dictionary<UUID, ScriptData> Instances = new Dictionary<UUID, ScriptData>();
         if (!Scripts.TryGetValue(ID.part.UUID, out Instances))
         {
             Instances = new Dictionary<UUID, ScriptData>();
         }
         Instances[ID.ItemID] = ID;
         Scripts[ID.part.UUID] = Instances;
     }
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:14,代码来源:ScriptProtectionModule.cs


示例12: AddPreviouslyCompiled

 public void AddPreviouslyCompiled(string source, ScriptData ID)
 {
     lock (PreviouslyCompiled)
     {
         if (!PreviouslyCompiled.ContainsKey(source))
         {
             PreviouslyCompiled.Add(source, ID.AssemblyName);
         }
     }
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:10,代码来源:ScriptProtectionModule.cs


示例13: SetXMLState

        public static void SetXMLState(string xml, ScriptData instance, ScriptEngine engine)
        {
            XmlDocument doc = new XmlDocument();

            Dictionary<string, object> vars = instance.Script.GetVars();

            doc.LoadXml(xml);

            XmlNodeList rootL = doc.GetElementsByTagName("ScriptState");
            if (rootL.Count != 1)
            {
                return;
            }
            XmlNode rootNode = rootL[0];

            if (rootNode != null)
            {
                object varValue;
                XmlNodeList partL = rootNode.ChildNodes;

                foreach (XmlNode part in partL)
                {
                    switch (part.Name)
                    {
                        case "State":
                            instance.State = part.InnerText;
                            break;
                        case "Running":
                            instance.Running = bool.Parse(part.InnerText);
                            break;
                        case "Variables":
                            XmlNodeList varL = part.ChildNodes;
                            foreach (XmlNode var in varL)
                            {
                                string varName;
                                varValue = ReadTypedValue(var, out varName);

                                if (vars.ContainsKey(varName))
                                    vars[varName] = varValue;
                            }
                            instance.Script.SetVars(vars);
                            break;
                        case "Plugins":
                            instance.PluginData = ReadList(part).Data;
                            break;
                        case "Permissions":
                            string tmpPerm;
                            int mask = 0;
                            tmpPerm = part.Attributes.GetNamedItem("mask").Value;
                            if (tmpPerm != null)
                            {
                                int.TryParse(tmpPerm, out mask);
                                if (mask != 0)
                                {
                                    tmpPerm = part.Attributes.GetNamedItem("granter").Value;
                                    if (tmpPerm != null)
                                    {
                                        UUID granter = new UUID();
                                        UUID.TryParse(tmpPerm, out granter);
                                        if (granter != UUID.Zero)
                                        {
                                            instance.InventoryItem.PermsMask = mask;
                                            instance.InventoryItem.PermsGranter = granter;
                                        }
                                    }
                                }
                            }
                            break;
                        case "MinEventDelay":
                            double minEventDelay = 0.0;
                            double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay);
                            instance.EventDelayTicks = (long)minEventDelay;
                            break;
                    }
                }
            }
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:77,代码来源:ScriptDataSerializers.cs


示例14: GetXMLState

        public static string GetXMLState(ScriptData instance, ScriptEngine engine)
        {
            if (instance.Script == null)
                return "";
            //Update PluginData
            instance.PluginData = engine.GetSerializationData(instance.ItemID, instance.part.UUID);

            bool running = instance.Running;

            XmlDocument xmldoc = new XmlDocument();

            XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
                                                "", "");
            xmldoc.AppendChild(xmlnode);

            XmlElement rootElement = xmldoc.CreateElement("", "ScriptState",
                                                          "");
            xmldoc.AppendChild(rootElement);

            XmlElement state = xmldoc.CreateElement("", "State", "");
            state.AppendChild(xmldoc.CreateTextNode(instance.State));

            rootElement.AppendChild(state);

            XmlElement run = xmldoc.CreateElement("", "Running", "");
            run.AppendChild(xmldoc.CreateTextNode(
                    running.ToString()));

            rootElement.AppendChild(run);

            Dictionary<string, Object> vars = instance.Script.GetVars();

            XmlElement variables = xmldoc.CreateElement("", "Variables", "");

            foreach (KeyValuePair<string, Object> var in vars)
                WriteTypedValue(xmldoc, variables, "Variable", var.Key,
                                var.Value);

            rootElement.AppendChild(variables);

            #region Queue

            //We don't do queue...
            XmlElement queue = xmldoc.CreateElement("", "Queue", "");
            rootElement.AppendChild(queue);

            #endregion

            XmlNode plugins = xmldoc.CreateElement("", "Plugins", "");
            DumpList(xmldoc, plugins,
                     new LSL_Types.list(instance.PluginData));

            rootElement.AppendChild(plugins);

            if (instance.InventoryItem != null)
            {
                if (instance.InventoryItem.PermsMask != 0 && instance.InventoryItem.PermsGranter != UUID.Zero)
                {
                    XmlNode permissions = xmldoc.CreateElement("", "Permissions", "");
                    XmlAttribute granter = xmldoc.CreateAttribute("", "granter", "");
                    granter.Value = instance.InventoryItem.PermsGranter.ToString();
                    permissions.Attributes.Append(granter);
                    XmlAttribute mask = xmldoc.CreateAttribute("", "mask", "");
                    mask.Value = instance.InventoryItem.PermsMask.ToString();
                    permissions.Attributes.Append(mask);
                    rootElement.AppendChild(permissions);
                }
            }

            if (instance.EventDelayTicks > 0.0)
            {
                XmlElement eventDelay = xmldoc.CreateElement("", "MinEventDelay", "");
                eventDelay.AppendChild(xmldoc.CreateTextNode(instance.EventDelayTicks.ToString()));
                rootElement.AppendChild(eventDelay);
            }
            Type type = instance.Script.GetType();
            FieldInfo[] mi = type.GetFields();
            string xml = xmldoc.InnerXml;

            XmlDocument sdoc = new XmlDocument();
            sdoc.LoadXml(xml);
            XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState");
            XmlNode rootNode = rootL[0];

            // Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
            XmlDocument doc = new XmlDocument();
            XmlElement stateData = doc.CreateElement("", "State", "");
            XmlAttribute stateID = doc.CreateAttribute("", "UUID", "");
            stateID.Value = instance.ItemID.ToString();
            stateData.Attributes.Append(stateID);
            XmlAttribute assetID = doc.CreateAttribute("", "Asset", "");
            assetID.Value = instance.InventoryItem.AssetID.ToString();
            stateData.Attributes.Append(assetID);
            XmlAttribute engineName = doc.CreateAttribute("", "Engine", "");
            engineName.Value = engine.ScriptEngineName;
            stateData.Attributes.Append(engineName);
            doc.AppendChild(stateData);

            // Add <ScriptState>...</ScriptState>
            XmlNode xmlstate = doc.ImportNode(rootNode, true);
//.........这里部分代码省略.........
开发者ID:shangcheng,项目名称:Aurora,代码行数:101,代码来源:ScriptDataSerializers.cs


示例15: DeleteFrom

 public void DeleteFrom (ScriptData script)
 {
     OSDMap component = m_manager.GetComponentState (script.Part, m_componentName) as OSDMap;
     //Attempt to find the state saves we have
     if (component != null)
     {
         //if we did remove something, resave it
         if(component.Remove(script.ItemID.ToString()))
         {
             if (component.Count == 0)
                 m_manager.RemoveComponentState(script.Part.UUID, m_componentName);
             else
                 m_manager.SetComponentState (script.Part, m_componentName, component);
         }
     }
 }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:16,代码来源:ScriptDataSerializers.cs


示例16: AddEventSchQueue

        public void AddEventSchQueue(ScriptData ID, string FunctionName, DetectParams[] qParams, int VersionID, params object[] param)
        {
            QueueItemStruct QIS = new QueueItemStruct();
            QIS.ID = ID;
            QIS.functionName = FunctionName;
            QIS.llDetectParams = qParams;
            QIS.param = param;
            QIS.VersionID = VersionID;
            QIS.State = ID.State;

            AddEventSchQIS(QIS);
        }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:12,代码来源:MaintenanceThread.cs


示例17: RemoveScript

 public void RemoveScript(ScriptData Data)
 {
     lock (ScriptsItems)
     {
         ScriptsItems.Remove(Data.ItemID);
     }
     lock (Scripts)
     {
         Dictionary<UUID, ScriptData> Instances = new Dictionary<UUID, ScriptData>();
         if (Scripts.ContainsKey(Data.Part.UUID))
         {
             Instances = Scripts[Data.Part.UUID];
             Instances.Remove(Data.ItemID);
         }
         Scripts[Data.Part.UUID] = Instances;
     }
 }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:17,代码来源:ScriptProtectionModule.cs


示例18: FindScriptStateSave

 public StateSave FindScriptStateSave(ScriptData script)
 {
     OSDMap component = m_manager.GetComponentState(script.Part, m_componentName) as OSDMap;
     //Attempt to find the state saves we have
     if (component != null)
     {
         OSD o;
         //If we have one for this item, deserialize it
         if (!component.TryGetValue(script.ItemID.ToString(), out o))
         {
             if (!component.TryGetValue(script.InventoryItem.OldItemID.ToString(), out o))
             {
                 if (!component.TryGetValue(script.InventoryItem.ItemID.ToString(), out o))
                 {
                     return null;
                 }
             }
         }
         StateSave save = new StateSave();
         save.FromOSD((OSDMap)o);
         return save;
     }
     return null;
 }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:24,代码来源:ScriptDataSerializers.cs


示例19: AddToScriptQueue

        /// <summary>
        /// Posts the event to the given object.
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="FunctionName"></param>
        /// <param name="qParams"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        public bool AddToScriptQueue(ScriptData ID, string FunctionName, DetectParams[] qParams, int VersionID, EventPriority priority, params object[] param)
        {
            // Create a structure and add data
            QueueItemStruct QIS = new QueueItemStruct();
            QIS.ID = ID;
            QIS.functionName = FunctionName;
            QIS.llDetectParams = qParams;
            QIS.param = param;
            QIS.VersionID = VersionID;
            QIS.State = ID.State;

            MaintenanceThread.AddEvent(QIS, priority);
            return true;
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:22,代码来源:ScriptEngine.cs


示例20: CreateOSDMapForState

        private void CreateOSDMapForState(ScriptData script, StateSave save)
        {
            //Get any previous state saves from the component manager
            OSDMap component = m_manager.GetComponentState(script.Part, m_componentName) as OSDMap;
            if (component == null)
                component = new OSDMap();

            //Add our state to the list of all scripts in this object
            component[script.ItemID.ToString()] = save.ToOSD();

            //Now resave it
            m_manager.SetComponentState(script.Part, m_componentName, component);
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:13,代码来源:ScriptDataSerializers.cs



注:本文中的Aurora.ScriptEngine.AuroraDotNetEngine.ScriptData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AutoMapper.ResolutionContext类代码示例发布时间:2022-05-24
下一篇:
C# AuroraDotNetEngine.DetectParams类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap