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


C# SteamKit2.JobID类代码示例

本文整理汇总了C#中SteamKit2.JobID的典型用法代码示例。如果您正苦于以下问题:C# JobID类的具体用法?C# JobID怎么用?C# JobID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JobID类属于SteamKit2命名空间,在下文中一共展示了JobID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScreenshotAddedCallback

			internal ScreenshotAddedCallback( JobID jobID, CMsgClientUCMAddScreenshotResponse msg )
			{
				JobID = jobID;

				Result = ( EResult )msg.eresult;
				ScreenshotID = msg.screenshotid;
			}
开发者ID:Kolpa,项目名称:SteamKit,代码行数:7,代码来源:Callbacks.cs

示例2: QueryCallback

            internal QueryCallback( JobID jobID, CMsgGMSClientServerQueryResponse msg )
            {
                JobID = jobID;

                var serverList = msg.servers
                    .Select( s => new Server( s ) )
                    .ToList();

                this.Servers = new ReadOnlyCollection<Server>( serverList );
            }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:10,代码来源:Callbacks.cs

示例3: ResponseCallback

            internal ResponseCallback( JobID jobID, CMsgClientRequestAccountDataResponse msg )
            {
                this.JobID = jobID;

                Result = ( EResult )msg.eresult;
                Action = ( ERequestAccountData )msg.action;

                CountMatches = msg.ct_matches;
                AccountName = msg.account_name;
            }
开发者ID:Markusyatina,项目名称:steam-irc-bot,代码行数:10,代码来源:SteamAccountHandler.cs

示例4: OfflineMessageCallback

			internal OfflineMessageCallback(JobID jobID, CMsgClientOfflineMessageNotification msg) {
				JobID = jobID;

				if (msg == null) {
					return;
				}

				OfflineMessages = msg.offline_messages;
				Users = msg.friends_with_offline_messages;
			}
开发者ID:chrschmidt,项目名称:ArchiSteamFarm,代码行数:10,代码来源:ArchiHandler.cs

示例5: FindOrCreateLeaderboardCallback

            internal FindOrCreateLeaderboardCallback( JobID jobID, CMsgClientLBSFindOrCreateLBResponse resp )
            {
                this.JobID = jobID;

                this.Result = ( EResult )resp.eresult;
                this.ID = resp.leaderboard_id;
                this.EntryCount = resp.leaderboard_entry_count;
                this.SortMethod = ( ELeaderboardSortMethod )resp.leaderboard_sort_method;
                this.DisplayType = ( ELeaderboardDisplayType )resp.leaderboard_display_type;
            }
开发者ID:logtcn,项目名称:SteamKit,代码行数:10,代码来源:Callbacks.cs

示例6: PlayingSessionStateCallback

            internal PlayingSessionStateCallback(JobID jobID, CMsgClientPlayingSessionState msg)
            {
                if ((jobID == null) || (msg == null))
                {
                    throw new ArgumentNullException(nameof(jobID) + " || " + nameof(msg));
                }

                JobID = jobID;
                PlayingBlocked = msg.playing_blocked;
            }
开发者ID:Ezzpify,项目名称:HourBoostr,代码行数:10,代码来源:ExtraHandler.cs

示例7: NotificationsCallback

			internal NotificationsCallback(JobID jobID, CMsgClientItemAnnouncements msg) {
				if ((jobID == null) || (msg == null)) {
					throw new ArgumentNullException(nameof(jobID) + " || " + nameof(msg));
				}

				JobID = jobID;

				if (msg.count_new_items > 0) {
					Notifications = new HashSet<ENotification> { ENotification.Items };
				}
			}
开发者ID:Kasp42,项目名称:ArchiSteamFarm,代码行数:11,代码来源:ArchiHandler.cs

示例8: TryRemoveJob

        public static bool TryRemoveJob(JobID jobID, out JobAction job)
        {
            if (Jobs.TryRemove(jobID, out job))
            {
                Log.WriteDebug("Job Manager", "Removed job: {0} ({1} jobs left)", jobID, Jobs.Count);

                return true;
            }

            return false;
        }
开发者ID:qyh214,项目名称:SteamDatabaseBackend,代码行数:11,代码来源:JobManager.cs

