本文整理汇总了C#中IDataReader.GetValueByName方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.GetValueByName方法的具体用法?C# IDataReader.GetValueByName怎么用?C# IDataReader.GetValueByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.GetValueByName方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChatMessage
public ChatMessage(IDataReader idr, Int32 offsetHours)
{
SentBy = idr.GetValueByName<String>("SentByUserName").HTMLDecode();
Message = idr.GetValueByName<String>("Message").HTMLDecode();
SentDate = idr.GetValueByName<DateTime>("DateSent").AddHours(offsetHours);
DateSent = SentDate.ToShortDateString() + " " + SentDate.ToLongTimeString();
}
示例2: GamePlayerKickVote
public GamePlayerKickVote(IDataReader idr)
: this()
{
GameID = idr.GetValueByName<Int32>("GameID");
KickUserId = idr.GetValueByName<Int32>("KickUserId");
Vote = idr.GetValueByName<Boolean>("Vote");
VotedUserId = idr.GetValueByName<Int32>("VotedUserId");
}
示例3: ProviderInfo
public ProviderInfo(IDataReader idr)
{
ProviderID = idr.GetValueByName<Int32>("ProviderID");
Name = idr.GetValueByName<String>("Name");
Key = idr.GetValueByName<String>("Key");
Secret = idr.GetValueByName<String>("Secret");
Purpose = idr.GetValueByName<String>("Purpose");
}
示例4: GamePlayerCard
public GamePlayerCard(IDataReader idr)
{
this.CardID = idr.GetValueByName<Int32>("CardID");
this.GameID = idr.GetValueByName<Int32>("GameID");
this.UserId = idr.GetValueByName<Int32>("UserId");
this.Card = new Card(idr);
}
示例5: ActiveConnection
public ActiveConnection(IDataReader idr)
{
ActiveConnectionID = idr.GetValueByName<String>("ActiveConnectionID");
GroupName = idr.GetValueByName<String>("GroupName");
User_UserId = idr.GetValueByName<Int32>("User_UserId");
UserName = idr.GetValueByName<String>("UserName");
ConnectionType = (Entities.Enums.ConnectionType)idr.GetValueByName<Int32>("ConnectionType");
}
示例6: GameRound
public GameRound(IDataReader idr)
: this()
{
GameRoundID = idr.GetValueByName<Int32>("GameRoundID");
Started = idr.GetValueByName<DateTime>("Started");
GameID = idr.GetValueByName<Int32>("Game_GameID");
CurrentPlayerCount = idr.GetValueByName<Int32>("CurrentPlayers");
PlayedCount = idr.GetValueByName<Int32>("Played");
CardCommander = new User(idr);
Question = new Card(idr);
}
示例7: GamePlayer
public GamePlayer(IDataReader idr)
: this()
{
GameID = idr.GetValueByName<Int32>("GameID");
User = new User(idr);
Points = idr.GetValueByName<Int32>("Points");
CardCount = idr.GetValueByName<Int32>("CardCount");
IdlePlayCount = idr.GetValueByName<Int32>("IdlePlayCount");
if (idr.HasColumn("Title"))
{
Game = new Game(idr);
}
PlayerType = (Enums.GamePlayerType)idr.GetValueByName<Int32>("Type");
}
示例8: GameRoundCard
public GameRoundCard(IDataReader idr)
{
Card_CardID = idr.GetValueByName<Int32>("CardID");
DatePlayed = idr.GetValueByName<DateTime>("DatePlayed");
Game_GameID = idr.GetValueByName<Int32>("Game_GameID");
GameRound_GameRoundID = idr.GetValueByName<Int32>("GameRound_GameRoundID");
GameRoundCardID = idr.GetValueByName<Int32>("GameRoundCardID");
PlayedBy_UserId = idr.GetValueByName<Int32>("PlayedBy_UserId");
PlayOrder = idr.GetValueByName<Int16>("PlayOrder");
Winner = idr.GetValueByName<Boolean>("Winner");
AutoPlayed = idr.GetValueByName<Boolean>("AutoPlayed");
PlayedBy = new User(idr);
Card = new Card(idr);
}
示例9: Card
public Card(IDataReader idr)
{
CardID = idr.GetValueByName<Int32>("CardID");
Content = idr.GetValueByName<String>("Content");
Instructions = idr.GetValueByName<Enums.Card.Instructions>("Instructions");
Type = idr.GetValueByName<Enums.Card.CardType>("Type");
CreatedBy_UserId = idr.GetValueByName<Int32>("CreatedBy_UserId");
NumberOfTimesPlayed = idr.GetValueByName<Int32>("NumberOfTimesPlayed");
CurrentlyInAHand = idr.GetValueByName<Boolean>("CurrentlyInAHand");
}
示例10: Deck
public Deck(IDataReader idr)
: this()
{
DeckID = idr.GetValueByName<Int32>("DeckID");
Title = idr.GetValueByName<String>("Title");
IsPrivate = idr.GetValueByName<Boolean>("IsPrivate");
Type = idr.GetValueByName<Enums.DeckType>("Type");
CreatedBy_UserId = idr.GetValueByName<Int32>("CreatedBy_UserId");
GameID = idr.GetValueByName<Int32>("GameID");
}
示例11: Game
/// <summary>
/// Constructor used by the data layer
/// </summary>
/// <param name="idr">The datareader used to build the game</param>
public Game(IDataReader idr)
: this()
{
GameID = idr.GetValueByName<Int32>("GameID");
Title = idr.GetValueByName<String>("Title");
IsPrivate = idr.GetValueByName<Boolean>("IsPrivate");
Passphrase = idr.GetValueByName<String>("Passphrase");
PointToWin = idr.GetValueByName<Int32>("PointsToWin");
MaxNumberOfPlayers = idr.GetValueByName<Int32>("MaxNumberOfPlayers");
GameCreator_UserId = idr.GetValueByName<Int32>("GameCreator_UserId");
DateCreated = idr.GetValueByName<DateTime>("DateCreated");
PlayedLast = idr.GetValueByName<DateTime?>("PlayedLast");
GameOver = idr.GetValueByName<DateTime?>("GameOver");
PlayerCount = idr.GetValueByName<Int32>("PlayerCount");
RoundCount = idr.GetValueByName<Int32>("RoundCount");
QuestionShuffleCount = idr.GetValueByName<Int32>("QuestionShuffleCount");
AnswerShuffleCount = idr.GetValueByName<Int32>("AnswerShuffleCount");
MaxNumberOfSpectators = idr.GetValueByName<Int32>("MaxNumberOfSpectators");
SpectatorCount = idr.GetValueByName<Int32>("SpectatorCount");
SecondsToPlay = idr.GetValueByName<Int32>("SecondsToPlay");
IsPersistent = idr.GetValueByName<Boolean>("IsPersistent");
OfficialDeckCount = idr.GetValueByName<Int32>("OfficialDeckCount");
}
示例12: LeaderboardRecord
public LeaderboardRecord(IDataReader idr)
{
User = new User(idr);
Points = idr.GetValueByName<Int32>("Points");
Rank = idr.GetValueByName<Int32>("Rank");
}
示例13: OAMembership
public OAMembership(IDataReader idr)
{
Provider = idr.GetValueByName<String>("Provider");
ProviderUserId = idr.GetValueByName<String>("ProviderUserId");
UserId = idr.GetValueByName<Int32>("UserId");
}
示例14: User
public User(IDataReader idr)
{
UserId = idr.GetValueByName<Int32>("UserId");
DisplayName = idr.GetValueByName<String>("UserName");
PictureUrl = idr.GetValueByName<String>("PictureUrl");
}