当前位置: 首页>>代码示例>>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;未经允许,请勿转载。