Revert API breaking changes for non-XAMCORE_4_0 (#1747)
* Move NSTouch ctor to code-behind and obsolete * Remove XAMCORE_4_0 check for NSTouch DisableDefaultCtor * Add NSTouch.cs to frameworks.sources * Skip NSSpellCheckerCanidates in typo test
This commit is contained in:
Родитель
b5a72d7faa
Коммит
6ef756a063
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace XamCore.AppKit {
|
||||
public partial class NSTouch {
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("This type is not meant to be user-created")]
|
||||
public NSTouch ()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -13678,7 +13678,11 @@ namespace XamCore.AppKit {
|
|||
bool IsAutomaticTextCompletionEnabled { get; }
|
||||
|
||||
[Mac (10,12,1)]
|
||||
#if XAMCORE_4_0
|
||||
[Async (ResultTypeName="NSSpellCheckerCandidates")]
|
||||
#else
|
||||
[Async (ResultTypeName="NSSpellCheckerCanidates")]
|
||||
#endif
|
||||
[Export ("requestCandidatesForSelectedRange:inString:types:options:inSpellDocumentWithTag:completionHandler:")]
|
||||
nint RequestCandidates (NSRange selectedRange, string stringToCheck, ulong checkingTypes, [NullAllowed] NSDictionary<NSString, NSObject> options, nint tag, [NullAllowed] Action<nint, NSTextCheckingResult []> completionHandler);
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ APPKIT_SOURCES = \
|
|||
AppKit/NSTextField.cs \
|
||||
AppKit/NSTextStorage.cs \
|
||||
AppKit/NSToolbarItem.cs \
|
||||
AppKit/NSTouch.cs \
|
||||
AppKit/NSTreeController.cs \
|
||||
AppKit/NSView.cs \
|
||||
AppKit/NSWindow.cs \
|
||||
|
|
|
@ -36,5 +36,13 @@ namespace Introspection
|
|||
return String.Empty;
|
||||
return txt.Substring ((int)typoRange.Location, (int)typoRange.Length);
|
||||
}
|
||||
|
||||
public override bool Skip (Type baseType, string typo)
|
||||
{
|
||||
if (baseType == typeof (NSSpellCheckerCanidates))
|
||||
return true;
|
||||
|
||||
return base.Skip (baseType, typo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче