зеркало из https://github.com/dotnet/winforms.git
Fix ILegacyIAccessibleProvider.GetSelection return type (#3231)
This commit is contained in:
Родитель
3cb43e71b5
Коммит
f1a55bb2ca
|
@ -39,7 +39,8 @@ internal static partial class Interop
|
|||
|
||||
string? KeyboardShortcut { get; }
|
||||
|
||||
object[]? /* IRawElementProviderSimple[] */ GetSelection();
|
||||
[return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)]
|
||||
IRawElementProviderSimple[] GetSelection();
|
||||
|
||||
string? DefaultAction { get; }
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ internal static partial class Interop
|
|||
/// </summary>
|
||||
[Guid("1d5df27c-8947-4425-b8d9-79787bb460b8")]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IRawElementProviderHwndOverride : IRawElementProviderSimple
|
||||
public interface IRawElementProviderHwndOverride
|
||||
{
|
||||
/// <summary>
|
||||
/// Request a provider for the specified component. The returned provider can supply additional
|
||||
|
|
|
@ -831,14 +831,14 @@ namespace System.Windows.Forms
|
|||
|
||||
IAccessible? UiaCore.ILegacyIAccessibleProvider.GetIAccessible() => AsIAccessible(this);
|
||||
|
||||
object[]? UiaCore.ILegacyIAccessibleProvider.GetSelection()
|
||||
UiaCore.IRawElementProviderSimple[] UiaCore.ILegacyIAccessibleProvider.GetSelection()
|
||||
{
|
||||
if (GetSelected() is UiaCore.IRawElementProviderSimple selected)
|
||||
{
|
||||
return new UiaCore.IRawElementProviderSimple[] { selected };
|
||||
}
|
||||
|
||||
return null;
|
||||
return Array.Empty<UiaCore.IRawElementProviderSimple>();
|
||||
}
|
||||
|
||||
void UiaCore.ILegacyIAccessibleProvider.Select(int flagsSelect) => Select((AccessibleSelection)flagsSelect);
|
||||
|
|
|
@ -400,20 +400,16 @@ namespace System.Windows.Forms
|
|||
|
||||
int ILegacyIAccessibleProvider.ChildId => publicILegacyIAccessibleProvider.ChildId;
|
||||
|
||||
void ILegacyIAccessibleProvider.DoDefaultAction()
|
||||
=> publicILegacyIAccessibleProvider.DoDefaultAction();
|
||||
void ILegacyIAccessibleProvider.DoDefaultAction() => publicILegacyIAccessibleProvider.DoDefaultAction();
|
||||
|
||||
IAccessible? ILegacyIAccessibleProvider.GetIAccessible()
|
||||
=> publicILegacyIAccessibleProvider.GetIAccessible();
|
||||
|
||||
object[]? ILegacyIAccessibleProvider.GetSelection()
|
||||
=> AsArrayOfNativeAccessibles(publicILegacyIAccessibleProvider.GetSelection());
|
||||
IRawElementProviderSimple[] ILegacyIAccessibleProvider.GetSelection() => publicILegacyIAccessibleProvider.GetSelection();
|
||||
|
||||
void ILegacyIAccessibleProvider.Select(int flagsSelect)
|
||||
=> publicILegacyIAccessibleProvider.Select(flagsSelect);
|
||||
void ILegacyIAccessibleProvider.Select(int flagsSelect) => publicILegacyIAccessibleProvider.Select(flagsSelect);
|
||||
|
||||
void ILegacyIAccessibleProvider.SetValue(string szValue)
|
||||
=> publicILegacyIAccessibleProvider.SetValue(szValue);
|
||||
void ILegacyIAccessibleProvider.SetValue(string szValue) => publicILegacyIAccessibleProvider.SetValue(szValue);
|
||||
|
||||
void IInvokeProvider.Invoke() => publicIInvokeProvider.Invoke();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче