コード例 #1
0
ファイル: Agent.cs プロジェクト: isoundy000/wzry-1
 public static string GetRegisteredClassName(string agentInstanceName)
 {
     if (Names.ContainsKey(agentInstanceName))
     {
         AgentName_t _t = Names[agentInstanceName];
         return(_t.ClassName);
     }
     return(null);
 }
コード例 #2
0
ファイル: Agent.cs プロジェクト: isoundy000/wzry-1
        public static bool RegisterStaticClass(System.Type type, string displayName, string desc)
        {
            string fullName = type.FullName;

            if (!Names.ContainsKey(fullName))
            {
                Names[fullName] = new AgentName_t(fullName, fullName, displayName, desc);
                Utils.AddStaticClass(type);
                return(true);
            }
            return(false);
        }
コード例 #3
0
ファイル: Agent.cs プロジェクト: isoundy000/wzry-1
        public static bool RegisterName <TAGENT>(string agentInstanceName, string displayName, string desc) where TAGENT : Agent
        {
            string fullName = agentInstanceName;

            if (string.IsNullOrEmpty(fullName))
            {
                fullName = typeof(TAGENT).FullName;
            }
            if (!Names.ContainsKey(fullName))
            {
                string className = typeof(TAGENT).FullName;
                Names[fullName] = new AgentName_t(fullName, className, displayName, desc);
                return(true);
            }
            return(false);
        }