private SNIPacketReset ( [ pConn, IOType IOType, System.Data.SqlClient.SNIPacket pPacket, ConsumerNumber ConsNum ) : void | ||
pConn | [ | |
IOType | IOType | |
pPacket | System.Data.SqlClient.SNIPacket | |
ConsNum | ConsumerNumber | |
리턴 | void |
internal override object GetResetWritePacket() { if (_sniPacket != null) { SNINativeMethodWrapper.SNIPacketReset(Handle, SNINativeMethodWrapper.IOType.WRITE, _sniPacket, SNINativeMethodWrapper.ConsumerNumber.SNI_Consumer_SNI); } else { lock (_writePacketLockObject) { _sniPacket = _writePacketCache.Take(Handle); } } return(_sniPacket); }
public SNIPacket Take(SNIHandle sniHandle) { SNIPacket packet; if (_packets.Count > 0) { // Success - reset the packet packet = _packets.Pop(); SNINativeMethodWrapper.SNIPacketReset(sniHandle, SNINativeMethodWrapper.IOType.WRITE, packet, SNINativeMethodWrapper.ConsumerNumber.SNI_Consumer_SNI); } else { // Failed to take a packet - create a new one packet = new SNIPacket(sniHandle); } return(packet); }