@@ -71,11 +71,11 @@ public GdsConnection(string user, string password, string dataSource, int portNu
7171 WireCrypt = wireCrypt ;
7272 }
7373
74- public async ValueTask Connect ( AsyncWrappingCommonArgs async )
74+ public async ValueTask ConnectAsync ( AsyncWrappingCommonArgs async )
7575 {
7676 try
7777 {
78- IPAddress = await GetIPAddress ( DataSource , async ) . ConfigureAwait ( false ) ;
78+ IPAddress = await GetIPAddressAsync ( DataSource , async ) . ConfigureAwait ( false ) ;
7979 var endPoint = new IPEndPoint ( IPAddress , PortNumber ) ;
8080
8181 var socket = new Socket ( IPAddress . AddressFamily , SocketType . Stream , ProtocolType . Tcp ) ;
@@ -114,44 +114,44 @@ public async ValueTask Connect(AsyncWrappingCommonArgs async)
114114 }
115115 }
116116
117- public async ValueTask Identify ( string database , AsyncWrappingCommonArgs async )
117+ public async ValueTask IdentifyAsync ( string database , AsyncWrappingCommonArgs async )
118118 {
119119 try
120120 {
121- await Xdr. Write ( IscCodes . op_connect , async ) . ConfigureAwait ( false ) ;
122- await Xdr . Write ( IscCodes . op_attach , async ) . ConfigureAwait ( false ) ;
123- await Xdr . Write ( IscCodes . CONNECT_VERSION3 , async ) . ConfigureAwait ( false ) ;
124- await Xdr . Write ( IscCodes . GenericAchitectureClient , async ) . ConfigureAwait ( false ) ;
121+ await Xdr. WriteAsync ( IscCodes . op_connect , async ) . ConfigureAwait ( false ) ;
122+ await Xdr . WriteAsync ( IscCodes . op_attach , async ) . ConfigureAwait ( false ) ;
123+ await Xdr . WriteAsync ( IscCodes . CONNECT_VERSION3 , async ) . ConfigureAwait ( false ) ;
124+ await Xdr . WriteAsync ( IscCodes . GenericAchitectureClient , async ) . ConfigureAwait ( false ) ;
125125
126- await Xdr. Write ( database , async ) . ConfigureAwait ( false ) ;
126+ await Xdr. WriteAsync ( database , async ) . ConfigureAwait ( false ) ;
127127
128128 var protocols = ProtocolsSupported . Get ( Compression ) ;
129- await Xdr . Write ( protocols . Count ( ) , async) . ConfigureAwait ( false ) ;
129+ await Xdr . WriteAsync ( protocols . Count ( ) , async) . ConfigureAwait ( false ) ;
130130
131131 AuthBlock = new AuthBlock( User , Password , WireCrypt ) ;
132132
133- await Xdr . WriteBuffer ( AuthBlock . UserIdentificationData ( ) , async ) . ConfigureAwait ( false ) ;
133+ await Xdr . WriteBufferAsync ( AuthBlock . UserIdentificationData ( ) , async ) . ConfigureAwait ( false ) ;
134134
135135 var priority = 0 ;
136136 foreach ( var protocol in protocols)
137137 {
138- await Xdr. Write ( protocol . Version , async ) . ConfigureAwait ( false ) ;
139- await Xdr . Write ( IscCodes . GenericAchitectureClient , async ) . ConfigureAwait ( false ) ;
140- await Xdr . Write ( protocol . MinPType , async ) . ConfigureAwait ( false ) ;
141- await Xdr . Write ( protocol . MaxPType , async ) . ConfigureAwait ( false ) ;
142- await Xdr . Write ( priority , async ) . ConfigureAwait ( false ) ;
138+ await Xdr. WriteAsync ( protocol . Version , async ) . ConfigureAwait ( false ) ;
139+ await Xdr . WriteAsync ( IscCodes . GenericAchitectureClient , async ) . ConfigureAwait ( false ) ;
140+ await Xdr . WriteAsync ( protocol . MinPType , async ) . ConfigureAwait ( false ) ;
141+ await Xdr . WriteAsync ( protocol . MaxPType , async ) . ConfigureAwait ( false ) ;
142+ await Xdr . WriteAsync ( priority , async ) . ConfigureAwait ( false ) ;
143143
144144 priority++ ;
145145 }
146146
147- await Xdr . Flush ( async ) . ConfigureAwait( false ) ;
147+ await Xdr . FlushAsync ( async ) . ConfigureAwait( false ) ;
148148
149- var operation = await Xdr. ReadOperation ( async ) . ConfigureAwait( false ) ;
149+ var operation = await Xdr. ReadOperationAsync ( async ) . ConfigureAwait( false ) ;
150150 if ( operation = = IscCodes . op_accept || operation == IscCodes . op_cond_accept || operation == IscCodes . op_accept_data )
151151 {
152- ProtocolVersion = await Xdr. ReadInt32 ( async) . ConfigureAwait( false) ;
153- ProtocolArchitecture = await Xdr. ReadInt32 ( async) . ConfigureAwait( false) ;
154- ProtocolMinimunType = await Xdr. ReadInt32 ( async) . ConfigureAwait( false) ;
152+ ProtocolVersion = await Xdr. ReadInt32Async ( async) . ConfigureAwait( false) ;
153+ ProtocolArchitecture = await Xdr. ReadInt32Async ( async) . ConfigureAwait( false) ;
154+ ProtocolMinimunType = await Xdr. ReadInt32Async ( async) . ConfigureAwait( false) ;
155155
156156 if ( ProtocolVersion < 0 )
157157 {
@@ -166,10 +166,10 @@ public async ValueTask Identify(string database, AsyncWrappingCommonArgs async)
166166 if ( operation == IscCodes. op_cond_accept || operation == IscCodes. op_accept_data)
167167 {
168168 AuthBlock . Start (
169- await Xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ,
170- await Xdr . ReadString ( async ) . ConfigureAwait( false ) ,
171- await Xdr . ReadBoolean ( async ) . ConfigureAwait( false ) ,
172- await Xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ) ;
169+ await Xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ,
170+ await Xdr . ReadStringAsync ( async ) . ConfigureAwait( false ) ,
171+ await Xdr . ReadBooleanAsync ( async ) . ConfigureAwait( false ) ,
172+ await Xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ) ;
173173
174174 if ( Compression )
175175 {
@@ -181,9 +181,9 @@ await Xdr.ReadBoolean(async).ConfigureAwait(false),
181181 {
182182 while ( true)
183183 {
184- await AuthBlock. SendContAuthToBuffer ( Xdr , async ) . ConfigureAwait ( false ) ;
185- await Xdr . Flush ( async ) . ConfigureAwait( false ) ;
186- var response = await AuthBlock. ProcessContAuthResponse ( Xdr , async ) . ConfigureAwait ( false ) ;
184+ await AuthBlock. SendContAuthToBufferAsync ( Xdr , async ) . ConfigureAwait ( false ) ;
185+ await Xdr . FlushAsync ( async ) . ConfigureAwait( false ) ;
186+ var response = await AuthBlock. ProcessContAuthResponseAsync ( Xdr , async ) . ConfigureAwait ( false ) ;
187187 if ( response is ContAuthResponse contAuthResponse)
188188 {
189189 AuthBlock. Start( contAuthResponse . ServerData , contAuthResponse . AcceptPluginName , contAuthResponse . IsAuthenticated , contAuthResponse . ServerKeys ) ;
@@ -194,9 +194,9 @@ await Xdr.ReadBoolean(async).ConfigureAwait(false),
194194
195195 if ( AuthBlock . ServerKeys . Any ( ) )
196196 {
197- await AuthBlock . SendWireCryptToBuffer ( Xdr , async ) . ConfigureAwait ( false ) ;
198- await Xdr . Flush ( async ) . ConfigureAwait( false ) ;
199- await AuthBlock . ProcessWireCryptResponse ( Xdr , this , async ) . ConfigureAwait ( false ) ;
197+ await AuthBlock . SendWireCryptToBufferAsync ( Xdr , async ) . ConfigureAwait ( false ) ;
198+ await Xdr . FlushAsync ( async ) . ConfigureAwait( false ) ;
199+ await AuthBlock . ProcessWireCryptResponseAsync ( Xdr , this , async ) . ConfigureAwait ( false ) ;
200200 }
201201 }
202202 }
@@ -205,7 +205,7 @@ await Xdr.ReadBoolean(async).ConfigureAwait(false),
205205 }
206206 else if ( operation == IscCodes . op_response )
207207 {
208- var response = ( GenericResponse ) await ProcessOperation ( operation, Xdr , async ) . ConfigureAwait ( false ) ;
208+ var response = ( GenericResponse ) await ProcessOperationAsync ( operation, Xdr , async ) . ConfigureAwait ( false ) ;
209209 ProcessResponse( response ) ;
210210 }
211211 else
@@ -219,7 +219,7 @@ await Xdr.ReadBoolean(async).ConfigureAwait(false),
219219 }
220220 }
221221
222- public async ValueTask Disconnect ( AsyncWrappingCommonArgs async )
222+ public async ValueTask DisconnectAsync ( AsyncWrappingCommonArgs async )
223223 {
224224 if ( _networkStream != null )
225225 {
@@ -243,7 +243,7 @@ internal void StartEncryption()
243243 _firebirdNetworkHandlingWrapper. StartEncryption( AuthBlock . SessionKey ) ;
244244 }
245245
246- private static async ValueTask < IPAddress > GetIPAddress ( string dataSource , AsyncWrappingCommonArgs async )
246+ private static async ValueTask < IPAddress > GetIPAddressAsync ( string dataSource , AsyncWrappingCommonArgs async )
247247 {
248248 if ( IPAddress . TryParse ( dataSource , out var ipaddress) )
249249 {
@@ -262,40 +262,40 @@ private static async ValueTask<IPAddress> GetIPAddress(string dataSource, AsyncW
262262 return addresses [ 0 ] ;
263263 }
264264
265- public static async ValueTask < IResponse > ProcessOperation ( int operation , IXdrReader xdr , AsyncWrappingCommonArgs async )
265+ public static async ValueTask < IResponse > ProcessOperationAsync ( int operation , IXdrReader xdr , AsyncWrappingCommonArgs async )
266266 {
267267 switch ( operation )
268268 {
269269 case IscCodes . op_response :
270270 return new GenericResponse (
271- await xdr . ReadInt32 ( async ) . ConfigureAwait( false ) ,
272- await xdr . ReadInt64 ( async ) . ConfigureAwait( false ) ,
273- await xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ,
274- await xdr . ReadStatusVector ( async ) . ConfigureAwait( false ) ) ;
271+ await xdr . ReadInt32Async ( async ) . ConfigureAwait( false ) ,
272+ await xdr . ReadInt64Async ( async ) . ConfigureAwait( false ) ,
273+ await xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ,
274+ await xdr . ReadStatusVectorAsync ( async ) . ConfigureAwait( false ) ) ;
275275
276276 case IscCodes . op_fetch_response :
277277 return new FetchResponse (
278- await xdr . ReadInt32 ( async ) . ConfigureAwait( false ) ,
279- await xdr . ReadInt32 ( async ) . ConfigureAwait( false ) ) ;
278+ await xdr . ReadInt32Async ( async ) . ConfigureAwait( false ) ,
279+ await xdr . ReadInt32Async ( async ) . ConfigureAwait( false ) ) ;
280280
281281 case IscCodes . op_sql_response :
282282 return new SqlResponse (
283- await xdr . ReadInt32 ( async ) . ConfigureAwait( false ) ) ;
283+ await xdr . ReadInt32Async ( async ) . ConfigureAwait( false ) ) ;
284284
285285 case IscCodes . op_trusted_auth :
286286 return new AuthResponse (
287- await xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ) ;
287+ await xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ) ;
288288
289289 case IscCodes . op_crypt_key_callback :
290290 return new CryptKeyCallbackResponse (
291- await xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ) ;
291+ await xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ) ;
292292
293293 case IscCodes . op_cont_auth :
294294 return new ContAuthResponse (
295- await xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ,
296- await xdr . ReadString ( async ) . ConfigureAwait( false ) ,
297- await xdr . ReadBoolean ( async ) . ConfigureAwait( false ) ,
298- await xdr . ReadBuffer ( async ) . ConfigureAwait( false ) ) ;
295+ await xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ,
296+ await xdr . ReadStringAsync ( async ) . ConfigureAwait( false ) ,
297+ await xdr . ReadBooleanAsync ( async ) . ConfigureAwait( false ) ,
298+ await xdr . ReadBufferAsync ( async ) . ConfigureAwait( false ) ) ;
299299
300300 default :
301301 throw new ArgumentOutOfRangeException( nameof ( operation ) , $"{ nameof ( operation ) } = { operation } ") ;
0 commit comments