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


C# System.GetInt32方法代码示例

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


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

示例1: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this AccountBanTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("account_id");

source.AccountID = (DemoGame.AccountID)(DemoGame.AccountID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("end_time");

source.EndTime = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);

i = dataRecord.GetOrdinal("expired");

source.Expired = (System.Boolean)(System.Boolean)dataRecord.GetBoolean(i);

i = dataRecord.GetOrdinal("id");

source.ID = (System.Int32)(System.Int32)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("issued_by");

source.IssuedBy = (System.String)(System.String)(dataRecord.IsDBNull(i) ? (System.String)null : dataRecord.GetString(i));

i = dataRecord.GetOrdinal("reason");

source.Reason = (System.String)(System.String)dataRecord.GetString(i);

i = dataRecord.GetOrdinal("start_time");

source.StartTime = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);
}
开发者ID:wtfcolt,项目名称:game,代码行数:39,代码来源:AccountBanTableDbExtensions.cs

示例2: NumericUrlRangeModel

 private NumericUrlRangeModel(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
     : base(info, context)
 {
     this.range1 = info.GetInt32("range1");
     this.range2 = info.GetInt32("range2");
     this.zero = info.GetUInt16("zero");
 }
开发者ID:erpframework,项目名称:spiderframework,代码行数:7,代码来源:NumericUrlRangeModel.cs

示例3: SiteInfo

 private SiteInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
     : base(info, context)
 {
     this._id = info.GetInt32("id");
     this._domain = info.GetString("domain");
     this._subDomain = info.GetString("subDomain");
     this._touched = info.GetDateTime("touched");
     this._section_id = info.GetInt32("section_id");
     this._originalTheme = info.GetString("originalTheme");
     this._originalStyle = info.GetString("originalStyle");
 }
开发者ID:nberardi,项目名称:omniportal,代码行数:11,代码来源:SiteInfo.cs

示例4: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this ActiveTradeItemTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("character_id");

source.CharacterID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("item_id");

source.ItemID = (DemoGame.ItemID)(DemoGame.ItemID)dataRecord.GetInt32(i);
}
开发者ID:wtfcolt,项目名称:game,代码行数:19,代码来源:ActiveTradeItemTableDbExtensions.cs

示例5: populateDTO

        /// <summary>
        /// Permet remplir les propriétés de mappage de l'entité métier.
        /// </summary>
        /// <param name="reader">reader contenant les données.</param>
        /// <returns>Un objet metierDTO.</returns>
        public override Mappage.DTOBase populateDTO(System.Data.SqlClient.SqlDataReader reader)
        {
            metierDTO metier = new metierDTO();

            if (!reader.IsDBNull(ordMetierGuid)) { metier.metierGuid = reader.GetGuid(ordMetierGuid); }
            if (!reader.IsDBNull(ordMetierNom)) { metier.metierNom = reader.GetString(ordMetierNom); }
            if (!reader.IsDBNull(ordMetierFiche)) { metier.metierFiche = reader.GetString(ordMetierFiche); }
            if (!reader.IsDBNull(ordMetierScoreReseau)) { metier.metierScoreReseau = reader.GetInt32(ordMetierScoreReseau); }
            if (!reader.IsDBNull(ordMetierScoreLogiciel)) { metier.metierScorelogiciel = reader.GetInt32(ordMetierScoreLogiciel); }

            metier.isNew = false;
            return metier;
        }
开发者ID:ZRizzen,项目名称:Projet.net,代码行数:18,代码来源:DTOParserMetier.cs

