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


C# EResult类代码示例

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


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

示例1: ParseTradeResult

			internal ParseTradeResult(ulong tradeID, EResult result) {
				if ((tradeID == 0) || (result == EResult.Unknown)) {
					throw new ArgumentNullException(nameof(tradeID) + " || " + nameof(result));
				}

				TradeID = tradeID;
				Result = result;
			}
开发者ID:Kasp42,项目名称:ArchiSteamFarm,代码行数:8,代码来源:Trading.cs

示例2: LoggedOnCallback

 internal LoggedOnCallback( EResult result )
 {
     Result = result;
 }
开发者ID:JustHev,项目名称:SteamKit,代码行数:4,代码来源:Callbacks.cs

示例3: OnDisconnected

		private async void OnDisconnected(SteamClient.DisconnectedCallback callback) {
			if (callback == null) {
				Logging.LogNullError(nameof(callback), BotName);
				return;
			}

			EResult lastLogOnResult = LastLogOnResult;
			LastLogOnResult = EResult.Invalid;

			Logging.LogGenericInfo("Disconnected from Steam!", BotName);

			ArchiWebHandler.OnDisconnected();
			CardsFarmer.OnDisconnected();
			Trading.OnDisconnected();

			FirstTradeSent = false;
			HandledGifts.ClearAndTrim();

			// If we initiated disconnect, do not attempt to reconnect
			if (callback.UserInitiated) {
				return;
			}

			switch (lastLogOnResult) {
				case EResult.Invalid:
					// Invalid means that we didn't get OnLoggedOn() in the first place, so Steam is down
					// Always reset one-time-only access tokens in this case, as OnLoggedOn() didn't do that for us
					AuthCode = TwoFactorCode = null;
					break;
				case EResult.InvalidPassword:
					// If we didn't use login key, it's nearly always rate limiting
					if (string.IsNullOrEmpty(BotDatabase.LoginKey)) {
						goto case EResult.RateLimitExceeded;
					}

					BotDatabase.LoginKey = null;
					Logging.LogGenericInfo("Removed expired login key", BotName);
					break;
				case EResult.NoConnection:
				case EResult.ServiceUnavailable:
				case EResult.Timeout:
				case EResult.TryAnotherCM:
					await Task.Delay(5000).ConfigureAwait(false);
					break;
				case EResult.RateLimitExceeded:
					Logging.LogGenericInfo("Will retry after 25 minutes...", BotName);
					await Task.Delay(25 * 60 * 1000).ConfigureAwait(false); // Captcha disappears after around 20 minutes, so we make it 25
					break;
			}

			if (!KeepRunning || SteamClient.IsConnected) {
				return;
			}

			Logging.LogGenericInfo("Reconnecting...", BotName);
			await Connect().ConfigureAwait(false);
		}
开发者ID:Kasp42,项目名称:ArchiSteamFarm,代码行数:57,代码来源:Bot.cs

示例4: LoggedOffCallback

 internal LoggedOffCallback( EResult result )
 {
     this.Result = result;
 }
开发者ID:Nephyrin,项目名称:SteamKit,代码行数:4,代码来源:Callbacks.cs

示例5: buttonOverwrite_Click

 private void buttonOverwrite_Click(object sender, RoutedEventArgs e)
 {
     Result = EResult.Overwrite;
     Close();
 }
开发者ID:ittennull,项目名称:ER,代码行数:5,代码来源:CreateNewOrEditOldEntryWindow.xaml.cs

示例6: ConnectedCallback

 internal ConnectedCallback( EResult result )
 {
     this.Result = result;
 }
开发者ID:Badca52,项目名称:SteamKit,代码行数:4,代码来源:Callbacks.cs

示例7: MsgChannelEncryptResult

		public MsgChannelEncryptResult()
		{
			Result = EResult.Invalid;
		}
开发者ID:logtcn,项目名称:SteamKit,代码行数:4,代码来源:SteamLanguageInternal.cs

示例8: LoggedOffCallback

 internal LoggedOffCallback( SteamClient client, EResult result )
     : base( client )
开发者ID:Nightgunner5,项目名称:steamkit-go,代码行数:2,代码来源:Callbacks.cs

示例9: MyCallback

 // generally we don't want user code to instantiate callback objects,
 // but rather only let handlers create them
 internal MyCallback( EResult res )
 {
     Result = res;
 }
开发者ID:Badca52,项目名称:SteamKit,代码行数:6,代码来源:MyHandler.cs

示例10: PurchaseResponseCallback

			internal PurchaseResponseCallback(JobID jobID, CMsgClientPurchaseResponse msg) {
				JobID = jobID;

				if (msg == null) {
					return;
				}

				Result = (EResult) msg.eresult;
				PurchaseResult = (EPurchaseResult) msg.purchase_result_details;

				if (msg.purchase_receipt_info == null) {
					return;
				}

				ReceiptInfo = new KeyValue();
				using (MemoryStream ms = new MemoryStream(msg.purchase_receipt_info)) {
					if (!ReceiptInfo.TryReadAsBinary(ms)) {
						return;
					}

					List<KeyValue> lineItems = ReceiptInfo["lineitems"].Children;
					Items = new Dictionary<uint, string>(lineItems.Count);

					foreach (KeyValue lineItem in lineItems) {
						uint appID = (uint) lineItem["PackageID"].AsUnsignedLong();
						string gameName = lineItem["ItemDescription"].AsString();
						gameName = WebUtility.UrlDecode(gameName); // Apparently steam expects client to decode sent HTML
						Items.Add(appID, gameName);
					}
				}
			}
开发者ID:Ryzhehvost,项目名称:ArchiSteamFarm,代码行数:31,代码来源:ArchiHandler.cs

示例11: LoggedOnCallback

            internal LoggedOnCallback( JobID jobID, EResult result )
            {
                JobID = jobID;

                Result = result;
            }
开发者ID:Badca52,项目名称:SteamKit,代码行数:6,代码来源:Callbacks.cs

示例12: NotifyCMOffline

        public async void NotifyCMOffline( Monitor monitor, EResult result = EResult.Invalid )
        {
            string keyName = monitor.Server.ToString();

            ServerInfo serverInfo = ServerInfo.DeserializeFromBytes( await redis.Hashes.Get( 10, "steamstatus:servers", keyName ) );

            serverInfo.IsOnline = false;

            if ( result != EResult.Invalid )
            {
                serverInfo.Result = result.ToString();
            }

            var task = redis.Hashes.Set( 10, "steamstatus:servers", keyName, serverInfo.SerializeToBytes() );
        }
开发者ID:KimimaroTsukimiya,项目名称:steamstatus,代码行数:15,代码来源:SteamManager.cs

示例13: UGCJobResult

 public UGCJobResult( JobID id, EResult result )
 {
     this.ID = id;
     this.Result = result;
 }
开发者ID:Markusyatina,项目名称:steam-irc-bot,代码行数:5,代码来源:UGCHandler.cs

示例14: RedeemGuestPassResponseCallback

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

				JobID = jobID;
				Result = (EResult) msg.eresult;
			}
开发者ID:Kasp42,项目名称:ArchiSteamFarm,代码行数:8,代码来源:ArchiHandler.cs

示例15: Deserialize

		public void Deserialize( Stream stream )
		{
			BinaryReader br = new BinaryReader( stream );

			Result = (EResult)br.ReadInt32();
		}
开发者ID:logtcn,项目名称:SteamKit,代码行数:6,代码来源:SteamLanguageInternal.cs


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