public static IAppCommand CreateKey(CreateKeyCommandContext context) { return new AppCommand<CreateKeyCommandContext>(context, ctx => { ctx.Key.CreateNewKey(ctx.Name); }, ctx => { ctx.Key.DeleteKey(ctx.Name); }) { Description = "Create key" }; }
public static IAppCommand CreateKey(CreateKeyCommandContext context) { return(new AppCommand <CreateKeyCommandContext>(context, ctx => { ctx.Key.CreateNewKey(ctx.Name); }, ctx => { ctx.Key.DeleteKey(ctx.Name); }) { Description = "Create key" }); }