示例6: populateDTO

        /// <summary>
        /// Permet de remplir les propriétés de mappage de l'entité question.
        /// </summary>
        /// <param name="reader">reader contenant les données.</param>
        /// <returns>Un objet questionDTO.</returns>
        public override Mappage.DTOBase populateDTO(System.Data.SqlClient.SqlDataReader reader)
        {
            questionDTO question = new questionDTO(); // On crée un nouveau questionDTO. Etant donné qu'il hérite de DTOBase on peut l'utiliser comme valeur de retour.

            // On utilise l'ordinal correspondant pour s'assurer que la valeur retournée par le reader n'est pas null.
            // Si cette valeur n'est pas null, on utilise getXXX typée du reader pour obtenir la valeur.
            if (!reader.IsDBNull(ordQuestionGuid)) { question.questionGuid = reader.GetGuid(ordQuestionGuid); }
            if (!reader.IsDBNull(ordQuestionIntitule)) { question.questionIntitule = reader.GetString(ordQuestionIntitule); }
            if (!reader.IsDBNull(ordQuestionReponseGuid)) { question.questionReponseGuid = reader.GetInt32(ordQuestionReponseGuid); }
            if (!reader.IsDBNull(ordQuestionDifficulteGuid)) { question.questionDifficulteGuid = reader.GetInt32(ordQuestionDifficulteGuid); }
            if (!reader.IsDBNull(ordQuestionTypeGuid)) { question.questionTypeGuid = reader.GetInt32(ordQuestionTypeGuid); }

            question.isNew = false;
            return question;
        }
开发者ID:ZRizzen,项目名称:Projet.net,代码行数:20,代码来源:DTOParserQuestion.cs

示例7: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this WorldStatsUserShoppingTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("amount");

source.Amount = (System.Byte)(System.Byte)dataRecord.GetByte(i);

i = dataRecord.GetOrdinal("character_id");

source.CharacterID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("cost");

source.Cost = (System.Int32)(System.Int32)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("id");

source.ID = (System.UInt32)(System.UInt32)dataRecord.GetUInt32(i);

i = dataRecord.GetOrdinal("item_template_id");

source.ItemTemplateID = (System.Nullable<DemoGame.ItemTemplateID>)(System.Nullable<DemoGame.ItemTemplateID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));

i = dataRecord.GetOrdinal("map_id");

source.MapID = (System.Nullable<NetGore.World.MapID>)(System.Nullable<NetGore.World.MapID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));

i = dataRecord.GetOrdinal("sale_type");

source.SaleType = (System.SByte)(System.SByte)dataRecord.GetSByte(i);

i = dataRecord.GetOrdinal("shop_id");

source.ShopID = (NetGore.Features.Shops.ShopID)(NetGore.Features.Shops.ShopID)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("when");

source.When = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);

i = dataRecord.GetOrdinal("x");

source.X = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("y");

source.Y = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
}
开发者ID:mateuscezar,项目名称:netgore,代码行数:55,代码来源:WorldStatsUserShoppingTableDbExtensions.cs

示例8: ContractException

 private ContractException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
     : base(info, context)
 {
     _Kind = (ContractFailureKind)info.GetInt32("Kind");
     _UserMessage = info.GetString("UserMessage");
     _Condition = info.GetString("Condition");
 }
开发者ID:mesheets,项目名称:Theraot-CF,代码行数:7,代码来源:ContractException.net40.cs

示例9: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this WorldStatsQuestAcceptTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("id");

source.ID = (System.UInt32)(System.UInt32)dataRecord.GetUInt32(i);

i = dataRecord.GetOrdinal("map_id");

source.MapID = (System.Nullable<NetGore.World.MapID>)(System.Nullable<NetGore.World.MapID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));

i = dataRecord.GetOrdinal("quest_id");

source.QuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("user_id");

source.UserID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("when");

source.When = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);

i = dataRecord.GetOrdinal("x");

source.X = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("y");

source.Y = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
}
开发者ID:wtfcolt,项目名称:game,代码行数:39,代码来源:WorldStatsQuestAcceptTableDbExtensions.cs

