예제 #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);
 }