Exemplo n.º 1
0
Arquivo: Event.cs Projeto: 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;
                }));
            }
Exemplo n.º 2
0
 public Host(jsObject Base)
 {
     if (Base != null)
     {
         Base.CopyTo(this);
     }
 }
Exemplo n.º 3
0
Arquivo: Url.cs Projeto: azend/Poly
 public Url(jsObject Obj)
 {
     Obj.CopyTo(this);
 }
Exemplo n.º 4
0
 public void Configure(jsObject Args)
 {
     Args.CopyTo(this);
 }