Made BindContext.EnumObjectParam return empty enum if method fails

pull/180/head
dahall 2020-10-22 14:38:31 -06:00
parent 0cb2fed082
commit a1f037644b
1 changed files with 1 additions and 5 deletions

View File

@ -149,11 +149,7 @@ namespace Vanara.Windows.Shell
/// in a return value of E_NOTIMPL.
/// </para>
/// </remarks>
public IEnumerable<string> EnumObjectParam()
{
((IBindCtxV)this).EnumObjectParam(out var ppenum).ThrowIfFailed();
return ppenum.Enum().ToArray();
}
public IEnumerable<string> EnumObjectParam() => ((IBindCtxV)this).EnumObjectParam(out var ppenum).Succeeded ? ppenum.Enum().ToArray() : new string[0];
/// <summary>
/// Retrieves an interface pointer to the object associated with the specified key in the bind context's string-keyed table of pointers.