Ejemplo n.º 1
0
        public bool Unpack(MemoryStream stream)
        {
            Header = new TDSPacketHeader();
            Header.Unpack(stream);
            switch (Header.Type)
            {
            case TDSMessageType.AttentionSignal:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.BulkLoadData:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.FedAuthToken:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.PreLogin:
            {
                Data = new TDSPreLoginPacketData();
                Data.Unpack(stream);
                break;
            }

            case TDSMessageType.PreTDS7Login:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.RPC:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.SQLBatch:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.SSPI:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.TabularResult:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.TDS7Login:
            {
                throw new NotSupportedException();
            }

            case TDSMessageType.TransactionManagerRequest:
            {
                throw new NotSupportedException();
            }
            }
            return(true);
        }
Ejemplo n.º 2
0
 public TDSPacket()
 {
     Header = new TDSPacketHeader();
 }
Ejemplo n.º 3
0
 public TDSPacket(TDSPacketHeader header, ITDSPacketData data)
 {
     Header = header;
     Data   = data;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TDSPacket" /> class.
 /// </summary>
 /// <param name="header">TDS Packet Header</param>
 /// <param name="data">TDS Packet Data</param>
 public TDSPacket(TDSPacketHeader header, ITDSPacketData data)
 {
     this.Header = header;
     this.Data   = data;
 }