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


C# TdsParserStateObject.ReadSingle方法代码示例

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


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

示例1: ReadSqlValueInternal


//.........这里部分代码省略.........
                    this.ReadSqlVariant(value, length, stateObj);
                    return;

                case 0x68:
                case 50:
                    value.Boolean = stateObj.ReadByte() != 0;
                    return;

                case 0x23:
                case 0x2e:
                case 0x2f:
                case 0x31:
                case 0x33:
                case 0x35:
                case 0x36:
                case 0x37:
                case 0x39:
                    return;

                case 0x24:
                {
                    byte[] buffer2 = new byte[length];
                    stateObj.ReadByteArray(buffer2, 0, length);
                    value.SqlGuid = new SqlGuid(buffer2, true);
                    return;
                }
                case 0x26:
                    if (length == 1)
                    {
                        break;
                    }
                    if (length == 2)
                    {
                        goto Label_00FE;
                    }
                    if (length != 4)
                    {
                        goto Label_011A;
                    }
                    goto Label_010C;

                case 0x30:
                    break;

                case 0x34:
                    goto Label_00FE;

                case 0x38:
                    goto Label_010C;

                case 0x3a:
                    goto Label_0187;

                case 0x3b:
                    goto Label_012D;

                case 60:
                    goto Label_014E;

                case 0x3d:
                    goto Label_01A2;

                case 0x3e:
                    goto Label_013B;

                default:
                    return;
            }
            value.Byte = stateObj.ReadByte();
            return;
        Label_00FE:
            value.Int16 = stateObj.ReadInt16();
            return;
        Label_010C:
            value.Int32 = stateObj.ReadInt32();
            return;
        Label_011A:
            value.Int64 = stateObj.ReadInt64();
            return;
        Label_012D:
            value.Single = stateObj.ReadSingle();
            return;
        Label_013B:
            value.Double = stateObj.ReadDouble();
            return;
        Label_014E:
            num4 = stateObj.ReadInt32();
            uint num3 = stateObj.ReadUInt32();
            long num2 = (num4 << 0x20) + num3;
            value.SetToMoney(num2);
            return;
        Label_0173:
            value.SetToMoney((long) stateObj.ReadInt32());
            return;
        Label_0187:
            value.SetToDateTime(stateObj.ReadUInt16(), stateObj.ReadUInt16() * SqlDateTime.SQLTicksPerMinute);
            return;
        Label_01A2:
            value.SetToDateTime(stateObj.ReadInt32(), (int) stateObj.ReadUInt32());
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:101,代码来源:TdsParser.cs


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