當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。