ArchiSteamFarm.ArchiWebHandler.ParseItems C# (CSharp) Метод

ParseItems() приватный статический Метод

private static ParseItems ( Steam.Item.EType>.Dictionary descriptions, List input, HashSet output ) : bool
descriptions Steam.Item.EType>.Dictionary
input List
output HashSet
Результат bool
		private static bool ParseItems(Dictionary<ulong, Tuple<uint, Steam.Item.EType>> descriptions, List<KeyValue> input, HashSet<Steam.Item> output) {
			if ((descriptions == null) || (input == null) || (input.Count == 0) || (output == null)) {
				ASF.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
				return false;
			}

			foreach (KeyValue item in input) {
				uint appID = item["appid"].AsUnsignedInteger();
				if (appID == 0) {
					ASF.ArchiLogger.LogNullError(nameof(appID));
					return false;
				}

				ulong contextID = item["contextid"].AsUnsignedLong();
				if (contextID == 0) {
					ASF.ArchiLogger.LogNullError(nameof(contextID));
					return false;
				}

				ulong classID = item["classid"].AsUnsignedLong();
				if (classID == 0) {
					ASF.ArchiLogger.LogNullError(nameof(classID));
					return false;
				}

				uint amount = item["amount"].AsUnsignedInteger();
				if (amount == 0) {
					ASF.ArchiLogger.LogNullError(nameof(amount));
					return false;
				}

				uint realAppID = appID;
				Steam.Item.EType type = Steam.Item.EType.Unknown;

				Tuple<uint, Steam.Item.EType> description;
				if (descriptions.TryGetValue(classID, out description)) {
					realAppID = description.Item1;
					type = description.Item2;
				}

				Steam.Item steamItem = new Steam.Item(appID, contextID, classID, amount, realAppID, type);
				output.Add(steamItem);
			}

			return true;
		}