本文整理汇总了C#中GenericReader.ReadString方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadString方法的具体用法?C# GenericReader.ReadString怎么用?C# GenericReader.ReadString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public void Deserialize( GenericReader reader, int version )
{
switch( version )
{
case 2:
{
m_Description = reader.ReadString();
goto case 1;
}
case 1:
{
m_BlessBond = reader.ReadBool();
m_BBPrice = reader.ReadInt();
goto case 0;
}
case 0:
{
m_Item = reader.ReadString();
m_Name = reader.ReadString();
m_Price = reader.ReadInt();
m_Amount = reader.ReadInt();
break;
}
}
}
示例2: VendorInventory
public VendorInventory(BaseHouse house, GenericReader reader)
{
this.m_House = house;
int version = reader.ReadEncodedInt();
this.m_Owner = reader.ReadMobile();
this.m_VendorName = reader.ReadString();
this.m_ShopName = reader.ReadString();
this.m_Items = reader.ReadStrongItemList();
this.m_Gold = reader.ReadInt();
this.m_ExpireTime = reader.ReadDeltaTime();
if (this.m_Items.Count == 0 && this.m_Gold == 0)
{
Timer.DelayCall(TimeSpan.Zero, new TimerCallback(Delete));
}
else
{
TimeSpan delay = this.m_ExpireTime - DateTime.Now;
this.m_ExpireTimer = new ExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
this.m_ExpireTimer.Start();
}
}
示例3: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_House = reader.ReadItem() as BaseHouse;
goto case 0;
}
case 0:
{
m_Description = reader.ReadString();
m_Marked = reader.ReadBool();
m_Target = reader.ReadPoint3D();
m_TargetMap = reader.ReadMap();
CalculateHue();
break;
}
}
}
示例4: LocationStruct
public LocationStruct(GenericReader reader)
{
int version = reader.ReadInt();
Map = reader.ReadMap();
Location = reader.ReadPoint3D();
Name = reader.ReadString();
}
示例5: BOBSmallEntry
public BOBSmallEntry( GenericReader reader )
{
int version = reader.ReadEncodedInt();
switch ( version )
{
case 0:
{
string type = reader.ReadString();
if ( type != null )
m_ItemType = ScriptCompiler.FindTypeByFullName( type );
m_RequireExceptional = reader.ReadBool();
m_DeedType = (BODType)reader.ReadEncodedInt();
m_Material = (BulkMaterialType)reader.ReadEncodedInt();
m_AmountCur = reader.ReadEncodedInt();
m_AmountMax = reader.ReadEncodedInt();
m_Number = reader.ReadEncodedInt();
m_Graphic = reader.ReadEncodedInt();
m_Price = reader.ReadEncodedInt();
break;
}
}
}
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
reader.ReadInt();
reader.ReadInt();
reader.ReadInt();
//this.m_TextColor = reader.ReadInt();
//this.m_TitleColor = reader.ReadInt();
//this.m_size = reader.ReadInt();
}
break;
case 0:
{
reader.ReadString();
reader.ReadString();
reader.ReadInt();
reader.ReadInt();
reader.ReadInt();
//this.NoteString = reader.ReadString();
//this.TitleString = reader.ReadString();
//this.m_TextColor = reader.ReadInt();
//this.m_TitleColor = reader.ReadInt();
//this.m_size = reader.ReadInt();
}
break;
}
}
示例7: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_LabelNumber = reader.ReadInt();
m_From = reader.ReadString();
m_To = reader.ReadString();
Utility.Intern(ref m_From);
Utility.Intern(ref m_To);
}
示例8: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 3:
{
m_BeforeChangeover = reader.ReadBool();
goto case 2;
}
case 2:
{
m_GuildName = reader.ReadString();
m_GuildAbbrev = reader.ReadString();
goto case 1;
}
case 1:
{
m_Guild = reader.ReadGuild() as Guild;
goto case 0;
}
case 0:
{
break;
}
}
if( Guild.NewGuildSystem && ItemID == 0xED4 )
ItemID = 0xED6;
if( m_Guild != null )
{
m_GuildName = m_Guild.Name;
m_GuildAbbrev = m_Guild.Abbreviation;
}
if( version <= 2 )
m_BeforeChangeover = true;
if( Guild.NewGuildSystem && m_BeforeChangeover )
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( AddToHouse ) );
if( !Guild.NewGuildSystem && m_Guild == null )
this.Delete();
}
示例9: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
this.m_Condition = reader.ReadString();
goto case 0;
case 0:
this.m_Action = reader.ReadString();
break;
}
}
示例10: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
m_ForumAccount = reader.ReadString();
}
示例11: ReadType
public static Type ReadType(Type[] referenceTable, GenericReader reader)
{
int encoding = reader.ReadEncodedInt();
switch ( encoding )
{
default:
case 0x00: // null
{
return null;
}
case 0x01: // indexed
{
int index = reader.ReadEncodedInt();
if (index >= 0 && index < referenceTable.Length)
return referenceTable[index];
return null;
}
case 0x02: // by name
{
string fullName = reader.ReadString();
if (fullName == null)
return null;
return ScriptCompiler.FindTypeByFullName(fullName, false);
}
}
}
示例12: Deserialize
public void Deserialize( GenericReader reader )
{
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_Flag = reader.ReadItem() as IGameFlag;
goto case 0;
}
case 0:
{
m_Members = reader.ReadMobileList();
m_Home = reader.ReadPoint3D();
m_FlagHome = reader.ReadPoint3D();
m_Map = reader.ReadMap();
m_Points = reader.ReadInt();
m_Name = reader.ReadString();
m_Hue = reader.ReadInt();
m_UId = reader.ReadInt();
m_Game = reader.ReadItem() as CTFGame;
break;
}
}
}
示例13: Deserialize
public void Deserialize(GenericReader reader)
{
int version = reader.ReadInt();
int count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
ExchangeTypeInfo etinfo = null;
string fullname = reader.ReadString();
Type type = ScriptCompiler.FindTypeByFullName(fullname);
foreach (ExchangeTypeInfo eti in InfoList)
{
if (eti.Type == type)
{
etinfo = eti;
break;
}
}
if (etinfo == null)
etinfo = new ExchangeTypeInfo(typeof(Gold), "readerror");
etinfo.Deserialize(reader);
etinfo.Category = this;
}
}
示例14: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
case 0:
{
m_MultiID = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
m_ShipName = reader.ReadString();
if ( version == 0 )
reader.ReadUInt();
break;
}
}
if ( LootType == LootType.Newbied )
LootType = LootType.Blessed;
if ( Weight == 0.0 )
Weight = 1.0;
}
示例15: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version )
{
case 2: // Reset from Resource System
this.m_Resource = this.DefaultResource;
reader.ReadString();
break;
case 1:
{
this.m_Resource = (CraftResource)reader.ReadInt();
break;
}
case 0:
{
OreInfo info;
switch ( reader.ReadInt() )
{
case 0:
info = OreInfo.Iron;
break;
case 1:
info = OreInfo.DullCopper;
break;
case 2:
info = OreInfo.ShadowIron;
break;
case 3:
info = OreInfo.Copper;
break;
case 4:
info = OreInfo.Bronze;
break;
case 5:
info = OreInfo.Gold;
break;
case 6:
info = OreInfo.Agapite;
break;
case 7:
info = OreInfo.Verite;
break;
case 8:
info = OreInfo.Valorite;
break;
default:
info = null;
break;
}
this.m_Resource = CraftResources.GetFromOreInfo(info);
break;
}
}
}