Skip to content

Commit

Permalink
DNET-414
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Mar 4, 2012
1 parent 5e2d512 commit 2fa3f0c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 51 deletions.
23 changes: 7 additions & 16 deletions NETProvider/source/FirebirdSql/Data/Services/FbSecurity.cs
Expand Up @@ -23,22 +23,6 @@ namespace FirebirdSql.Data.Services
{
public sealed class FbSecurity : FbService
{
#region · Properties ·

public string UsersDbPath
{
get
{
byte[] buffer = this.QueryService(new byte[] { IscCodes.isc_info_svc_user_dbpath });

System.Collections.ArrayList info = this.ParseQueryInfo(buffer);

return info.Count != 0 ? (string)info[0] : null;
}
}

#endregion

#region · Constructors ·

public FbSecurity()
Expand Down Expand Up @@ -242,6 +226,13 @@ public FbUserData[] DisplayUsers()
return (FbUserData[])info[0];
}

public string GetUsersDbPath()
{
byte[] buffer = this.QueryService(new byte[] { IscCodes.isc_info_svc_user_dbpath });
System.Collections.ArrayList info = this.ParseQueryInfo(buffer);
return info.Count != 0 ? (string)info[0] : null;
}

#endregion
}
}
62 changes: 27 additions & 35 deletions NETProvider/source/FirebirdSql/Data/Services/FbServerProperties.cs
Expand Up @@ -25,68 +25,60 @@ namespace FirebirdSql.Data.Services
{
public sealed class FbServerProperties : FbService
{
#region · Properties ·
#region · Constructors ·

public FbServerProperties()
: base()
{ }

public int Version
#endregion

#region · Methods ·

public int GetVersion()
{
get { return this.GetInt32(IscCodes.isc_info_svc_version); }
return this.GetInt32(IscCodes.isc_info_svc_version);
}

public string ServerVersion
public string GetServerVersion()
{
get { return this.GetString(IscCodes.isc_info_svc_server_version); }
return this.GetString(IscCodes.isc_info_svc_server_version);
}

public string Implementation
public string GetImplementation()
{
get { return this.GetString(IscCodes.isc_info_svc_implementation); }
return this.GetString(IscCodes.isc_info_svc_implementation);
}

public string RootDirectory
public string GetRootDirectory()
{
get { return this.GetString(IscCodes.isc_info_svc_get_env); }
return this.GetString(IscCodes.isc_info_svc_get_env);
}

public string LockManager
public string GetLockManager()
{
get { return this.GetString(IscCodes.isc_info_svc_get_env_lock); }
return this.GetString(IscCodes.isc_info_svc_get_env_lock);
}

public string MessageFile
public string GetMessageFile()
{
get { return this.GetString(IscCodes.isc_info_svc_get_env_msg); }
return this.GetString(IscCodes.isc_info_svc_get_env_msg);
}

public FbDatabasesInfo DatabasesInfo
public FbDatabasesInfo GetDatabasesInfo()
{
get
{
ArrayList info = this.GetInfo(IscCodes.isc_info_svc_svr_db_info);

return info.Count != 0 ? (FbDatabasesInfo)info[0] : new FbDatabasesInfo();
}
ArrayList info = this.GetInfo(IscCodes.isc_info_svc_svr_db_info);
return info.Count != 0 ? (FbDatabasesInfo)info[0] : new FbDatabasesInfo();
}

public FbServerConfig ServerConfig
public FbServerConfig GetServerConfig()
{
get
{
ArrayList info = this.GetInfo(IscCodes.isc_info_svc_get_config);

return info.Count != 0 ? (FbServerConfig)info[0] : new FbServerConfig();
}
ArrayList info = this.GetInfo(IscCodes.isc_info_svc_get_config);
return info.Count != 0 ? (FbServerConfig)info[0] : new FbServerConfig();
}

#endregion

#region · Constructors ·

public FbServerProperties()
: base()
{ }

#endregion

#region · Private Methods ·

private string GetString(int item)
Expand Down

0 comments on commit 2fa3f0c

Please sign in to comment.