BuildRegex() public static method

public static BuildRegex ( String kegex ) : String
kegex String
return String
コード例 #1
0
        public kOSExternalFunction(String name, object parent, String methodName, int parameterCount)
        {
            this.Name           = name;
            this.Parent         = parent;
            this.ParameterCount = parameterCount;
            this.MethodName     = methodName;

            this.regex = Utils.BuildRegex(name + "_(" + parameterCount + ")");
        }
コード例 #2
0
ファイル: Command.cs プロジェクト: yadenisyur/KOS
 static CommandRegistry()
 {
     foreach (Type t in Assembly.GetExecutingAssembly().GetTypes())
     {
         CommandAttribute attr = (CommandAttribute)t.GetCustomAttributes(typeof(CommandAttribute), true).FirstOrDefault();
         if (attr != null)
         {
             foreach (String s in attr.Values)
             {
                 Bindings.Add(Utils.BuildRegex(s), t);
             }
         }
     }
 }