dont' use ThrowsError when deciding if a method is implemented. Simply checking for an exception is no longer reliable sinc most GetSamplesAsync() methods correctly do this by design
This commit is contained in:
parent
eb1f477f9d
commit
f640271a47
|
@ -342,8 +342,14 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
|
|||
return false;
|
||||
}
|
||||
|
||||
// adelikat: we can't rely on this anymore
|
||||
// Some methods throw an exception by design, such as ISoundProvider.GetSamplesAsync()
|
||||
// If async is not provided by the implementation this method will throw an exception
|
||||
// We need to figure out a reliable way to check specifically for a NotImplementedException, then maybe this method will be more useful
|
||||
// If a method is not marked but all it does is throw an exception, consider it not implemented
|
||||
return !info.ThrowsError();
|
||||
//return !info.ThrowsError();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsImplemented(this PropertyInfo info)
|
||||
|
|
Loading…
Reference in New Issue