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


C# GenericWriter.SetVersion方法代码示例

本文整理汇总了C#中Server.GenericWriter.SetVersion方法的典型用法代码示例。如果您正苦于以下问题:C# GenericWriter.SetVersion方法的具体用法?C# GenericWriter.SetVersion怎么用?C# GenericWriter.SetVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.GenericWriter的用法示例。


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

示例1: Serialize

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

			int version = writer.SetVersion(1);

			switch (version)
			{
				case 1:
					{
						writer.WriteBlock(
							() => writer.WriteType(
								Misc,
								t =>
								{
									if (t != null)
									{
										Misc.Serialize(writer);
									}
								}));
					}
					goto case 0;
				case 0:
					{
						writer.WriteBlock(
							() => writer.WriteType(
								Commands,
								t =>
								{
									if (t != null)
									{
										Commands.Serialize(writer);
									}
								}));

						writer.WriteBlock(
							() => writer.WriteType(
								Profiles,
								t =>
								{
									if (t != null)
									{
										Profiles.Serialize(writer);
									}
								}));

						writer.WriteBlock(
							() => writer.WriteType(
								Seasons,
								t =>
								{
									if (t != null)
									{
										Seasons.Serialize(writer);
									}
								}));
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:60,代码来源:AdvancedOpts.cs

示例2: Serialize

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

			int version = writer.SetVersion(1);

			switch (version)
			{
				case 1:
					{
						writer.Write(SkipTicks);
						writer.Write(SkippedTicks);
					}
					goto case 0;
				case 0:
					{
						writer.WriteBlock(
							w =>
							{
								writer.Write(CurrentSeason);
								writer.Write(TopListCount);
								writer.Write(RunnersUpCount);

								writer.WriteType(ScheduleInfo, t => ScheduleInfo.Serialize(w));

								writer.Write(AutoPvP.SeasonSchedule.Enabled);
							});

						writer.WriteBlock(w => writer.WriteType(Rewards, t => Rewards.Serialize(w)));
					}
					break;
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:33,代码来源:SeasonOpts.cs

示例3: Serialize

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

            int version = writer.SetVersion(1);

            switch(version)
		    {
		        case 1:
                    writer.Write(MeleeMod);
		            goto case 0;
                case 0:
		        {
                    writer.Write(MeleeVsChampMod);
                    writer.Write(ArcherVsChampMod);
                    writer.Write(ArcherMod);
                    writer.Write(BardMod);
                    writer.Write(TamerMod);
                    writer.Write(SummonMod);
                    writer.Write(ChampionMod);
                    writer.Write(MaxPoints);		            
		        }
		        break;
		    }

		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:26,代码来源:SystemOptions.cs

示例4: Serialize

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

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlock(
							() => writer.WriteType(
								Loser,
								t =>
								{
									if (t != null)
									{
										Loser.Serialize(writer);
									}
								}));

						writer.WriteBlock(
							() => writer.WriteType(
								Winner,
								t =>
								{
									if (t != null)
									{
										Winner.Serialize(writer);
									}
								}));
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:35,代码来源:Rewards.cs

示例5: Serialize

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

            int version = writer.SetVersion(0);

        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:StoneIngredients.cs

示例6: Serialize

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

			writer.SetVersion(0);

			writer.Write(_URL);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:8,代码来源:LinkEntry.cs

示例7: Serialize

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

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlock(
							() => writer.WriteType(
								Items,
								t =>
								{
									if (t != null)
									{
										Items.Serialize(writer);
									}
								}));

						writer.WriteBlock(
							() => writer.WriteType(
								Pets,
								t =>
								{
									if (t != null)
									{
										Pets.Serialize(writer);
									}
								}));

						writer.WriteBlock(
							() => writer.WriteType(
								Skills,
								t =>
								{
									if (t != null)
									{
										Skills.Serialize(writer);
									}
								}));

						writer.WriteBlock(
							() => writer.WriteType(
								Spells,
								t =>
								{
									if (t != null)
									{
										Spells.Serialize(writer);
									}
								}));
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:57,代码来源:Restrictions.cs

示例8: Serialize

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

			writer.SetVersion(0);

			AccessPrefixes.Serialize(writer);

			writer.Write(ChatPrefix);
			writer.Write(HistoryBuffer);
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:11,代码来源:SystemOpts.cs

示例9: Serialize

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

			var version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					break;
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:12,代码来源:Generic.cs

示例10: Serialize

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

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					writer.Write(Hue);
					break;
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:13,代码来源:HueOverride.cs

示例11: Serialize

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

			switch (version)
			{
				case 0:
					{
						writer.Write(VoteTime);
						writer.Write(VoteSite.UID);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:14,代码来源:VoteProfile.cs

示例12: 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

示例13: Serialize

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

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.Write(IndexOnStart);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:15,代码来源:SystemOpts.cs

示例14: Serialize

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

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.Write(UseCategories);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:15,代码来源:MiscOpts.cs

示例15: Serialize

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

			var version = writer.SetVersion(1);

			switch (version)
			{
				case 1:
					Persistence.Serialize(writer);
					goto case 0;
				case 0:
					writer.Write(MaxConnections);
					break;
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:16,代码来源:SystemOpts.cs


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