@@ -35,12 +35,12 @@ public abstract class FbService
35
35
private const string ServiceName = "service_mgr" ;
36
36
37
37
private IServiceManager _svc ;
38
- private ConnectionString _csManager ;
38
+ private ConnectionString _options ;
39
39
40
40
internal ServiceParameterBuffer StartSpb ;
41
41
internal ServiceParameterBuffer QuerySpb ;
42
42
43
- protected string Database => _csManager . Database ;
43
+ protected string Database => _options . Database ;
44
44
45
45
public FbServiceState State { get ; private set ; }
46
46
public int QueryBufferSize { get ; set ; }
@@ -56,7 +56,7 @@ public string ConnectionString
56
56
throw new InvalidOperationException ( "ConnectionString cannot be modified on open instances." ) ;
57
57
}
58
58
59
- _csManager = new ConnectionString ( value ) ;
59
+ _options = new ConnectionString ( value ) ;
60
60
61
61
if ( value == null )
62
62
{
@@ -87,31 +87,31 @@ private ServiceParameterBuffer BuildSpb()
87
87
}
88
88
else
89
89
{
90
- spb . Append ( ( byte ) IscCodes . isc_spb_user_name , _csManager . UserID ) ;
91
- spb . Append ( ( byte ) IscCodes . isc_spb_password , _csManager . Password ) ;
90
+ spb . Append ( ( byte ) IscCodes . isc_spb_user_name , _options . UserID ) ;
91
+ spb . Append ( ( byte ) IscCodes . isc_spb_password , _options . Password ) ;
92
92
}
93
93
spb . Append ( ( byte ) IscCodes . isc_spb_dummy_packet_interval , new byte [ ] { 120 , 10 , 0 , 0 } ) ;
94
- if ( ( _csManager ? . Role . Length ?? 0 ) != 0 )
95
- spb . Append ( ( byte ) IscCodes . isc_spb_sql_role_name , _csManager . Role ) ;
94
+ if ( ( _options ? . Role . Length ?? 0 ) != 0 )
95
+ spb . Append ( ( byte ) IscCodes . isc_spb_sql_role_name , _options . Role ) ;
96
96
return spb ;
97
97
}
98
98
99
99
protected void Open ( )
100
100
{
101
101
if ( State != FbServiceState . Closed )
102
102
throw new InvalidOperationException ( "Service already Open." ) ;
103
- if ( string . IsNullOrEmpty ( _csManager . UserID ) )
103
+ if ( string . IsNullOrEmpty ( _options . UserID ) )
104
104
throw new InvalidOperationException ( "No user name was specified." ) ;
105
- if ( string . IsNullOrEmpty ( _csManager . Password ) )
105
+ if ( string . IsNullOrEmpty ( _options . Password ) )
106
106
throw new InvalidOperationException ( "No user password was specified." ) ;
107
107
108
108
try
109
109
{
110
110
if ( _svc == null )
111
111
{
112
- _svc = ClientFactory . CreateServiceManager ( _csManager ) ;
112
+ _svc = ClientFactory . CreateServiceManager ( _options ) ;
113
113
}
114
- _svc . Attach ( BuildSpb ( ) , _csManager . DataSource , _csManager . Port , ServiceName , _csManager . CryptKey ) ;
114
+ _svc . Attach ( BuildSpb ( ) , _options . DataSource , _options . Port , ServiceName , _options . CryptKey ) ;
115
115
_svc . WarningMessage = OnWarningMessage ;
116
116
State = FbServiceState . Open ;
117
117
}
0 commit comments