Ejemplo n.º 1
0
 public DependencyActionPreCallEventArgs(DependencyAction action, object[] args)
 {
     this.Action      = action;
     this.Arguments   = args;
     this.Allow       = true; //默认是允许执行的
     this.ReturnValue = null;
 }
        public static DependencyAction Register(string name, Type ownerType, bool allowClientAccess, ActionMetadata defaultMetadata)
        {
            var action = new DependencyAction()
            {
                Id                = Guid.NewGuid(),
                Name              = name,
                OwnerType         = ownerType,
                AllowClientAccess = allowClientAccess,
                DefaultMetadata   = defaultMetadata
            };

            lock (_actions)
                _actions.Add(action);
            return(action);
        }
Ejemplo n.º 3
0
 public DependencyActionCalledEventArgs(DependencyAction action, object[] args, object returnValue)
 {
     this.Action      = action;
     this.Arguments   = args;
     this.ReturnValue = returnValue;
 }