本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例5: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
}
示例6: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.SetVersion(0);
writer.Write(_URL);
}
示例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;
}
}
示例8: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.SetVersion(0);
AccessPrefixes.Serialize(writer);
writer.Write(ChatPrefix);
writer.Write(HistoryBuffer);
}
示例9: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
var version = writer.SetVersion(0);
switch (version)
{
case 0:
break;
}
}
示例10: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
writer.Write(Hue);
break;
}
}
示例11: Serialize
public void Serialize(GenericWriter writer)
{
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.Write(VoteTime);
writer.Write(VoteSite.UID);
}
break;
}
}
示例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;
}
示例13: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.Write(IndexOnStart);
}
break;
}
}
示例14: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.Write(UseCategories);
}
break;
}
}
示例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;
}
}