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


C# SQLiteDataReader.GetInt64方法代码示例

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


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

示例1: BuildStructure

 private Expense BuildStructure(SQLiteDataReader reader)
 {
     long expenseId = reader.GetInt64(0);
     long accountId = reader.GetInt64(1);
     long amount = reader.GetInt64(2);
     long categoryId = reader.GetInt64(3);
     DateTime date = DateTime.Parse(reader.GetString(4));
     string description = reader.GetString(5);
     return new Expense(expenseId, accountId, amount, categoryId, date, description);
 }
开发者ID:wtain,项目名称:FinCalc,代码行数:10,代码来源:ExpensesManager.cs

示例2: MapDataReaderToContentDto

        internal static void MapDataReaderToContentDto(SQLiteDataReader dataReader, out ContentDto contentDto)
        {
            contentDto = new ContentDto();

            contentDto.ContentId = dataReader.GetInt64((int) ContentDao.ContentsField.ContentId);
            contentDto.UrlId = dataReader.GetInt64((int) ContentDao.ContentsField.UrlId);
            contentDto.ContentType = (ContentTypesEnum) dataReader.GetInt64((int) ContentDao.ContentsField.ContentType);
            contentDto.Element = dataReader.GetString((int) ContentDao.ContentsField.Element);
            contentDto.Element = HttpUtility.UrlDecode(contentDto.Element);
            contentDto.Line = dataReader.GetInt64((int) ContentDao.ContentsField.Line);
            contentDto.LinePosition = dataReader.GetInt64((int) ContentDao.ContentsField.LinePosition);
        }
开发者ID:jordimas,项目名称:SEOConsuasor,代码行数:12,代码来源:ContentDao.cs

示例3: BuildUserStructure

 private Person BuildUserStructure(SQLiteDataReader reader)
 {
     string name = reader.GetString(0);
     string fullName = reader.GetString(1);
     long personId = reader.GetInt64(2);
     return new Person(name, fullName, personId);
 }
开发者ID:wtain,项目名称:FinCalc,代码行数:7,代码来源:UsersManager.cs

示例4: ResourceRecord

        public ResourceRecord(SQLiteDataReader rpReader)
        {
            ID = rpReader.GetInt64("time");

            Fuel = rpReader.GetInt32("fuel");
            Bullet = rpReader.GetInt32("bullet");
            Steel = rpReader.GetInt32("steel");
            Bauxite = rpReader.GetInt32("bauxite");
            InstantConstruction = rpReader.GetInt32("instant_construction");
            Bucket = rpReader.GetInt32("bucket");
            DevelopmentMaterial = rpReader.GetInt32("development_material");
            ImprovementMaterial = rpReader.GetInt32("improvement_material");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:13,代码来源:ResourceRecord.cs

示例5: ReadDvbData

 protected void ReadDvbData(SQLiteDataReader r, IDictionary<string, int> field, DataRoot dataRoot, Dictionary<long, string> providers)
 {
     this.ShortName = DbSerializer.ReadUtf16(r, 16);
       this.RecordOrder = r.GetInt32(field["major"]);
       int serviceType = r.GetInt32(field["srvType"]);
       this.ServiceType = serviceType;
       this.SignalSource |= LookupData.Instance.IsRadioOrTv(serviceType);
       this.OriginalNetworkId = r.GetInt32(field["onid"]);
       this.TransportStreamId = r.GetInt32(field["tsid"]);
       this.ServiceId = r.GetInt32(field["progNum"]);
       this.VideoPid = r.GetInt32(field["vidPid"]);
       if (!r.IsDBNull(field["provId"]))
     this.Provider = providers.TryGet(r.GetInt64(field["provId"]));
 }
开发者ID:Zerovoice,项目名称:ChanSort,代码行数:14,代码来源:DbChannel.cs

示例6: DevelopmentRecord

        internal DevelopmentRecord(SQLiteDataReader rpReader)
        {
            ID = rpReader.GetInt64("time");

            var rEquipmentID = rpReader.GetInt32Optional("equipment");
            if (rEquipmentID.HasValue)
                Equipment = KanColleGame.Current.MasterInfo.Equipment[rEquipmentID.Value];

            FuelConsumption = rpReader.GetInt32("fuel");
            BulletConsumption = rpReader.GetInt32("bullet");
            SteelConsumption = rpReader.GetInt32("steel");
            BauxiteConsumption = rpReader.GetInt32("bauxite");

            SecretaryShip = KanColleGame.Current.MasterInfo.Ships[rpReader.GetInt32("flagship")];
            HeadquarterLevel = rpReader.GetInt32("hq_level");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:16,代码来源:DevelopmentRecord.cs

示例7: FateRecord

        internal FateRecord(SQLiteDataReader rpReader)
        {
            ID = rpReader.GetInt64("time");

            var rMasterInfo = KanColleGame.Current.MasterInfo;
            var rMasterID = rpReader.GetInt32("master_id");
            IsEquipment = rpReader.GetBoolean("is_equipment");
            if (!IsEquipment)
                Ship = rMasterInfo.Ships[rMasterID];
            else
                Equipment = rMasterInfo.Equipment[rMasterID];

            Level = rpReader.GetInt32("level");
            Proficiency = rpReader.GetInt32("proficiency");

            Fate = (Fate)rpReader.GetInt32("fate");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:17,代码来源:FateRecord.cs

示例8: ConstructionRecord

        internal ConstructionRecord(SQLiteDataReader rpReader)
        {
            ID = rpReader.GetInt64("time");

            Ship = KanColleGame.Current.MasterInfo.Ships[rpReader.GetInt32("ship")];

            FuelConsumption = rpReader.GetInt32("fuel");
            BulletConsumption = rpReader.GetInt32("bullet");
            SteelConsumption = rpReader.GetInt32("steel");
            BauxiteConsumption = rpReader.GetInt32("bauxite");
            DevelopmentMaterialConsumption = rpReader.GetInt32("dev_material");

            SecretaryShip = KanColleGame.Current.MasterInfo.Ships[rpReader.GetInt32("flagship")];
            HeadquarterLevel = rpReader.GetInt32("hq_level");

            EmptyDockCount = rpReader.GetInt32Optional("empty_dock");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:17,代码来源:ConstructionRecord.cs

示例9: SortieConsumptionRecord

        internal SortieConsumptionRecord(SQLiteDataReader rpReader) : base(rpReader)
        {
            ID = rpReader.GetInt64("id");

            var rMapMaxHP = rpReader.GetInt32Optional("map_max_hp");
            if (rMapMaxHP.HasValue)
            {
                var rMapHP = rpReader.GetInt32Optional("map_hp");
                if (rMapHP.HasValue)
                    MapHP = new ClampedValue(rMapMaxHP.Value, rMapHP.Value);
            }

            Fuel = rpReader.GetInt32("fuel");
            Bullet = rpReader.GetInt32("bullet");
            Steel = rpReader.GetInt32("steel");
            Bauxite = rpReader.GetInt32("bauxite");
            Bucket = rpReader.GetInt32("bucket");

            RankingPoint = rpReader.GetDoubleOptional("ranking_point");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:20,代码来源:SortieConsumptionRecord.cs

示例10: DbChannel

    internal DbChannel(SQLiteDataReader r, IDictionary<string, int> field, DataRoot dataRoot, Dictionary<long, string> providers, Satellite sat, Transponder tp)
    {
      var chType = r.GetInt32(field["chType"]);
      this.SignalSource = DbSerializer.ChTypeToSignalSource(chType);

      this.RecordIndex = r.GetInt64(field["SRV.srvId"]);
      this.OldProgramNr = r.GetInt32(field["major"]);
      this.FreqInMhz = (decimal)r.GetInt32(field["freq"]) / 1000;
      this.ChannelOrTransponder = 
        (this.SignalSource & SignalSource.DvbT) == SignalSource.DvbT ? LookupData.Instance.GetDvbtTransponder(this.FreqInMhz).ToString() :
        (this.SignalSource & SignalSource.DvbC) == SignalSource.DvbC ? LookupData.Instance.GetDvbcTransponder(this.FreqInMhz).ToString() :
        (this.SignalSource & SignalSource.Sat) == SignalSource.DvbS ? LookupData.Instance.GetAstraTransponder((int)this.FreqInMhz).ToString() :
        "";
      this.Name = DbSerializer.ReadUtf16(r, 6);
      this.Hidden = r.GetBoolean(field["hidden"]);
      this.Encrypted = r.GetBoolean(field["scrambled"]);
      this.Lock = r.GetBoolean(field["lockMode"]);
      this.Skip = !r.GetBoolean(field["numSel"]);

      if (sat != null)
      {
        this.Satellite = sat.Name;
        this.SatPosition = sat.OrbitalPosition;
      }
      if (tp != null)
      {
        this.Transponder = tp;
        this.SymbolRate = tp.SymbolRate;
      }

      if ((this.SignalSource & SignalSource.Digital) != 0)
        this.ReadDvbData(r, field, dataRoot, providers);
      else
        this.ReadAnalogData(r, field);

      base.IsDeleted = this.OldProgramNr == -1;
    }
开发者ID:mervick,项目名称:ChanSort,代码行数:37,代码来源:DbChannel.cs

示例11: ReadValue

 public static void ReadValue(SQLiteDataReader reader, int index, TypeStorage type, ICdlValueWriter writer)
 {
     switch (type)
     {
         case TypeStorage.Boolean:
             writer.SetBoolean(reader.GetInt32(index) != 0);
             break;
         case TypeStorage.Byte:
             writer.SetByte((byte) reader.GetInt32(index));
             break;
         case TypeStorage.Int16:
             writer.SetInt16((short) reader.GetInt32(index));
             break;
         case TypeStorage.Int32:
             writer.SetInt32((int) reader.GetInt32(index));
             break;
         case TypeStorage.Int64:
             writer.SetInt64((long) reader.GetInt64(index));
             break;
         case TypeStorage.SByte:
             writer.SetSByte((sbyte) reader.GetInt32(index));
             break;
         case TypeStorage.UInt16:
             writer.SetUInt16((ushort) reader.GetInt32(index));
             break;
         case TypeStorage.UInt32:
             writer.SetUInt32((uint) reader.GetInt32(index));
             break;
         case TypeStorage.UInt64:
             writer.SetUInt64((ulong) reader.GetInt64(index));
             break;
         case TypeStorage.DateTime:
             writer.SetDateTime(DateTime.Parse(reader.GetString(index), CultureInfo.InvariantCulture));
             //writer.SetDateTime(DateTime.ParseExact(reader.GetString(index), "s", CultureInfo.InvariantCulture));
             break;
         case TypeStorage.DateTimeEx:
             writer.SetDateTimeEx(DateTimeEx.ParseNormalized(reader.GetString(index)));
             break;
         case TypeStorage.DateEx:
             writer.SetDateEx(DateEx.ParseNormalized(reader.GetString(index)));
             break;
         case TypeStorage.TimeEx:
             writer.SetTimeEx(TimeEx.ParseNormalized(reader.GetString(index)));
             break;
         case TypeStorage.Decimal:
             {
                 var dtype = reader.GetFieldType(index);
                 decimal value;
                 if (dtype == typeof (string))
                 {
                     value = Decimal.Parse(reader.GetString(index), CultureInfo.InvariantCulture);
                 }
                 else
                 {
                     value = (decimal) reader.GetDouble(index);
                 }
                 writer.SetDecimal(value);
             }
             break;
         case TypeStorage.Float:
             writer.SetFloat((float) reader.GetDouble(index));
             break;
         case TypeStorage.Double:
             writer.SetDouble((double) reader.GetDouble(index));
             break;
         case TypeStorage.String:
             writer.SetString(reader.GetString(index));
             break;
         case TypeStorage.Guid:
             writer.SetGuid(new Guid(reader.GetString(index)));
             break;
         case TypeStorage.ByteArray:
             writer.SetByteArray((byte[]) reader.GetValue(index));
             break;
         case TypeStorage.Null:
             writer.SetNull();
             break;
         default:
             throw new Exception("DBSH-00167 Unsupported field type:" + type.ToString());
     }
 }
开发者ID:dbshell,项目名称:dbshell,代码行数:81,代码来源:StorageTool.cs

示例12: ReadCard

        static Card ReadCard(SQLiteDataReader reader,bool reNewLine)
        {
            Card c = new Card(0);
            c.id = reader.GetInt64(reader.GetOrdinal("id"));
            c.ot = reader.GetInt32(reader.GetOrdinal("ot"));
            c.alias = reader.GetInt64(reader.GetOrdinal("alias"));
            c.setcode = reader.GetInt64(reader.GetOrdinal("setcode"));
            c.type = reader.GetInt64(reader.GetOrdinal("type"));
            c.atk = reader.GetInt32(reader.GetOrdinal("atk"));
            c.def = reader.GetInt32(reader.GetOrdinal("def"));
            c.level = reader.GetInt64(reader.GetOrdinal("level"));
            c.race = reader.GetInt64(reader.GetOrdinal("race"));
            c.attribute = reader.GetInt32(reader.GetOrdinal("attribute"));
            c.category = reader.GetInt64(reader.GetOrdinal("category"));
            c.name = reader.GetString(reader.GetOrdinal("name"));

            c.desc = reader.GetString(reader.GetOrdinal("desc"));
            if(reNewLine)
                c.desc=Retext(c.desc);
            string temp = null;
            for ( int i = 0; i < 0x10; i++ )
            {
                temp = reader.GetString(reader.GetOrdinal("str"+(i+1).ToString()));
                c.Str[i]= ( temp == null ) ? "":temp;
            }
            return c;
        }
开发者ID:yugiohone,项目名称:DataEditorX,代码行数:27,代码来源:DataBase.cs

示例13: MapDataReaderToUrlDto

 private static void MapDataReaderToUrlDto(SQLiteDataReader dataReader, out UrlDto urlDto)
 {
     urlDto = new UrlDto();
     urlDto.UrlId = dataReader.GetInt64((int)UrlsField.UrlId);
     urlDto.Url = dataReader.GetString((int)UrlsField.Url);
     urlDto.Url = HttpUtility.UrlDecode(urlDto.Url);
     urlDto.Status = (HttpStatusCode) dataReader.GetInt32((int)UrlsField.Status);
     urlDto.IsWebPage = dataReader.GetInt32((int)UrlsField.IsWebPage) > 0;
 }
开发者ID:jordimas,项目名称:SEOConsuasor,代码行数:9,代码来源:UrlDao.cs

示例14: ReadOneInt64

 private long ReadOneInt64(SQLiteDataReader reader)
 {
     return reader.GetInt64(0);
 }
开发者ID:cmberryau,项目名称:data-providers,代码行数:4,代码来源:SQLiteDataSource.cs

示例15: MakeCrashReport

		private CrashReport MakeCrashReport(SQLiteDataReader reader)
		{
			Guid g = reader.GetGuid(0); //Guid.Parse(reader.GetString(0)));
			long l = reader.GetInt64(1);
			string s1 = reader.GetString(2);
			string s2 = reader.GetString(3);
			string s3 = reader.GetString(4);
			string s4 = reader.GetString(5);
			Version v = Version.Parse(reader.GetString(6));
			string s6 = reader.GetValue(7) as string;         //Not GetString as GetString throws an invalidCast 
			string s7 = reader.GetValue(8) as string;         //(or another exception, cannot rmbr)
			string userstory = reader.GetValue(9) as string;  //If the value is null, and this and following fields 
			string trace = reader.GetValue(10) as string;     //can be null as they aren't set before zip is downloaded


			return new CrashReport(innerApi, g, l, s1, s2, s3, s4, v, s6, s7, trace, userstory);
		}
开发者ID:Rockzo,项目名称:chummer5a,代码行数:17,代码来源:Database.cs


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