public void RequestReceived(object sender, CommandServiceEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            switch (e.Verb)
            {
            case CommandVerb.Unknown:
                break;

            case CommandVerb.AddFiles:
                _bundles.AddArguments(e.BundleId, e.Arguments);
                break;

            case CommandVerb.Encrypt:
            case CommandVerb.Decrypt:
            case CommandVerb.Open:
            case CommandVerb.Wipe:
            case CommandVerb.RandomRename:
                _bundles.AddArguments(e.BundleId, e.Arguments);
                OnCommandComplete(new CommandCompleteEventArgs(e.Verb, _bundles.Arguments(e.BundleId)));
                break;

            default:
                OnCommandComplete(new CommandCompleteEventArgs(e.Verb, e.Arguments));
                break;
            }
        }
示例#2
0
        protected virtual void OnReceived(CommandServiceEventArgs e)
        {
            EventHandler <CommandServiceEventArgs> handler = Received;

            if (handler != null)
            {
                handler(this, e);
            }
        }
示例#3
0
 public RequestCommandEventArgs(CommandServiceEventArgs command)
 {
     Command = command;
 }