[imagecapturecore] Add nullability to (generated and manual) bindings (#15127)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
This commit is contained in:
Родитель
9bf39cd985
Коммит
f74d6801c7
|
@ -214,7 +214,7 @@ namespace ImageCaptureCore {
|
||||||
[Export ("modulePath")]
|
[Export ("modulePath")]
|
||||||
string ModulePath { get; }
|
string ModulePath { get; }
|
||||||
|
|
||||||
[Export ("moduleVersion")]
|
[NullAllowed, Export ("moduleVersion")]
|
||||||
string ModuleVersion { get; }
|
string ModuleVersion { get; }
|
||||||
|
|
||||||
[Export ("moduleExecutableArchitecture")]
|
[Export ("moduleExecutableArchitecture")]
|
||||||
|
@ -353,16 +353,16 @@ namespace ImageCaptureCore {
|
||||||
[BaseType (typeof(NSObject))]
|
[BaseType (typeof(NSObject))]
|
||||||
interface ICCameraItem {
|
interface ICCameraItem {
|
||||||
|
|
||||||
[Export ("device")]
|
[NullAllowed, Export ("device")]
|
||||||
ICCameraDevice Device { get; }
|
ICCameraDevice Device { get; }
|
||||||
|
|
||||||
[Export ("parentFolder")]
|
[NullAllowed, Export ("parentFolder")]
|
||||||
ICCameraFolder ParentFolder { get; }
|
ICCameraFolder ParentFolder { get; }
|
||||||
|
|
||||||
[Export ("name")]
|
[NullAllowed, Export ("name")]
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
|
|
||||||
[Export ("UTI")]
|
[NullAllowed, Export ("UTI")]
|
||||||
string Uti { get; }
|
string Uti { get; }
|
||||||
|
|
||||||
[NullAllowed, Export ("fileSystemPath")]
|
[NullAllowed, Export ("fileSystemPath")]
|
||||||
|
@ -406,7 +406,7 @@ namespace ImageCaptureCore {
|
||||||
[BaseType (typeof(ICCameraItem))]
|
[BaseType (typeof(ICCameraItem))]
|
||||||
interface ICCameraFolder {
|
interface ICCameraFolder {
|
||||||
|
|
||||||
[Export ("contents")]
|
[NullAllowed, Export ("contents")]
|
||||||
ICCameraItem[] Contents { get; }
|
ICCameraItem[] Contents { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ namespace ImageCaptureCore {
|
||||||
[Export ("duration")]
|
[Export ("duration")]
|
||||||
double Duration { get; }
|
double Duration { get; }
|
||||||
|
|
||||||
[Export ("sidecarFiles")]
|
[NullAllowed, Export ("sidecarFiles")]
|
||||||
ICCameraItem[] SidecarFiles { get; }
|
ICCameraItem[] SidecarFiles { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ namespace ImageCaptureCore {
|
||||||
interface ICCameraDeviceDownloadDelegate {
|
interface ICCameraDeviceDownloadDelegate {
|
||||||
|
|
||||||
[Export ("didDownloadFile:error:options:contextInfo:")]
|
[Export ("didDownloadFile:error:options:contextInfo:")]
|
||||||
void DidDownloadFile (ICCameraFile file, [NullAllowed] NSError error, [NullAllowed] NSDictionary<NSString, NSObject> options, [NullAllowed] IntPtr contextInfo);
|
void DidDownloadFile (ICCameraFile file, [NullAllowed] NSError error, NSDictionary<NSString, NSObject> options, [NullAllowed] IntPtr contextInfo);
|
||||||
|
|
||||||
[Export ("didReceiveDownloadProgressForFile:downloadedBytes:maxBytes:")]
|
[Export ("didReceiveDownloadProgressForFile:downloadedBytes:maxBytes:")]
|
||||||
void DidReceiveDownloadProgress (ICCameraFile file, long downloadedBytes, long maxBytes);
|
void DidReceiveDownloadProgress (ICCameraFile file, long downloadedBytes, long maxBytes);
|
||||||
|
@ -555,13 +555,13 @@ namespace ImageCaptureCore {
|
||||||
void CancelDelete ();
|
void CancelDelete ();
|
||||||
|
|
||||||
[Export ("requestDownloadFile:options:downloadDelegate:didDownloadSelector:contextInfo:")]
|
[Export ("requestDownloadFile:options:downloadDelegate:didDownloadSelector:contextInfo:")]
|
||||||
void RequestDownloadFile (ICCameraFile file, [NullAllowed] NSDictionary<NSString, NSObject> options, IICCameraDeviceDownloadDelegate downloadDelegate, Selector didDownloadSelector, [NullAllowed] IntPtr contextInfo);
|
void RequestDownloadFile (ICCameraFile file, NSDictionary<NSString, NSObject> options, IICCameraDeviceDownloadDelegate downloadDelegate, Selector didDownloadSelector, [NullAllowed] IntPtr contextInfo);
|
||||||
|
|
||||||
[Export ("cancelDownload")]
|
[Export ("cancelDownload")]
|
||||||
void CancelDownload ();
|
void CancelDownload ();
|
||||||
|
|
||||||
[Export ("requestUploadFile:options:uploadDelegate:didUploadSelector:contextInfo:")]
|
[Export ("requestUploadFile:options:uploadDelegate:didUploadSelector:contextInfo:")]
|
||||||
void RequestUploadFile (NSUrl fileUrl, [NullAllowed] NSDictionary<NSString, NSObject> options, NSObject uploadDelegate, Selector didUploadSelector, [NullAllowed] IntPtr contextInfo);
|
void RequestUploadFile (NSUrl fileUrl, NSDictionary<NSString, NSObject> options, NSObject uploadDelegate, Selector didUploadSelector, [NullAllowed] IntPtr contextInfo);
|
||||||
|
|
||||||
[Export ("requestReadDataFromFile:atOffset:length:readDelegate:didReadDataSelector:contextInfo:")]
|
[Export ("requestReadDataFromFile:atOffset:length:readDelegate:didReadDataSelector:contextInfo:")]
|
||||||
void RequestReadDataFromFile (ICCameraFile file, long offset, long length, NSObject readDelegate, Selector didReadDataSelector, [NullAllowed] IntPtr contextInfo);
|
void RequestReadDataFromFile (ICCameraFile file, long offset, long length, NSObject readDelegate, Selector didReadDataSelector, [NullAllowed] IntPtr contextInfo);
|
||||||
|
|
|
@ -1,15 +1,3 @@
|
||||||
|
# Xcode headers say `NSData* _Nullable` the but the web docs say `outData:(NSData *)data`
|
||||||
# Initial result from new rule extra-null-allowed
|
# since this is an "out" variable that is NOT `NSData **`, let's leave this one here for now.
|
||||||
!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,ImageCaptureCore.IICCameraDeviceDownloadDelegate,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1
|
|
||||||
!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestUploadFile(Foundation.NSUrl,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1
|
|
||||||
!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDeviceDownloadDelegate::DidDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSError,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,System.IntPtr)' has a extraneous [NullAllowed] on parameter #2
|
|
||||||
|
|
||||||
# Initial result from new rule missing-null-allowed
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraDevice ImageCaptureCore.ICCameraItem::get_Device()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraFolder ImageCaptureCore.ICCameraItem::get_ParentFolder()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFile::get_SidecarFiles()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFolder::get_Contents()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Name()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Uti()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.String ImageCaptureCore.ICDevice::get_ModuleVersion()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestSendPtpCommand(Foundation.NSData,Foundation.NSData,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #1
|
!missing-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestSendPtpCommand(Foundation.NSData,Foundation.NSData,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #1
|
||||||
|
|
|
@ -1,15 +1,3 @@
|
||||||
|
# Xcode headers say `NSData* _Nullable` the but the web docs say `outData:(NSData *)data`
|
||||||
# Initial result from new rule extra-null-allowed
|
# since this is an "out" variable that is NOT `NSData **`, let's leave this one here for now.
|
||||||
!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,ImageCaptureCore.IICCameraDeviceDownloadDelegate,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1
|
|
||||||
!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestUploadFile(Foundation.NSUrl,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1
|
|
||||||
!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDeviceDownloadDelegate::DidDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSError,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,System.IntPtr)' has a extraneous [NullAllowed] on parameter #2
|
|
||||||
|
|
||||||
# Initial result from new rule missing-null-allowed
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraDevice ImageCaptureCore.ICCameraItem::get_Device()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraFolder ImageCaptureCore.ICCameraItem::get_ParentFolder()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFile::get_SidecarFiles()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFolder::get_Contents()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Name()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Uti()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.String ImageCaptureCore.ICDevice::get_ModuleVersion()' is missing an [NullAllowed] on return type
|
|
||||||
!missing-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestSendPtpCommand(Foundation.NSData,Foundation.NSData,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #1
|
!missing-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestSendPtpCommand(Foundation.NSData,Foundation.NSData,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #1
|
||||||
|
|
Загрузка…
Ссылка в новой задаче