本文整理汇总了C#中JMMServer.Entities.CommandRequest类的典型用法代码示例。如果您正苦于以下问题:C# CommandRequest类的具体用法?C# CommandRequest怎么用?C# CommandRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommandRequest类属于JMMServer.Entities命名空间,在下文中一共展示了CommandRequest类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadFromDBCommand
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;
}
示例2: LoadFromDBCommand
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;
NumberStyles style = NumberStyles.Number;
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-GB");
// 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_VoteAnime", "AnimeID"));
this.VoteType = int.Parse(TryGetProperty(docCreator, "CommandRequest_VoteAnime", "VoteType"));
this.VoteValue = decimal.Parse(TryGetProperty(docCreator, "CommandRequest_VoteAnime", "VoteValue"), style, culture);
}
return true;
}
示例3: LoadFromDBCommand
public override bool LoadFromDBCommand(CommandRequest cq)
{
try
{
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_WebCacheDeleteXRefAniDBTvDB", "AnimeID"));
this.AniDBStartEpisodeType = int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBTvDB", "AniDBStartEpisodeType"));
this.AniDBStartEpisodeNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBTvDB", "AniDBStartEpisodeNumber"));
this.TvDBID = int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBTvDB", "TvDBID"));
this.TvDBSeasonNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBTvDB", "TvDBSeasonNumber"));
this.TvDBStartEpisodeNumber = int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBTvDB", "TvDBStartEpisodeNumber"));
}
}
catch (Exception ex)
{
logger.ErrorException("Error processing CommandRequest_WebCacheDeleteXRefAniDBTvDB: {0}" + ex.ToString(), ex);
return true;
}
return true;
}
示例4: Save
public void Save(CommandRequest obj)
{
using (var session = JMMService.SessionFactory.OpenSession())
{
Save(session, obj);
}
}
示例5: LoadFromDBCommand
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_WebCacheDeleteXRefAniDBMAL", "AnimeID"));
this.StartEpisodeType =
int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBMAL", "StartEpisodeType"));
this.StartEpisodeNumber =
int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheDeleteXRefAniDBMAL",
"StartEpisodeNumber"));
}
return true;
}
示例6: LoadFromDBCommand
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;
AnimeID = int.Parse(cq.CommandDetails);
return true;
}
示例7: ToDatabaseObject
public override CommandRequest ToDatabaseObject()
{
GenerateCommandID();
CommandRequest cq = new CommandRequest();
cq.CommandID = this.CommandID;
cq.CommandType = this.CommandType;
cq.Priority = this.Priority;
cq.CommandDetails = AnimeID.ToString();
cq.DateTimeUpdated = DateTime.Now;
return cq;
}
示例8: LoadFromDBCommand
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.CrossRef_AniDB_OtherID = int.Parse(TryGetProperty(docCreator, "CommandRequest_WebCacheSendXRefAniDBOther", "CrossRef_AniDB_OtherID"));
}
return true;
}
示例9: LoadFromDBCommand
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.AnimeEpisodeID = int.Parse(TryGetProperty(docCreator, "CommandRequest_TraktShowScrobble", "AnimeEpisodeID"));
}
return true;
}
示例10: LoadFromDBCommand
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.VideoLocalID = int.Parse(TryGetProperty(docCreator, "CommandRequest_GetFile", "VideoLocalID"));
this.ForceAniDB = bool.Parse(TryGetProperty(docCreator, "CommandRequest_GetFile", "ForceAniDB"));
}
return true;
}
示例11: LoadFromDBCommand
public abstract bool LoadFromDBCommand(CommandRequest cq);
示例12: GetCommand
// List of Default priorities for commands
// Pri 1
//------
// Reserved for commands user manually initiates from UI
//------
// Pri 2
//------
// CommandRequest_GetAnimeHTTP
//------
// Pri 3
//------
// CommandRequest_ProcessFile
// CommandRequest_GetFile
//------
// Pri 4
//------
// CommandRequest_GetUpdated
// CommandRequest_ReadMediaInfo
// CommandRequest_GetEpsode
//------
// Pri 5
//------
// CommandRequest_GetReleaseGroupStatus
//------
// Pri 6
//------
// CommandRequest_SyncMyList
// CommandRequest_SyncMyVotes
//------
// Pri 7
//------
// CommandRequest_GetCalendar
//------
// Pri 8
//------
// CommandRequest_UpdateMyListFileStatus
// CommandRequest_GetCharactersCreators
// CommandRequest_TraktSyncCollection
// CommandRequest_TvDBUpdateSeriesAndEpisodes
// CommandRequest_TvDBDownloadImages
// CommandRequest_TvDBSearchAnime
// CommandRequest_MovieDBSearchAnime
// CommandRequest_TraktSearchAnime
// CommandRequest_MALSearchAnime
//------
// Pri 9
//------
// CommandRequest_WebCacheSendFileHash
// CommandRequest_GetReviews
// CommandRequest_GetReleaseGroup
// CommandRequest_WebCacheSendXRefFileEpisode
// CommandRequest_WebCacheDeleteXRefFileEpisode
// CommandRequest_AddFileToMyList
// CommandRequest_DeleteFileFromMyList
// CommandRequest_VoteAnime
// CommandRequest_WebCacheDeleteXRefAniDBTvDB
// CommandRequest_WebCacheDeleteXRefAniDBTvDBAll
// CommandRequest_WebCacheSendXRefAniDBTvDB
// CommandRequest_WebCacheSendXRefAniDBOther
// CommandRequest_WebCacheDeleteXRefAniDBOther
// CommandRequest_WebCacheDeleteXRefAniDBTrakt
// CommandRequest_WebCacheSendXRefAniDBTrakt
// CommandRequest_TraktUpdateInfoAndImages
// CommandRequest_TraktSyncCollectionSeries
// CommandRequest_TraktShowEpisodeUnseen
// CommandRequest_DownloadImage
// CommandRequest_TraktUpdateAllSeries
// CommandRequest_MALUpdatedWatchedStatus
// CommandRequest_MALUploadStatusToMAL
// CommandRequest_MALDownloadStatusFromMAL
// CommandRequest_WebCacheSendAniDB_File
// CommandRequest_Azure_SendAnimeFull
//------
// Pri 10
//------
// CommandRequest_UpdateMylistStats
// CommandRequest_Azure_SendAnimeXML
//------
// Pri 11
//------
// CommandRequest_Azure_SendAnimeTitle
public static ICommandRequest GetCommand(CommandRequest crdb)
{
CommandRequestType crt = (CommandRequestType)crdb.CommandType;
switch (crt)
{
case CommandRequestType.Trakt_SyncCollectionSeries:
CommandRequest_TraktSyncCollectionSeries cr_CommandRequest_TraktSyncCollectionSeries = new CommandRequest_TraktSyncCollectionSeries();
cr_CommandRequest_TraktSyncCollectionSeries.LoadFromDBCommand(crdb);
return (ICommandRequest)cr_CommandRequest_TraktSyncCollectionSeries;
case CommandRequestType.AniDB_GetEpisodeUDP:
CommandRequest_GetEpisode cr_CommandRequest_GetEpisode = new CommandRequest_GetEpisode();
cr_CommandRequest_GetEpisode.LoadFromDBCommand(crdb);
return (ICommandRequest)cr_CommandRequest_GetEpisode;
case CommandRequestType.Azure_SendAnimeTitle:
CommandRequest_Azure_SendAnimeTitle cr_CommandRequest_Azure_SendAnimeTitle = new CommandRequest_Azure_SendAnimeTitle();
cr_CommandRequest_Azure_SendAnimeTitle.LoadFromDBCommand(crdb);
//.........这里部分代码省略.........
示例13: LoadFromDBCommand
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.Hash = TryGetProperty(docCreator, "CommandRequest_UpdateMyListFileStatus", "Hash");
this.Watched = bool.Parse(TryGetProperty(docCreator, "CommandRequest_UpdateMyListFileStatus", "Watched"));
string sUpStats = TryGetProperty(docCreator, "CommandRequest_UpdateMyListFileStatus", "UpdateSeriesStats");
bool upStats = true;
if (bool.TryParse(sUpStats, out upStats))
UpdateSeriesStats = upStats;
int dateSecs = 0;
if (int.TryParse(TryGetProperty(docCreator, "CommandRequest_UpdateMyListFileStatus", "WatchedDateAsSecs"), out dateSecs))
WatchedDateAsSecs = dateSecs;
}
if (this.Hash.Trim().Length > 0)
return true;
else
return false;
}