示例10: CryExtInfo

        protected CryExtInfo(System.Runtime.Serialization.SerializationInfo info, 
		                      System.Runtime.Serialization.StreamingContext context)
        {
            this.Count = info.GetInt32 ("Count");
            this.Key = (byte[])info.GetValue ("Key", typeof(byte[]));
            this.Salt = (byte[])info.GetValue ("Salt", typeof(byte[]));
        }
开发者ID:shby0527,项目名称:Mohachi,代码行数:7,代码来源:PBKDF2.cs

示例11: VariantReference

        private VariantReference(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            _valueReference = null;
            _unityObjectReference = null;

            _type = (VariantType)info.GetInt32("type");
            switch (_type)
            {
                case VariantType.Object:
                case VariantType.GameObject:
                case VariantType.Component:
                    //do nothing
                    break;
                case VariantType.Vector2:
                case VariantType.Vector3:
                case VariantType.Quaternion:
                case VariantType.Color:
                    var arr = StringUtil.SplitFixedLength(info.GetString("vector"), ",", 4);
                    //_vectorStore = new Vector4(ConvertUtil.ToSingle(arr[0]),
                    //                           ConvertUtil.ToSingle(arr[1]),
                    //                           ConvertUtil.ToSingle(arr[2]),
                    //                           ConvertUtil.ToSingle(arr[3]));
                    break;
                default:
                    _valueReference = info.GetString("value");
                    break;
            }
            (this as ISerializationCallbackReceiver).OnAfterDeserialize();
        }
开发者ID:XianWorld,项目名称:spacepuppy-unity-framework,代码行数:29,代码来源:VariantReference.cs

示例12: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this CharacterTemplateInventoryTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("chance");

source.Chance = (DemoGame.ItemChance)(DemoGame.ItemChance)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("character_template_id");

source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("id");

source.ID = (System.Int32)(System.Int32)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("item_template_id");

source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)dataRecord.GetUInt16(i);

i = dataRecord.GetOrdinal("max");

source.Max = (System.Byte)(System.Byte)dataRecord.GetByte(i);

i = dataRecord.GetOrdinal("min");

source.Min = (System.Byte)(System.Byte)dataRecord.GetByte(i);
}
开发者ID:wtfcolt,项目名称:game,代码行数:35,代码来源:CharacterTemplateInventoryTableDbExtensions.cs

示例13: FbException

		internal FbException(
            System.Runtime.Serialization.SerializationInfo info, 
            System.Runtime.Serialization.StreamingContext context) : base(info, context)
		{
			this.errors = (FbErrorCollection)info.GetValue("errors", typeof(FbErrorCollection));
			this.errorCode = info.GetInt32("errorCode");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:FbException.cs

示例14: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this AccountCharacterTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("account_id");

source.AccountID = (DemoGame.AccountID)(DemoGame.AccountID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("character_id");

source.CharacterID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("time_deleted");

source.TimeDeleted = (System.Nullable<System.DateTime>)(System.Nullable<System.DateTime>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.DateTime>)null : dataRecord.GetDateTime(i));
}
开发者ID:mateuscezar,项目名称:netgore,代码行数:23,代码来源:AccountCharacterTableDbExtensions.cs

示例15: ReadValues

/// <summary>
/// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
/// object's properties. The database column's name is used to as the key, so the value
/// will not be found if any aliases are used or not all columns were selected.
/// </summary>
/// <param name="source">The object to add the extension method to.</param>
/// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
public static void ReadValues(this CharacterInventoryTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;

i = dataRecord.GetOrdinal("character_id");

source.CharacterID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("item_id");

source.ItemID = (DemoGame.ItemID)(DemoGame.ItemID)dataRecord.GetInt32(i);

i = dataRecord.GetOrdinal("slot");

source.Slot = (NetGore.InventorySlot)(NetGore.InventorySlot)dataRecord.GetByte(i);
}
开发者ID:mateuscezar,项目名称:netgore,代码行数:23,代码来源:CharacterInventoryTableDbExtensions.cs


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