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


C# IDataReader.GetNullableString方法代码示例

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


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

示例1: DbView

 /// <summary>
 /// 
 /// </summary>
 /// <param name="databaseId"></param>
 /// <param name="reader"></param>
 internal DbView(Guid databaseId, IDataReader reader)
     : this(databaseId, reader.GetString(reader.GetOrdinal("Id")),
         reader.GetString(reader.GetOrdinal("CatalogName")),
         reader.GetString(reader.GetOrdinal("SchemaName")),
         reader.GetString(reader.GetOrdinal("Name")),
         reader.GetNullableString("Description"))
 {
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:13,代码来源:DbView.cs

示例2: InflateShipWithCurrentStatus

 private ShipWithCurrentStatus InflateShipWithCurrentStatus(IDataReader dr)
 {
     var ship = new ShipWithCurrentStatus();
     this.PopulateCoreFields(ship, dr);
     ship.SolarSystemID = dr.GetNullableInt64("SolarSystemID");
     ship.SolarSystemName = dr.GetNullableString("SolarSystemName");
     ship.JobID = dr.GetNullableInt64("JobID");
     ship.JobDescription = dr.GetNullableString("JobDescription");
     return ship;
 }
开发者ID:ardliath,项目名称:BigSpace,代码行数:10,代码来源:Ships.cs

示例3: PopulateRDatabase

 private RDatabase PopulateRDatabase(IDataReader reader)
 {
     return new RDatabase
     {
         UserId = reader.GetString(reader.GetOrdinal("UserId")),
         RdbmsType = reader.GetString(reader.GetOrdinal("RdbmsType")),
         ProviderName = reader.GetString(reader.GetOrdinal("ProviderName")),
         Profile = reader.GetNullableString("Profile"),
         Password = reader.GetString(reader.GetOrdinal("Password")),
         IsTemplate = reader.GetBoolean(reader.GetOrdinal("IsTemplate")),
         Id = reader.GetGuid(reader.GetOrdinal("Id")),
         Description = reader.GetNullableString("Description"),
         DataSource = reader.GetString(reader.GetOrdinal("DataSource")),
         CatalogName = reader.GetString(reader.GetOrdinal("CatalogName")),
         CreateUserId = reader.GetNullableGuid(reader.GetOrdinal("CreateUserId")),
         CreateBy = reader.GetNullableString(reader.GetOrdinal("CreateBy")),
         CreateOn = reader.GetNullableDateTime(reader.GetOrdinal("CreateOn"))
     };
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:19,代码来源:SqlServerMetaDataService.cs

示例4: MapWorkItem

        private static IEnumerable<WorkItem> MapWorkItem(IDataReader reader)
        {
            var workItems = new List<WorkItem>();

            while (reader != null && reader.Read())
            {
                var workItemId = reader.GetString(0);
                var path = reader.GetString(1);

                var wi = WorkItem.New(workItemId, path);
                var ordinal = reader.GetNullableValue<int>(2);
                var lastMoved = reader.GetNullableValue<DateTime>(3);
                var timestamp = reader.GetNullableValue<DateTime>(4);
                var status = (WorkItemStatus) (int) reader[5];
                var parentId = reader.GetNullableString(6);
                var parentType = reader.GetNullableValue<WorkItemParentType>(7);
                var properties = reader.GetNullableString(8);
                var classes = reader.GetNullableString(9);

                wi = wi.UpdateStatus(status);
                wi = ordinal.HasValue ? wi.UpdateOrdinal(ordinal.Value) : wi;
                wi = lastMoved.HasValue ? wi.UpdateLastMoved(lastMoved.Value) : wi;
                wi = timestamp.HasValue ? wi.UpdateTimestamp(timestamp.Value) : wi;
                wi = properties != null ? wi.UpdateProperties(DeserializeProperties(properties)) : wi;
                wi = classes != null ? wi.UpdateClasses(classes.Split('&')) : wi;

                if (!string.IsNullOrEmpty(parentId) && parentType.HasValue)
                {
                    wi = wi.UpdateParent(parentId, parentType.Value);
                }

                workItems.Add(wi);
            }

            return workItems;
        }
开发者ID:jorn-ola-birkeland,项目名称:WhiskWork,代码行数:36,代码来源:AdoWorkItemRepository.cs

示例5: MapWorkStep

        private static IEnumerable<WorkStep> MapWorkStep(IDataReader reader)
        {
            var workSteps = new List<WorkStep>();

            while (reader != null && reader.Read())
            {
                var path = reader.GetString(0);
                var ordinal = reader.GetNullableValue<int>(1);
                var title = reader.GetNullableString(2);
                var type = (WorkStepType) reader.GetInt32(3);
                var workItemClass = reader.GetNullableString(4);
                var wipLimt = reader.GetNullableValue<int>(5);

                var ws = WorkStep.New(path);
                ws = ws.UpdateType(type);

                if (ordinal.HasValue)
                {
                    ws = ws.UpdateOrdinal(ordinal.Value);
                }

                if (title != null)
                {
                    ws = ws.UpdateTitle(title);
                }

                if (workItemClass != null)
                {
                    ws = ws.UpdateWorkItemClass(workItemClass);
                }

                if (wipLimt.HasValue)
                {
                    ws = ws.UpdateWipLimit(wipLimt.Value);
                }

                workSteps.Add(ws);
            }

            return workSteps;
        }
开发者ID:jorn-ola-birkeland,项目名称:WhiskWork,代码行数:41,代码来源:AdoWorkStepRepository.cs


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