public IPayload PreparePayload(long nonce) { ArgumentPayload argumentPayload = new ArgumentPayload((object)this, nonce); argumentPayload.Command = Command.SetActivity; return((IPayload)argumentPayload); }
public IPayload PreparePayload(long nonce) { ArgumentPayload argumentPayload = new ArgumentPayload((object)this, nonce); argumentPayload.Command = this.Accept ? Command.SendActivityJoinInvite : Command.CloseActivityJoinRequest; return((IPayload)argumentPayload); }
public IPayload PreparePayload(long nonce) { ArgumentPayload argumentPayload = new ArgumentPayload(); argumentPayload.Command = Command.Dispatch; argumentPayload.Nonce = (string)null; argumentPayload.Arguments = (JObject)null; return((IPayload)argumentPayload); }
static int Main(string[] args) { ArgumentAdapter argumentAdapter = new ArgumentAdapter(args); ArgumentPayload ap = argumentAdapter.Parse(); if (ap == null) { ApplicationUsage(); return(1); } Command command; switch (ap.ProcessingCommand) { case Processing.Negative: command = new NegativeCommand(ap.BitmapPath, ap.OutcomeBitmapPath); break; case Processing.Grayscale: command = new GrayscaleCommand(ap.BitmapPath, ap.OutcomeBitmapPath); break; case Processing.Sepia: command = new SepiaCommand(ap.BitmapPath, ap.OutcomeBitmapPath); break; case Processing.Encode: command = new TextCodingCommand(ap.BitmapPath, ap.OutcomeBitmapPath, ap.TextToEncoding); break; case Processing.Decode: command = new TextDecodingCommand(ap.BitmapPath); break; case Processing.Bluish: command = new BluishCommand(ap.BitmapPath, ap.OutcomeBitmapPath); break; default: LoggerFacade.Warn("Niepoprawna akcja!"); return(2); } command.Execute(); LoggerFacade.Success("Gotowe!"); return(0); }