public bool Register(Closure clos, ICollection keys, ApplicationState state)
        {
            ArrayList kk = new ArrayList(keys);

            Keys[] k = new Keys[keys.Count];

            if (keys.Count > 1)
            {
                for (int i = 0; i < k.Length; i++)
                {
                    k[i] = (Keys)keyconv.ConvertFrom(kk[i]);
                }
            }
            else
            {
                object o = keyconv.ConvertFrom(kk[0]);
                if (o is Keys[])
                {
                    k = o as Keys[];
                }
                else
                {
                    k[0] = (Keys)o;
                }
            }

            ClosureAction a = new ClosureAction();

            a.clos  = clos;
            a.State = state;

            return(Register(a, k));
        }
            public override bool Equals(object obj)
            {
                ClosureAction a = obj as ClosureAction;

                if (a == null)
                {
                    return(false);
                }
                return(a.clos == clos && a.State == State);
            }