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


C# IDataReader.AsString方法代码示例

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


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

示例1: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: Name = dr_.AsString(); break;
				case 1: dr_.AsMessage(_data??(Data = new Struct()), ds_); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:8,代码来源:BuiltInTypes.pb.cs

示例2: BuildResponse

        /// <summary>
        /// 실행 결과인 <paramref name="reader"/>를 반환합니다.
        /// </summary>
        /// <param name="reader"></param>
        protected virtual IEnumerable<Dictionary<string, string>> BuildResponse(IDataReader reader) {
            var records = new List<Dictionary<string, string>>();

            while(reader.Read()) {
                var record = new Dictionary<string, string>();
                foreach(var columnName in reader.GetFieldNames()) {
                    var propertyName = NameMapper.MapToPropertyName(columnName);
                    record[propertyName] = reader.AsString(columnName);
                }

                records.Add(record);
            }
            return records;
        }
开发者ID:debop,项目名称:NFramework,代码行数:18,代码来源:AbstractReaderCommand.cs

示例3: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: Str = dr_.AsString(); break;
				case 1: Date = dr_.AsBytes(); break;
				case 2: dr_.AsMessage(_msg??(Msg = new Any()), ds_); break;
				case 3: Name = dr_.AsString(); break;
				case 4: I32 = dr_.AsInt(); break;
				case 5: Bol = dr_.AsBool(); break;
				case 6: Cha = dr_.AsChar(); break;
				case 7: Si3 = dr_.AsSi32(); break;
				case 8: Fx3 = (uint)dr_.AsBit32(); break;
				case 9: Ui64 = (ulong)dr_.AsLong(); break;
				case 10: Si64 = dr_.AsSi64(); break;
				case 11: I64 = dr_.AsLong(); break;
				case 12: Dbl = dr_.AsDouble(); break;
				case 13: Flt = dr_.AsFloat(); break;
				case 14: Dat = dr_.AsDate(); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:21,代码来源:MapTest.pb.cs

示例4: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: AllocPageSize = (uint)dr_.AsInt(); break;
				case 1: CacheSize = (uint)dr_.AsInt(); break;
				case 2: ReserveMemory = dr_.AsBool(); break;
				case 3: UseLargePages = dr_.AsBool(); break;
				case 4: HashTableSize = (uint)dr_.AsInt(); break;
				case 5: Address = dr_.AsString(); break;
				case 6: Name = dr_.AsString(); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:13,代码来源:Memcached.pb.cs

示例5: Get

		public override void Get(FieldDescriptor ds_, IDataReader dr_)
		{
			switch( ds_.Pos )
			{
				case 0: dr_.AsMessage( Vals??(Vals = new OptFields())); break;
				case 1: dr_.AsMessage( Reps??(Reps = new RepFields())); break;
				case 2: { var _f2_= new OptFields(); dr_.AsMessage(_f2_); _lots.Add(_f2_); } break;
				case 3: Tags = dr_.AsString(); break;
			}
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:10,代码来源:Messages.pb.cs


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