/// <summary> /// Default constructor, sets the CommandPermission and CommandSecurity delegates /// so that they always return true (okay) /// </summary> /// <param name="theCommand"></param> /// <param name="theFunc"></param> public CommandAndFunction(String theCommand, CommandFunction theFunc) { command = theCommand; function = theFunc; permission = delegate(MemoryStream a, StxEtxHandler b) { return(true); }; security = delegate(MemoryStream a, StxEtxHandler b) { return(true); }; }
/// <summary> /// /// </summary> /// <param name="theCommand"></param> /// <param name="theFunc"></param> /// <param name="permissionCheck">this function is called before theCommand(); return true to indicate that the STX handler has permission to call theCommand()</param> /// <param name="securityCheck">this function is called before theCommand(); return true to indicate that the STX handler's ClientContext is secure enought to call theCommand()</param> public CommandAndFunction(String theCommand, CommandFunction theFunc, CommandPermission permissionCheck, CommandSecurity securityCheck) { command = theCommand; function = theFunc; permission = permissionCheck; security = securityCheck; }