BuildRegex() public static method

public static BuildRegex ( String kegex ) : String
kegex String
return String
Ejemplo n.º 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 + ")");
        }
Ejemplo n.º 2
0
 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);
             }
         }
     }
 }