Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[macOS] NSCollectionView.ValidateDrop should use 'ref', not 'out'. Fi…
…xes #60416 (#2947)
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#if !XAMCORE_4_0 | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.AppKit | ||
{ | ||
public partial class NSCollectionViewDelegate | ||
{ | ||
[Obsolete ("Use 'ValidateDropOperation (NSCollectionView collectionView, NSDraggingInfo draggingInfo, ref NSIndexPath proposedDropIndexPath, ref NSCollectionViewDropOperation proposedDropOperation)' instead.")] | ||
[Mac (10, 11)] | ||
public virtual NSDragOperation ValidateDrop (NSCollectionView collectionView, NSDraggingInfo draggingInfo, out NSIndexPath proposedDropIndexPath, out NSCollectionViewDropOperation proposedDropOperation) | ||
{ | ||
proposedDropIndexPath = null; | ||
proposedDropOperation = NSCollectionViewDropOperation.On; | ||
return ValidateDropOperation (collectionView, draggingInfo, ref proposedDropIndexPath, ref proposedDropOperation); | ||
} | ||
} | ||
|
||
public partial class NSCollectionViewDelegateFlowLayout | ||
{ | ||
[Obsolete ("Use 'ValidateDropOperation (NSCollectionView collectionView, NSDraggingInfo draggingInfo, ref NSIndexPath proposedDropIndexPath, ref NSCollectionViewDropOperation proposedDropOperation)' instead.")] | ||
[Mac (10, 11)] | ||
public virtual NSDragOperation ValidateDrop (NSCollectionView collectionView, NSDraggingInfo draggingInfo, out NSIndexPath proposedDropIndexPath, out NSCollectionViewDropOperation proposedDropOperation) | ||
{ | ||
proposedDropIndexPath = null; | ||
proposedDropOperation = NSCollectionViewDropOperation.On; | ||
return ValidateDropOperation (collectionView, draggingInfo, ref proposedDropIndexPath, ref proposedDropOperation); | ||
} | ||
} | ||
|
||
public static partial class NSCollectionViewDelegate_Extensions | ||
{ | ||
[Obsolete ("Use 'ValidateDropOperation (NSCollectionView collectionView, NSDraggingInfo draggingInfo, ref NSIndexPath proposedDropIndexPath, ref NSCollectionViewDropOperation proposedDropOperation)' instead.")] | ||
[Mac (10, 11)] | ||
public static NSDragOperation ValidateDrop (this INSCollectionViewDelegate This, NSCollectionView collectionView, NSDraggingInfo draggingInfo, out NSIndexPath proposedDropIndexPath, out NSCollectionViewDropOperation proposedDropOperation) | ||
{ | ||
proposedDropIndexPath = null; | ||
proposedDropOperation = NSCollectionViewDropOperation.On; | ||
return This.ValidateDropOperation (collectionView, draggingInfo, ref proposedDropIndexPath, ref proposedDropOperation); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters