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


C# IDataReader.AsInt方法代码示例

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


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

示例1: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: Id = dr_.AsInt(); break;
				case 1: Name = dr_.AsString(); break;
				case 2: Align = (Align)dr_.AsEnum(EnumDescriptors.Align); break;
				case 3: _weights.Add(dr_.AsDouble()); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:10,代码来源:MapTest.pb.cs

示例2: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: Uptime = (uint)dr_.AsInt(); break;
				case 1: CurrentItems = (ulong)dr_.AsLong(); break;
				case 2: CurrentBytes = (ulong)dr_.AsLong(); break;
				case 3: TotalMemory = (ulong)dr_.AsLong(); break;
				case 4: Evictions = (ulong)dr_.AsLong(); break;
				case 5: Requests = (ulong)dr_.AsLong(); break;
				case 6: GetHits = (ulong)dr_.AsLong(); break;
				case 7: Updates = (ulong)dr_.AsLong(); break;
				case 8: Misses = (ulong)dr_.AsLong(); break;
				case 9: BytesOut = (ulong)dr_.AsLong(); break;
				case 10: BytesIn = (ulong)dr_.AsLong(); break;
				case 11: BpsIn = (ulong)dr_.AsLong(); break;
				case 12: BpsOut = (ulong)dr_.AsLong(); break;
				case 13: Rps = (ulong)dr_.AsLong(); break;
				case 14: Address = dr_.AsString(); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:21,代码来源:Memcached.pb.cs

示例3: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: _i32.Add(dr_.AsInt()); break;
				case 1: _i64.Add(dr_.AsLong()); break;
				case 2: _str.Add(dr_.AsString()); break;
				case 3: _bts.Add(dr_.AsBytes()); break;
				case 4: _bln.Add(dr_.AsBool()); break;
				case 5: _flt.Add(dr_.AsFloat()); break;
				case 6: _cur.Add(dr_.AsCurrency()); break;
				case 7: _dbl.Add(dr_.AsDouble()); break;
				case 8: _dat.Add(dr_.AsDate()); break;
				case 9: _si32.Add(dr_.AsSi32()); break;
				case 10: _si64.Add(dr_.AsSi64()); break;
				case 11: _ui32.Add((uint)dr_.AsInt()); break;
				case 12: _ui64.Add((ulong)dr_.AsLong()); break;
				case 13: _dec.Add(dr_.AsDecimal()); break;
				case 14: _chr.Add(dr_.AsChar()); break;
				case 15: _enu.Add((Colors)dr_.AsEnum(EnumDescriptors.Colors)); break;
				case 16: _f32.Add((uint)dr_.AsBit32()); break;
				case 17: _f64.Add((ulong)dr_.AsBit64()); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:24,代码来源:Messages.pb.cs


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