public GetConnectionFromId ( int connectionNumber ) : |
||
connectionNumber | int | serial number of the connection within the collection |
Результат |
public SqlConnection GetConnectionFromId(int connectionNumber)
{
SqlConnection connx;
try
{
connx = ConnxObject.TSConnectionsCollection[connectionNumber];
}
catch
{
throw new TSLibraryException(ErrCode.Enum.Connection_Not_Found,
String.Format("TimeSeriesLibrary does not have an open connection number {0}",
connectionNumber));
}
return connx;
}
public SqlConnection GetConnectionFromId(int connectionNumber) { try { // let the sibling method in the wrapped TSLibrary object contain the logic return(TSLib.GetConnectionFromId(connectionNumber)); } catch (Exception e) { ErrorMessage = e.Message; return(null); } }