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


C# GenericReader.ReadIPAddress方法代码示例

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


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

示例1: RaffleEntry

        public RaffleEntry(GenericReader reader, int version)
        {
            switch ( version )
            {
                case 3: // HouseRaffleStone version changes
                case 2:
                case 1:
                case 0:
                    {
                        this.m_From = reader.ReadMobile();
                        this.m_Address = Utility.Intern(reader.ReadIPAddress());
                        this.m_Date = reader.ReadDateTime();

                        break;
                    }
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:17,代码来源:HouseRaffleStone.cs

示例2: Deserialize

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

            JoinedIPs = new List<IPAddress>();

            int version = reader.ReadInt();

            int count = reader.ReadInt();
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    var r = reader.ReadIPAddress();
                    JoinedIPs.Add(r);
                }
            }
            _Instance = this;
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:19,代码来源:NewGuildPersistence.cs

示例3: ShardPollOption

        public ShardPollOption(GenericReader reader)
        {
            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                    {
                        this.m_Title = reader.ReadString();
                        this.m_LineBreaks = this.GetBreaks(this.m_Title);

                        this.m_Voters = new IPAddress[reader.ReadInt()];

                        for (int i = 0; i < this.m_Voters.Length; ++i)
                            this.m_Voters[i] = Utility.Intern(reader.ReadIPAddress());

                        break;
                    }
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:20,代码来源:ShardPoller.cs

示例4: Voter

		public Voter( GenericReader reader, Mobile candidate )
		{
			m_Candidate = candidate;

			int version = reader.ReadEncodedInt();

			switch ( version )
			{
				case 0:
				{
					m_From = reader.ReadMobile();
					m_Address = Utility.Intern( reader.ReadIPAddress() );
					m_Time = reader.ReadDateTime();

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

示例5: Deserialize

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

			int version = reader.ReadInt();

		    switch (version)
		    {
		        case 1:
		        {
                    int referredcount = reader.ReadInt();

                    if (referredcount > 0)
                    {
                        ReferredList = new List<IPAddress>();

                        for (int i = 0; i < referredcount; i++)
                        {
                            IPAddress r = reader.ReadIPAddress();
                            ReferredList.Add(r);
                        }
                    }

		            goto case 0;
		        }
                case 0:
		        {
                    m_PointsAvailable = reader.ReadInt();
                    m_PointsSpent = reader.ReadInt();
                    m_RewardsChosen = reader.ReadInt();
                    m_LastRewardChosen = reader.ReadDateTime();

		            break;
		        }
		    }
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:36,代码来源:XmlReferralRewards.cs

示例6: DeserializeObject

		public object DeserializeObject(GenericReader reader)
		{
			object output = null;
			XmlObjectType xmlObjectType = (XmlObjectType)reader.ReadInt();

			if (xmlObjectType == XmlObjectType.Mobile)
			{
				output = reader.ReadMobile();
			}
			else if (xmlObjectType == XmlObjectType.Item)
			{
				output = reader.ReadItem();
			}
			else if (xmlObjectType == XmlObjectType.MobileList)
			{
				output = reader.ReadStrongMobileList();
			}
			else if (xmlObjectType == XmlObjectType.ItemList)
			{
				output = reader.ReadStrongItemList();
			}
			else if (xmlObjectType == XmlObjectType.ArrayList)
			{
				int elements = reader.ReadInt();
				ArrayList list = new ArrayList(elements);
				for (int i = 0; i < elements; i++)
				{
					list.Add(DeserializeObject(reader));
				}
				output = list;
			}
			else if (xmlObjectType == XmlObjectType.DateTime)
			{
				output = reader.ReadDateTime();
			}
			else if (xmlObjectType == XmlObjectType.DateTimeOffset)
			{
				output = reader.ReadDateTimeOffset();
			}
			else if (xmlObjectType == XmlObjectType.BaseGuild)
			{
				output = reader.ReadGuild();
			}
			else if (xmlObjectType == XmlObjectType.IPAddress)
			{
				output = reader.ReadIPAddress();
			}
			else if (xmlObjectType == XmlObjectType.Map)
			{
				output = reader.ReadMap();
			}
			else if (xmlObjectType == XmlObjectType.Point3D)
			{
				output = reader.ReadPoint3D();
			}
			else if (xmlObjectType == XmlObjectType.Point2D)
			{
				output = reader.ReadPoint2D();
			}
			else if (xmlObjectType == XmlObjectType.TimeSpan)
			{
				output = reader.ReadTimeSpan();
			}
			else if (xmlObjectType == XmlObjectType.Rectangle2D)
			{
				output = reader.ReadRect2D();
			}
			else if (xmlObjectType == XmlObjectType.Rectangle3D)
			{
				output = reader.ReadRect3D();
			}
			else if (xmlObjectType == XmlObjectType.Double)
			{
				output = reader.ReadDouble();
			}
			else if (xmlObjectType == XmlObjectType.Integer)
			{
				output = reader.ReadInt();
			}
			else if (xmlObjectType == XmlObjectType.Boolean)
			{
				output = reader.ReadBool();
			}
			else if (xmlObjectType == XmlObjectType.UInt64)
			{
				output = reader.ReadULong();
			}
			else if (xmlObjectType == XmlObjectType.String)
			{
				output = reader.ReadString();
			}
			else if (xmlObjectType == XmlObjectType.Type)
			{
				output = UberScriptFunctions.Methods.TYPE(null, reader.ReadString());
			}
			else if (xmlObjectType == XmlObjectType.Other)
			{
				LoggingCustom.Log(
					"ERROR_Uberscript.txt",
					DateTime.Now + ": xmlobject: " + Name + " attached to " + AttachedTo +
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:XmlObject.cs


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