示例#1
0
文件: Event.cs 项目: azend/Poly
            public bool MatchAndInvoke(string Data, jsObject Args, bool KeyIsWild)
            {
                return(ForEach <jsObject>((Name, Handlers) => {
                    var Key = KeyIsWild ? Data : Name;
                    var Wild = KeyIsWild ? Name : Data;
                    var Matches = jsObject.Null;

                    if ((Matches = Key.Match(Wild)) != null)
                    {
                        if (Matches.Count == 0)
                        {
                            Matches = Args;
                        }
                        else
                        {
                            Args.CopyTo(Matches);
                        }

                        Handlers.ForEach <Handler>((Id, Func) => {
                            Func(Matches);
                        });

                        return true;
                    }

                    return false;
                }));
            }
示例#2
0
 public Host(jsObject Base)
 {
     if (Base != null)
     {
         Base.CopyTo(this);
     }
 }
示例#3
0
文件: Url.cs 项目: azend/Poly
 public Url(jsObject Obj)
 {
     Obj.CopyTo(this);
 }
示例#4
0
文件: Bot.cs 项目: scoizzle/Poly.Bot
 public void Configure(jsObject Args)
 {
     Args.CopyTo(this);
 }