mirror of
https://github.com/ZuneDev/MicrosoftIris.git
synced 2026-07-27 13:13:29 -07:00
Add DataProviderQuery.TryGetProperty helper
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user