mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-10 10:15:04 +00:00
refactor: Resolving code smells
This commit is contained in:
@@ -66,6 +66,7 @@ namespace ICD.Common.Utils
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
// Releasing a disposed mutex in this case is valid behaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -277,21 +277,20 @@ namespace ICD.Common.Utils
|
||||
throw new ArgumentNullException("convertFunc");
|
||||
|
||||
result = default(T);
|
||||
bool retVal = false;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
result = convertFunc(value);
|
||||
retVal = true;
|
||||
return true;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user