当前位置: 首页>>代码示例>>C#>>正文


C# Props.setProperty方法代码示例

本文整理汇总了C#中Props.setProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Props.setProperty方法的具体用法?C# Props.setProperty怎么用?C# Props.setProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Props的用法示例。


在下文中一共展示了Props.setProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: createAgent

 public virtual AgentControllerInterface createAgent(object agentInfo)
 {
     if (agentInfo is Props)
     {
         return this.createAgent((Props) agentInfo);
     }
     Props agentProps = new Props();
     agentProps.setProperty("classname", agentInfo.ToString());
     return this.createAgent(agentProps);
 }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:10,代码来源:Neokernel.cs

示例2: start

        public override void start()
        {
            println("Begin ScheduleTaskFactoryAgent");

            try
            {
                ProgramHelper.InitProgram();

                IList<ServerTaskScheduleInfo> list = ADInfoBll.Instance.GetInfos<ServerTaskScheduleInfo>();
                foreach (ServerTaskScheduleInfo i in list)
                {
                    Props agentInfo = new Props();
                    agentInfo.setProperty("classname", "Feng.NeoKernel.Agent.ScheduleTaskAgent");
                    agentInfo.setProperty("startup", true);
                    agentInfo.setProperty("hide_println", false);
                    agentInfo.setProperty("hide_debug", false);
                    agentInfo.setProperty("hide_warning", false);
                    agentInfo.setProperty("startup", true);
                    agentInfo.setProperty("schedule", i.Schedule);
                    agentInfo.setProperty("process", i.Process.Name);
                    agentInfo.setProperty("startAtStart", i.StartAtStart);

                    AgentControllerInterface interface2 = NK.neokernel.createAgent(agentInfo);
                    if (interface2 != null)
                    {
                        interface2.start();

                        println(i.Name + " Schedule Agent is created!");
                    }
                    else
                    {
                        warning(i.Name + " Schedule Agent is not created!");
                    }
                }
            }
            catch (Exception ex)
            {
                println("Error :" + ex.Message);
            }

            println("End ScheduleTaskFactoryAgent");
        }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:42,代码来源:ScheduleTaskFactoryAgent.cs

示例3: addDefaultAgentPropsToList

 //private static int xx = 7;
 //private static int yy = 6;
 protected ArrayList addDefaultAgentPropsToList(ArrayList inputList)
 {
     ArrayList agentprops = new ArrayList(inputList);
     DirectoryInfo dir = null;
     if (this.hasProperty("startup_dir"))
     {
         dir = new DirectoryInfo(Path.GetFullPath(this.getString("startup_dir")));
     }
     else
     {
         dir = new DirectoryInfo(Directory.GetCurrentDirectory());
     }
     IEnumerator enumerator = this.getPropsForAgentsInDirectory(dir).GetEnumerator();
     while (enumerator.MoveNext())
     {
         Props current = (Props)enumerator.Current;
         bool flag = false;
         IEnumerator enumerator2 = inputList.GetEnumerator();
         while (enumerator2.MoveNext())
         {
             Props props2 = (Props)enumerator2.Current;
             if (current.getString("classname").Equals(props2.getString("classname")))
             {
                 flag = true;
                 break;
             }
         }
         if (!flag)
         {
             agentprops.Add(current);
         }
     }
     if (!this.getBoolean("dont_start_agents") && this.needServiceManager(agentprops))
     {
         Props props3 = new Props();
         props3.setProperty("classname", "com.neokernel.nk.ServiceManager");
         props3.setProperty("startup", true);
         props3.setProperty("hide_debug", true);
         agentprops.Insert(0, props3);
     }
     if ((!this.getBoolean("dont_start_webserver") && !this.getBoolean("dont_start_agents")) && this.needWebServer(agentprops))
     {
         Props props4 = new Props();
         IEnumerator enumerator3 = agentprops.GetEnumerator();
         bool flag2 = false;
         while (enumerator3.MoveNext())
         {
             Props props5 = (Props) enumerator3.Current;
             if (props5.hasProperty("service_name"))
             {
                 props4.setProperty("index_agent", props5.getString("service_name"));
                 flag2 = true;
                 break;
             }
         }
         props4.setProperty("classname", "com.neokernel.httpd.WebServer");
         props4.setProperty("log_requests", true);
         props4.setProperty("log_file_dir", Application.StartupPath + Path.DirectorySeparatorChar + "logs");
         props4.setProperty("startup", true);
         if (!flag2)
         {
             Props props6 = new Props();
             props6.setProperty("classname", "com.neokernel.httpd.HTTPFileServerAgent");
             props6.setProperty("startup", true);
             agentprops.Add(props6);
         }
         agentprops.Add(props4);
     }
     return agentprops;
 }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:72,代码来源:StartupAgent.cs

示例4: sT

 internal bool sT()
 {
     Props agentInfo = new Props();
     agentInfo.setProperty("classname", "com.neokernel.nk.Trmntr");
     agentInfo.setProperty("startup", true);
     agentInfo.setProperty("seconds_to_live", 240);
     agentInfo.setProperty("hide_println", true);
     agentInfo.setProperty("hide_debug", true);
     agentInfo.setProperty("hide_warning", true);
     AgentControllerInterface interface2 = NK.neokernel.createAgent(agentInfo);
     if (interface2 != null)
     {
         this.complain("*** The server will stop in 5 minutes because no valid license was found. Please obtain a current license to continue using this software.");
         interface2.start();
         return true;
     }
     this.complain("License problem.");
     return false;
 }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:19,代码来源:StartupAgent.cs


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