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


C# IDataReader.GetValueByName方法代码示例

本文整理汇总了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();
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:7,代码来源:ChatMessage.cs

示例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");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:8,代码来源:GamePlayerKickVote.cs

示例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");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:8,代码来源:ProviderInfo.cs

示例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);
        }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:8,代码来源:GamePlayerCard.cs

示例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");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:8,代码来源:ActiveConnection.cs

示例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);
        }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:12,代码来源:GameRound.cs

示例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");
        }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:16,代码来源:GamePlayer.cs

示例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);
        }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:15,代码来源:GameRoundCard.cs

示例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");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:10,代码来源:Card.cs

示例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");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:10,代码来源:Deck.cs

示例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");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:27,代码来源:Game.cs

示例12: LeaderboardRecord

 public LeaderboardRecord(IDataReader idr)
 {
     User = new User(idr);
     Points = idr.GetValueByName<Int32>("Points");
     Rank = idr.GetValueByName<Int32>("Rank");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:6,代码来源:LeaderboardRecord.cs

示例13: OAMembership

 public OAMembership(IDataReader idr)
 {
     Provider = idr.GetValueByName<String>("Provider");
     ProviderUserId = idr.GetValueByName<String>("ProviderUserId");
     UserId = idr.GetValueByName<Int32>("UserId");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:6,代码来源:OAMembership.cs

示例14: User

 public User(IDataReader idr)
 {
     UserId      = idr.GetValueByName<Int32>("UserId");
     DisplayName = idr.GetValueByName<String>("UserName");
     PictureUrl = idr.GetValueByName<String>("PictureUrl");
 }
开发者ID:kwmcrell,项目名称:ArmedCards,代码行数:6,代码来源:User.cs


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