Add DataProviderQuery.TryGetProperty helper

This commit is contained in:
Yoshi Askharoun
2023-05-21 18:46:17 -05:00
parent 2a7bc680c4
commit 0bd6b273c0
+14
View File
@@ -90,6 +90,20 @@ namespace Microsoft.Iris
return null;
}
public virtual bool TryGetProperty<T>(string propertyName, out T value)
{
try
{
value = (T)GetProperty(propertyName);
return true;
}
catch
{
value = default;
return false;
}
}
public virtual void SetProperty(string propertyName, object value)
{
bool flag1 = false;