當前位置: 首頁>>代碼示例>>C#>>正文


C# GenericWriter.WriteBlockDictionary方法代碼示例

本文整理匯總了C#中Server.GenericWriter.WriteBlockDictionary方法的典型用法代碼示例。如果您正苦於以下問題:C# GenericWriter.WriteBlockDictionary方法的具體用法?C# GenericWriter.WriteBlockDictionary怎麽用?C# GenericWriter.WriteBlockDictionary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.GenericWriter的用法示例。


在下文中一共展示了GenericWriter.WriteBlockDictionary方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SerializeScores

		private static bool SerializeScores(GenericWriter writer)
		{
			writer.SetVersion(0);

			writer.WriteBlockDictionary(
				Registry,
				(e, list) =>
				{
					writer.WriteEntity(e);

					writer.WriteBlockDictionary(
						list,
						(k, v) =>
						{
							writer.Write(k);
							writer.Write(v);
						});
				});

			return true;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:21,代碼來源:PlayerScores_Init.cs

示例2: Serialize

		private static bool Serialize(GenericWriter writer)
		{
			writer.WriteBlockDictionary(
				Registry,
				(name, players) =>
				{
					writer.Write(name);
					writer.WriteMobileList(players, true);
				});

			return true;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:12,代碼來源:PlayerNames_Init.cs

示例3: Serialize

		private static bool Serialize(GenericWriter writer)
		{
			writer.SetVersion(0);

			writer.WriteBlockDictionary(
				Settings,
				(w, k, v) =>
				{
					w.WriteType(k);
					v.Serialize(w);
				});

			return true;
		}
開發者ID:Ravenwolfe,項目名稱:Core,代碼行數:14,代碼來源:Notify_Init.cs

示例4: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			int version = writer.SetVersion(1);

			switch (version)
			{
				case 1:
					writer.Write(Desc);
					goto case 0;
				case 0:
					{
						writer.WriteType(Type);
						writer.Write(Name);
						writer.Write(CanIgnore);

						writer.WriteBlockDictionary(States, (w, k, v) => v.Serialize(w));
					}
					break;
			}
		}
開發者ID:greeduomacro,項目名稱:RuneUO,代碼行數:22,代碼來源:Settings.cs

示例5: Serialize

		private static bool Serialize(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlockDictionary(
							_States,
							(w, k, v) =>
							{
								w.Write(k);
								w.Write(v.Item1);
								w.Write(v.Item2.X);
								w.Write(v.Item2.Y);
							});
					}
					break;
			}

			return true;
		}
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:23,代碼來源:CastBars_Init.cs

示例6: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			writer.SetVersion(0);

			writer.Write(Name);
			writer.Write(Summary);
			writer.Write(Token);
			writer.Write(Available);
			writer.Write(AutoJoin);
			writer.WriteFlag(Access);
			writer.WriteFlag(ProfanityAction);
			writer.WriteFlag(TextColor);
			writer.Write(TextHue);
			writer.Write(UserLimit);
			writer.Write(SpamDelay);

			writer.WriteBlockDictionary(
				Bans,
				(w, k, v) =>
				{
					w.Write(k);
					w.Write(v);
				});
		}
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:26,代碼來源:Channel.cs

示例7: SerializeProfiles

		private static bool SerializeProfiles(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlockDictionary(
							Profiles,
							(w, key, val) =>
							{
								w.Write(key);
								w.WriteType(val, t => val.Serialize(w));
							});
					}
					break;
			}

			return true;
		}
開發者ID:greeduomacro,項目名稱:RuneUO,代碼行數:21,代碼來源:AutoPvP_Init.cs

示例8: Serialize

		public void Serialize(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.Write(Owner);
						writer.Write(Deleted);

						if (!Deleted)
						{
							writer.WriteBlockDictionary(
								History,
								(w1, k, v) =>
								{
									w1.Write(k.Stamp);
									w1.WriteBlockList(v, (w2, e) => e.Serialize(w2));
								});
						}
					}
					break;
			}
		}
開發者ID:greeduomacro,項目名稱:RuneUO,代碼行數:25,代碼來源:VoteProfile.cs

示例9: SerializeStats

		private static bool SerializeStats(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlockDictionary(
							Stats,
							(w, k, v) =>
							{
								w.Write(k);
								v.Serialize(w);
							});
					}
					break;
			}

			return true;
		}
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:21,代碼來源:WebStats_Init.cs

示例10: Serialize

		public static bool Serialize(GenericWriter writer)
		{
			var version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
				{
					if (DefaultEntries == null)
					{
						writer.Write(false);
					}
					else
					{
						writer.Write(true);
						DefaultEntries.Serialize(writer);
					}

					writer.WriteBlockDictionary(
						Profiles,
						(w, k, v) =>
						{
							w.Write(k);
							v.Serialize(w);
						});
				}
					break;
			}

			return true;
		}
開發者ID:Ravenwolfe,項目名稱:Core,代碼行數:31,代碼來源:Toolbars_Init.cs

示例11: SerializeVoteSites

		private static bool SerializeVoteSites(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					writer.WriteBlockDictionary(VoteSites, (w, k, v) => w.WriteType(v, t => v.Serialize(w)));
					break;
			}

			return true;
		}
開發者ID:greeduomacro,項目名稱:RuneUO,代碼行數:13,代碼來源:Voting_Init.cs

示例12: Serialize

		public virtual void Serialize(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					writer.WriteBlockDictionary(Entries, (w, k, e) => w.WriteType(e, t => e.Serialize(w)));
					break;
			}
		}
開發者ID:greeduomacro,項目名稱:RuneUO,代碼行數:11,代碼來源:ProfileHistory.cs

示例13: SerializeSeasons

		private static bool SerializeSeasons(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlockDictionary(
							Seasons,
							(key, val) =>
							{
								writer.Write(key);
								writer.WriteType(
									val,
									t =>
									{
										if (t != null)
										{
											val.Serialize(writer);
										}
									});
							});
					}
					break;
			}

			return true;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:29,代碼來源:AutoPvP_Init.cs

示例14: SerializeTransactions

		private static bool SerializeTransactions(GenericWriter writer)
		{
			writer.SetVersion(0);

			writer.WriteBlockDictionary(Transactions, (w, k, v) => v.Serialize(w));

			return true;
		}
開發者ID:Ravenwolfe,項目名稱:Core,代碼行數:8,代碼來源:AutoDonate_Init.cs

示例15: SerializeVoteSites

		private static bool SerializeVoteSites(GenericWriter writer)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlockDictionary(
							VoteSites,
							(k, v) => writer.WriteType(
								v,
								t =>
								{
									if (t != null)
									{
										v.Serialize(writer);
									}
								}));
					}
					break;
			}

			return true;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:25,代碼來源:Voting_Init.cs


注:本文中的Server.GenericWriter.WriteBlockDictionary方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。