/// <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); }
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"); }
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"); }
/// <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); }
/// <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; }
/// <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; }
/// <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); }
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"); }
/// <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); }
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[])); }
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(); }
/// <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); }
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"); }
/// <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)); }
/// <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); }
/// <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 WorldStatsUserConsumeItemTable source, System.Data.IDataRecord dataRecord) { System.Int32 i; i = dataRecord.GetOrdinal("id"); source.ID = (System.UInt32)(System.UInt32)dataRecord.GetUInt32(i); i = dataRecord.GetOrdinal("item_template_id"); source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)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("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); }
/// <summary> /// Constructor required for serialisation purposes. Not recommended for direct use. /// </summary> /// <param name="info">A <see cref="System.Runtime.Serialization.SerializationInfo"/> instance used to deserialise the object.</param> /// <param name="context">A <see cref="System.Runtime.Serialization.StreamingContext"/> instance used to deserialise the object.</param> protected NtpNetworkException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException(nameof(info)); _SocketErrorCode = info.GetInt32("SocketErrorCode"); }
private FloatImage( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context ) { width = info.GetInt32( "width" ); data = (float[][])info.GetValue( "data", typeof( float[][] ) ); height = data[0].Length / width; }
protected DataServiceClientException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) : base(serializationInfo, context) { if (serializationInfo != null) { this.statusCode = serializationInfo.GetInt32("statusCode"); } }
/// <summary>Initializes the exception from its serialized state</summary> /// <param name="info">Contains the serialized fields of the exception</param> /// <param name="context">Additional environmental informations</param> protected CddbException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context ) : base(info, context) { this.statusCode = info.GetInt32("statusCode"); }
public object MapRow(System.Data.IDataReader reader, int rowNum) { User model = new User(); model.id = reader.GetInt32(0); model.name = reader.GetString(1); model.pwd = reader.GetString(2); return model; }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if(info==null) throw new ArgumentNullException("info"); this.errorCode = info.GetInt32("errorCode"); this.errorText = info.GetString("errorText"); base.GetObjectData(info, context); }
public override void Load(System.Data.IDataRecord record) { Id = record.GetInt32(0); OKPO = record.GetString(1); SOATO = record.GetString(2); INN = record.GetString(3); Name = record.GetString(4); Type = (OrgType)record.GetByte(5); }
protected MincostLiblinearClassifier(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context1) : base(info, context1) { m_delta = info.GetDouble("delta"); m_mustValue = info.GetInt32("mustValue"); string modelFileName = info.GetString("BaseCls"); base.m_Classifier = (Classifier)weka.core.SerializationHelper.read(modelFileName); }
protected CancelNodeEventException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { var id = info.GetInt32("Node"); Node = id == 0 ? null : Node.LoadNode(id); Event = (CancellableNodeEvent)info.GetValue("Event", typeof(CancellableNodeEvent)); }
private OutputQueueData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { try { ruleid = info.GetInt32("ruleid"); priority = info.GetInt32("priority"); mode = (OutputModeEnum)info.GetValue("mode", typeof(OutputModeEnum)); _IsSuccess = info.GetBoolean("_IsSuccess"); _devName = info.GetString("_devName"); _status = info.GetInt32("_status"); data = info.GetValue("data", typeof(object)); } catch (Exception ex) { Console.WriteLine(ex.Message + "," + ex.StackTrace); } }
private ContainerInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this._id = info.GetInt32("id"); this._title = info.GetString("title"); this._touched = info.GetDateTime("touched"); // setup events this.SetupEvents(); }
/// <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 QuestTable source, System.Data.IDataRecord dataRecord) { System.Int32 i; i = dataRecord.GetOrdinal("id"); source.ID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i); i = dataRecord.GetOrdinal("repeatable"); source.Repeatable = (System.Boolean)(System.Boolean)dataRecord.GetBoolean(i); i = dataRecord.GetOrdinal("reward_cash"); source.RewardCash = (System.Int32)(System.Int32)dataRecord.GetInt32(i); i = dataRecord.GetOrdinal("reward_exp"); source.RewardExp = (System.Int32)(System.Int32)dataRecord.GetInt32(i); }
/// <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 WorldStatsCountUserKillNpcTable source, System.Data.IDataRecord dataRecord) { System.Int32 i; i = dataRecord.GetOrdinal("count"); source.Count = (System.Int32)(System.Int32)dataRecord.GetInt32(i); i = dataRecord.GetOrdinal("last_update"); source.LastUpdate = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i); i = dataRecord.GetOrdinal("npc_template_id"); source.NPCTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i); i = dataRecord.GetOrdinal("user_id"); source.UserID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i); }
/// <summary> /// Permet de remplir les propriétés de mappage de l'entité highscore. /// </summary> /// <param name="reader">reader contenant les données.</param> /// <returns>Un objet adminDTO.</returns> public override Mappage.DTOBase populateDTO(System.Data.SqlClient.SqlDataReader reader) { highscoreDTO highscore = new highscoreDTO(); if (!reader.IsDBNull(ordHighscoreGuid)) { highscore.highscoreGuid = reader.GetGuid(ordHighscoreGuid); } if (!reader.IsDBNull(ordHighscorePseudo)) { highscore.highscorePseudo = reader.GetString(ordHighscorePseudo); } if (!reader.IsDBNull(ordHighscoreScore)) { highscore.highscoreScore = reader.GetInt32(ordHighscoreScore); } highscore.isNew = false; return highscore; }