public override IModuleCommand RegisterModuleCommand(Guid id, ModuleCommandAttribute attribute, EventHandler <ModuleCommandEventArgs> handler) { if (handler == null) { throw new ArgumentNullException("handler"); } if (attribute == null) { throw new ArgumentNullException("attribute"); } if (string.IsNullOrEmpty(attribute.Name)) { throw new ArgumentException("'attribute.Name' must not be empty."); } ProxyCommand it = new ProxyCommand(this, id, attribute, handler); it.LoadData((Hashtable)ReadSettings()[it.Id]); Host.Instance.RegisterProxyCommand(it); return(it); }
public override IModuleCommand RegisterModuleCommand(Guid id, ModuleCommandAttribute attribute, EventHandler<ModuleCommandEventArgs> handler) { if (handler == null) throw new ArgumentNullException("handler"); if (attribute == null) throw new ArgumentNullException("attribute"); if (string.IsNullOrEmpty(attribute.Name)) throw new ArgumentException("'attribute.Name' must not be empty."); ProxyCommand it = new ProxyCommand(this, id, attribute, handler); it.LoadData((Hashtable)ReadSettings()[it.Id]); Host.Instance.RegisterProxyCommand(it); return it; }