示例9: NotificationsCallback

			internal NotificationsCallback(JobID jobID, CMsgClientUserNotifications msg) {
				JobID = jobID;

				if (msg == null || msg.notifications == null) {
					return;
				}

				Notifications = new List<Notification>(msg.notifications.Count);
				foreach (var notification in msg.notifications) {
					Notifications.Add(new Notification((Notification.ENotificationType) notification.user_notification_type));
				}
			}
开发者ID:Ryzhehvost,项目名称:ArchiSteamFarm,代码行数:12,代码来源:ArchiHandler.cs

示例10: HeartbeatJob

        /// <summary>
        /// Extends the lifetime of a job.
        /// </summary>
        /// <param name="jobId">The job identifier.</param>
        public void HeartbeatJob( JobID jobId )
        {
            AsyncJob asyncJob = GetJob( jobId );

            if ( asyncJob == null )
            {
                // ignore heartbeats for jobs we're not tracking
                return;
            }

            asyncJob.Heartbeat();
        }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:16,代码来源:AsyncJobManager.cs

示例11: FailJob

        /// <summary>
        /// Marks a certain job as remotely failed.
        /// </summary>
        /// <param name="jobId">The job identifier.</param>
        public void FailJob( JobID jobId )
        {
            AsyncJob asyncJob = GetJob( jobId, andRemove: true );

            if ( asyncJob == null )
            {
                // ignore remote failures for jobs we're not tracking
                return;
            }

            asyncJob.SetFailed( dueToRemoteFailure: true );
            
        }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:17,代码来源:AsyncJobManager.cs

示例12: UGCDetailsCallback

            internal UGCDetailsCallback( JobID jobID, CMsgClientUFSGetUGCDetailsResponse msg )
            {
                JobID = jobID;

                Result = ( EResult )msg.eresult;

                AppID = msg.app_id;
                Creator = msg.steamid_creator;

                URL = msg.url;

                FileName = msg.filename;
                FileSize = msg.file_size;
            }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:14,代码来源:Callbacks.cs

示例13: PublishedFilesCallback

            internal PublishedFilesCallback( JobID jobID, CMsgCREEnumeratePublishedFilesResponse msg )
            {
                this.JobID = jobID;

                this.Result = ( EResult )msg.eresult;

                var fileList = msg.published_files
                    .Select( f => new File( f ) )
                    .ToList();

                this.Files = new ReadOnlyCollection<File>( fileList );

                this.TotalResults = ( int )msg.total_results;
            }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:14,代码来源:Callbacks.cs

示例14: TryCompleteJob

        /// <summary>
        /// Passes a callback to a pending async job.
        /// If the given callback completes the job, the job is removed from this manager.
        /// </summary>
        /// <param name="jobId">The JobID.</param>
        /// <param name="callback">The callback.</param>
        public void TryCompleteJob( JobID jobId, CallbackMsg callback )
        {
            AsyncJob asyncJob = GetJob( jobId );

            if ( asyncJob == null )
            {
                // not a job we are tracking ourselves, can ignore it
                return;
            }

            // pass this callback into the job so it can determine if the job is finished (in the case of multiple responses to a job)
            bool jobFinished = asyncJob.AddResult( callback );

            if ( jobFinished )
            {
                // if the job is finished, we can stop tracking it
                asyncJobs.TryRemove( jobId, out asyncJob );
            }
        }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:25,代码来源:AsyncJobManager.cs

示例15: PostedCallbackTriggersActionForExplicitJobIDInvalid

        public void PostedCallbackTriggersActionForExplicitJobIDInvalid()
        {
            var jobID = new JobID(123456);
            var callback = new CallbackForTest { JobID = jobID, UniqueID = Guid.NewGuid() };

            var didCall = false;
            Action<CallbackForTest> action = delegate(CallbackForTest cb)
            {
                Assert.Equal(callback.UniqueID, cb.UniqueID);
                Assert.Equal(jobID, cb.JobID);
                didCall = true;
            };

            using (new Callback<CallbackForTest>(action, mgr, JobID.Invalid))
            {
                PostAndRunCallback(callback);
            }

            Assert.True(didCall);
        }
开发者ID:Badca52,项目名称:SteamKit,代码行数:20,代码来源:CallbackManagerFacts.cs


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