public BotCommand_TaskComplete(String recipientID, Guid botCD, BotCommandRecord record) : base(recipientID, botCD, record) { this.Data = JsonConvert.DeserializeObject <CommandData>(record.CommandData); if (this.Data.TaskList == null) { this.Data.TaskList = new List <TaskRecord>(); } }
protected BotCommand(String recipientID, Guid botCD, BotCommandRecord record) { _Record = record; this.RecipientID = recipientID; this.UserCD = record.UserCD; this.BotCD = botCD; var rUser = WebApp.Current.DatabaseCache.User.SelectByPrimaryKey(this.UserCD); this.TextManager = WebApp.Current.TextManager.Copy(rUser.Language, ""); }
public static BotCommand Create(String recipientID, Guid botCD, BotCommandRecord record) { switch (record.CommandName) { case BotCommandName.StartCommand: return(new BotCommand_StartCommand(recipientID, botCD, record)); case BotCommandName.ScheduleAdd: return(new BotCommand_ScheduleAdd(recipientID, botCD, record)); case BotCommandName.TaskAdd: return(new BotCommand_TaskAdd(recipientID, botCD, record)); case BotCommandName.TaskComplete: return(new BotCommand_TaskComplete(recipientID, botCD, record)); default: throw new InvalidOperationException(); } }
public BotCommand_StartCommand(String recipientID, Guid botCD, BotCommandRecord record) : base(recipientID, botCD, record) { }
public BotCommand_TaskAdd(String recipientID, Guid botCD, BotCommandRecord record) : base(recipientID, botCD, record) { this.Data = JsonConvert.DeserializeObject <CommandData>(record.CommandData); }