public override bool LoadFromDBCommand(CommandRequest cq) { this.CommandID = cq.CommandID; this.CommandRequestID = cq.CommandRequestID; this.CommandType = cq.CommandType; this.Priority = cq.Priority; this.CommandDetails = cq.CommandDetails; this.DateTimeUpdated = cq.DateTimeUpdated; // read xml to get parameters if (this.CommandDetails.Trim().Length > 0) { XmlDocument docCreator = new XmlDocument(); docCreator.LoadXml(this.CommandDetails); // populate the fields this.animeID = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "animeID")); this.aniEpType = (AniDBAPI.enEpisodeType)Enum.Parse(typeof(AniDBAPI.enEpisodeType), TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "aniEpType")); this.aniEpNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "aniEpNumber")); this.tvDBID = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "tvDBID")); this.tvSeasonNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "tvSeasonNumber")); this.tvEpNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "tvEpNumber")); this.excludeFromWebCache = bool.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "excludeFromWebCache")); this.additiveLink = bool.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "additiveLink")); } return(true); }
public CommandRequest_LinkAniDBTvDB(int animeID, AniDBAPI.enEpisodeType aniEpType, int aniEpNumber, int tvDBID, int tvSeasonNumber, int tvEpNumber, bool excludeFromWebCache) { this.animeID = animeID; this.aniEpType = aniEpType; this.aniEpNumber = aniEpNumber; this.tvDBID = tvDBID; this.tvSeasonNumber = tvSeasonNumber; this.tvEpNumber = tvEpNumber; this.excludeFromWebCache = excludeFromWebCache; this.CommandType = (int)CommandRequestType.LinkAniDBTvDB; this.Priority = (int)DefaultPriority; GenerateCommandID(); }
public CommandRequest_LinkAniDBTvDB(int animeID, AniDBAPI.enEpisodeType aniEpType, int aniEpNumber, int tvDBID, int tvSeasonNumber, int tvEpNumber, bool excludeFromWebCache, bool additiveLink=false) { this.animeID = animeID; this.aniEpType = aniEpType; this.aniEpNumber = aniEpNumber; this.tvDBID = tvDBID; this.tvSeasonNumber = tvSeasonNumber; this.tvEpNumber = tvEpNumber; this.excludeFromWebCache = excludeFromWebCache; this.additiveLink = additiveLink; this.CommandType = (int)CommandRequestType.LinkAniDBTvDB; this.Priority = (int)DefaultPriority; GenerateCommandID(); }
public override bool LoadFromDBCommand(CommandRequest cq) { this.CommandID = cq.CommandID; this.CommandRequestID = cq.CommandRequestID; this.CommandType = cq.CommandType; this.Priority = cq.Priority; this.CommandDetails = cq.CommandDetails; this.DateTimeUpdated = cq.DateTimeUpdated; // read xml to get parameters if (this.CommandDetails.Trim().Length > 0) { XmlDocument docCreator = new XmlDocument(); docCreator.LoadXml(this.CommandDetails); // populate the fields this.animeID = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "animeID")); this.aniEpType = (AniDBAPI.enEpisodeType)Enum.Parse(typeof(AniDBAPI.enEpisodeType), TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "aniEpType")); this.aniEpNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "aniEpNumber")); this.tvDBID = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "tvDBID")); this.tvSeasonNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "tvSeasonNumber")); this.tvEpNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "tvEpNumber")); this.excludeFromWebCache = bool.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "excludeFromWebCache")); this.additiveLink = bool.Parse(TryGetProperty(docCreator, "CommandRequest_LinkAniDBTvDB", "additiveLink")); } return true; }