当前位置: 首页>>代码示例>>C#>>正文


C# Entities.CommandRequest类代码示例

本文整理汇总了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;
        }
开发者ID:ElementalCrisis,项目名称:jmmserver,代码行数:28,代码来源:CommandRequest_LinkAniDBTvDB.cs

示例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;
		}
开发者ID:dizzydezz,项目名称:jmm,代码行数:26,代码来源:CommandRequest_VoteAnime.cs

示例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;
		}
开发者ID:maz0r,项目名称:jmmserver,代码行数:34,代码来源:CommandRequest_WebCacheDeleteXRefAniDBTvDB.cs

示例4: Save

		public void Save(CommandRequest obj)
		{
			using (var session = JMMService.SessionFactory.OpenSession())
			{
				Save(session, obj);
			}
		}
开发者ID:dizzydezz,项目名称:jmm,代码行数:7,代码来源:CommandRequestRepository.cs

示例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;
        }
开发者ID:ElementalCrisis,项目名称:jmmserver,代码行数:27,代码来源:CommandRequest_WebCacheDeleteXRefAniDBMAL.cs

示例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;
 }
开发者ID:ElementalCrisis,项目名称:jmmserver,代码行数:11,代码来源:CommandRequest_RefreshAnime.cs

示例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;
 }
开发者ID:ElementalCrisis,项目名称:jmmserver,代码行数:11,代码来源:CommandRequest_RefreshAnime.cs

示例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;
		}
开发者ID:dizzydezz,项目名称:jmm,代码行数:21,代码来源:CommandRequest_WebCacheSendXRefAniDBOther.cs

示例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;
		}
开发者ID:dizzydezz,项目名称:jmm,代码行数:21,代码来源:CommandRequest_TraktShowScrobble.cs

示例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;
        }
开发者ID:ElementalCrisis,项目名称:jmmserver,代码行数:22,代码来源:CommandRequest_GetFile.cs

示例11: LoadFromDBCommand

		public abstract bool LoadFromDBCommand(CommandRequest cq);
开发者ID:dizzydezz,项目名称:jmm,代码行数:1,代码来源:CommandRequestImplementation.cs

示例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);
//.........这里部分代码省略.........
开发者ID:maz0r,项目名称:jmmserver,代码行数:101,代码来源:CommandHelper.cs

示例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;
		}
开发者ID:dizzydezz,项目名称:jmm,代码行数:34,代码来源:CommandRequest_UpdateMyListFileStatus.cs


注:本文中的JMMServer.Entities.CommandRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。