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


C# GenericReader类代码示例

本文整理汇总了C#中GenericReader的典型用法代码示例。如果您正苦于以下问题:C# GenericReader类的具体用法?C# GenericReader怎么用?C# GenericReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			//ShowUsesRemaining = true;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:Pickaxe.cs

示例2: Election

		public Election( GenericReader reader )
		{
			int version = reader.ReadEncodedInt();

			switch ( version )
			{
				case 0:
				{
					m_Faction = Faction.ReadReference( reader );

					m_LastStateTime = reader.ReadDateTime();
					m_State = (ElectionState)reader.ReadEncodedInt();

					m_Candidates = new List<Candidate>();

					int count = reader.ReadEncodedInt();

					for ( int i = 0; i < count; ++i )
					{
						Candidate cd = new Candidate( reader );

						if ( cd.Mobile != null )
							m_Candidates.Add( cd );
					}

					break;
				}
			}

			StartTimer();
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:31,代码来源:Election.cs

示例3: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			/*int version = */
			reader.ReadInt();
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:7,代码来源:Cocoon.cs

示例4: Deserialize

		public override void Deserialize( GenericReader reader ) 
		{ 
			base.Deserialize( reader ); 
			int version = reader.ReadInt(); 

			m_Player = (PlayerMobile)reader.ReadMobile(); 
		} 
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:7,代码来源:Chest.cs

示例5: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			LootType = LootType.Blessed;

			int version = reader.ReadInt();
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:7,代码来源:RewardCake.cs

示例6: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
                case 2:
			        {
			            m_MaxAmount = reader.ReadInt();
                        goto case 1;
			        }
			    case 1:
				case 0:
				{
					m_Type = (PotionEffect)reader.ReadInt();
					m_Held = reader.ReadInt();

					break;
				}
			}

			if ( version < 1 )
				Timer.DelayCall( TimeSpan.Zero, new TimerCallback( UpdateWeight ) );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:26,代码来源:PotionKeg.cs

示例7: Deserialize

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                    {
                        TimeSpan duration = reader.ReadTimeSpan();

                        m_Timer = new InternalTimer(this, duration);
                        m_Timer.Start();

                        m_End = DateTime.Now + duration;

                        break;
                    }
                case 0:
                    {
                        TimeSpan duration = TimeSpan.FromSeconds(10.0);

                        m_Timer = new InternalTimer(this, duration);
                        m_Timer.Start();

                        m_End = DateTime.Now + duration;

                        break;
                    }
            }
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:32,代码来源:NaturalFire.cs

示例8: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
              		int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_End = reader.ReadDeltaTime();
                    m_EvolutionTimer = new EvolutionTimer( this, m_End - DateTime.Now );
                    m_EvolutionTimer.Start();

                    break;
                }
                case 0:
                {
                    TimeSpan duration = TimeSpan.FromDays( 1.0 );

                    m_EvolutionTimer = new EvolutionTimer( this, duration );
                    m_EvolutionTimer.Start();
                    m_End = DateTime.Now + duration;

                    break;
                }
            }
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:27,代码来源:Korpre+Egg.cs

示例9: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 2:
				{
					m_ShowUsesRemaining = reader.ReadBool();
					goto case 1;
				}
				case 1:
				{
					m_UsesRemaining = reader.ReadInt();
					goto case 0;
				}
				case 0:
				{
					if ( m_UsesRemaining < 1 )
						m_UsesRemaining = 150;

					break;
				}
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:27,代码来源:BasePoleArm.cs

示例10: Deserialize

		public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                    {
                        reader.ReadItemList();
                        goto case 0;
                    }
                case 0:
                    {
                        reader.ReadBool();
                        reader.ReadItemList();
                        reader.ReadItemList();
                        reader.ReadItemList();
                        reader.ReadItemList();
                        reader.ReadItemList();
                        reader.ReadTimeSpan();
                        reader.ReadInt();
                        break;
                    }
            }
			DeleteAll();
			Delete();
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:28,代码来源:ChampionSpawnController.cs

示例11: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
            int version = reader.ReadInt();

            m_ManaLeeched = reader.ReadInt();
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:Wraith.cs

示例12: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();
			switch (version)
			{
				case 1:
					Range = reader.ReadInt();
					goto case 0;
				case 0:
					// version 0

					m_OriginalID = reader.ReadInt();
					m_MorphID = reader.ReadInt();
					m_Duration = reader.ReadTimeSpan();
					ActivationWord = reader.ReadString();
					TimeSpan remaining = reader.ReadTimeSpan();

					if (remaining > TimeSpan.Zero)
					{
						DoTimer(remaining);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:26,代码来源:XmlMorph.cs

示例13: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_Commodity = reader.ReadItem();

			switch ( version )
			{
				case 0:
				{
					if (m_Commodity != null)
					{
						Hue = 0x592;
					}
					break;
				}
			}

			if ( m_Commodity != null && !( m_Commodity is ICommodity ) ) //Apparently, there may be items out there with this.  Funky.
			{
				Timer.DelayCall( TimeSpan.Zero, this.Delete );
			}
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:25,代码来源:CommodityDeed.cs

示例14: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			DynamicFurniture.Close( this );
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:DonationChest.cs

示例15: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();
			
			switch ( version )
			{
				case 1:
				{
					m_Music = (MusicName) reader.ReadInt();
					break;
				}
			}
			
			if ( version == 0 ) // Music wasn't serialized in version 0, pick a new track of random rarity
			{
				DawnsMusicRarity rarity;
				double rand = Utility.RandomDouble();
				
				if ( rand < 0.025 )
					rarity = DawnsMusicRarity.Rare;
				else if ( rand < 0.225 )
					rarity = DawnsMusicRarity.Uncommon;
				else
					rarity = DawnsMusicRarity.Common;
				
				m_Music = DawnsMusicBox.RandomTrack( rarity );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:30,代码来源:DawnsMusicGear.cs


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