public CWNetwork[] ScanForNetworksWithName(string networkName, out NSError error) { NSSet networks = _ScanForNetworksWithName (networkName, out error); if (networks != null) return networks.ToArray<CWNetwork> (); return null; }
public static bool GetSkipBackupAttribute(string filename, out NSError error) { if (filename == null) throw new ArgumentNullException ("filename"); #if IOS if (xattr_compatibility) { byte attrValue = 0; unsafe { byte *p = &attrValue; int code = getxattr (filename, key, (IntPtr) p, 1, 0, 0); if (code == -1) { error = new NSError (NSError.PosixErrorDomain, Marshal.GetLastWin32Error ()); return false; } error = null; return attrValue != 0; } } else { #endif // IOS using (NSUrl url = NSUrl.FromFilename (filename)) { NSObject value; url.TryGetResource (NSUrl.IsExcludedFromBackupKey, out value, out error); return (error == null) && ((long) ((NSNumber) value) == 1); } #if IOS } #endif // IOS }
public CWNetwork[] ScanForNetworksWithSsid(NSData ssid, out NSError error) { NSSet networks = _ScanForNetworksWithSsid (ssid, out error); if (networks != null) return networks.ToArray<CWNetwork> (); return null; }
public static unsafe NSData SendSynchronousRequest(NSUrlRequest request, out NSUrlResponse response, out NSError error) { IntPtr responseStorage = IntPtr.Zero; IntPtr errorStorage = IntPtr.Zero; void *resp = &responseStorage; void *errp = &errorStorage; IntPtr rhandle = (IntPtr) resp; IntPtr ehandle = (IntPtr) errp; var res = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr ( class_ptr, Selector.GetHandle (selSendSynchronousRequestReturningResponseError), request.Handle, rhandle, ehandle); if (responseStorage != IntPtr.Zero) response = (NSUrlResponse) Runtime.GetNSObject (responseStorage); else response = null; if (errorStorage != IntPtr.Zero) error = (NSError) Runtime.GetNSObject (errorStorage); else error = null; return (NSData) Runtime.GetNSObject (res); }
public static GLKMesh[] FromAsset(MDLAsset asset, out MDLMesh [] sourceMeshes, out NSError error) { NSArray aret; var ret = FromAsset (asset, out aret, out error); sourceMeshes = NSArray.FromArray<MDLMesh> (aret); return ret; }
// use the best selector based on the OS version public NSAttributedString(NSUrl url, NSDictionary options, out NSDictionary resultDocumentAttributes, ref NSError error) { if (UIDevice.CurrentDevice.CheckSystemVersion (9,0)) Handle = InitWithURL (url, options, out resultDocumentAttributes, ref error); else Handle = InitWithFileURL (url, options, out resultDocumentAttributes, ref error); if (Handle == IntPtr.Zero) throw new ArgumentException (); }
public bool RegisterNamespace(NSString xmlns, NSString prefix, out NSError error) { if (xmlns == null) throw new ArgumentNullException ("xmlns"); if (prefix == null) throw new ArgumentNullException ("prefix"); IntPtr err; bool result = CGImageMetadataRegisterNamespaceForPrefix (Handle, xmlns.Handle, prefix.Handle, out err); error = err == IntPtr.Zero ? null : new NSError (err); return result; }
public bool SendDataToAllPeers(NSData data, GKSendDataMode mode, out NSError error) { unsafe { IntPtr errhandle; IntPtr ptrtohandle = (IntPtr) (&errhandle); var ret = SendDataToAllPeers (data, mode, ptrtohandle); if (errhandle != IntPtr.Zero) error = (NSError) Runtime.GetNSObject (errhandle); else error = null; return ret; } }
public NSObject DecodeTopLevelObject(Type[] types, string key, out NSError error) { #if XAMCORE_2_0 NSSet<Class> typeSet = null; #else NSSet typeSet = null; #endif if (types != null) { var classes = new Class [types.Length]; for (int i = 0; i < types.Length; i++) classes [i] = new Class (types [i]); #if XAMCORE_2_0 typeSet = new NSSet<Class> (classes); #else typeSet = new NSSet (classes); #endif } return DecodeTopLevelObject (typeSet, key, out error); }
public NSAttributedString(NSUrl url, NSAttributedStringDocumentAttributes documentAttributes, ref NSError error) : this(url, documentAttributes, out ignore, ref error) { }
public void Callback(string str, NSError err, IntPtr ctx) { status (str, err); DangerousRelease (); }
public bool CreateDirectory(string path, bool createIntermediates, NSFileAttributes attributes, out NSError error) { var dict = attributes == null ? null : attributes.ToDictionary(); return(CreateDirectory(path, createIntermediates, dict, out error)); }
public NSAttributedString(NSData data, ref NSError error) : this(data, (NSDictionary) null, out ignore, ref error) { }
public NSAttributedString(NSData data, NSAttributedStringDocumentAttributes documentAttributes, ref NSError error) : this(data, documentAttributes, out ignore, ref error) { }
public override void DecoderError (AVAudioPlayer player, NSError error) { if (cbDecoderError != null) cbDecoderError (player, new AVErrorEventArgs (error)); }
public override void EncoderError (AVAudioRecorder recorder, NSError error) { if (cbEncoderError != null) cbEncoderError (recorder, new AVErrorEventArgs (error)); }
public NSAttributedString(NSUrl url, ref NSError error) : this(url, (NSDictionary)null, out ignore, ref error) { }
public NSAttributedString(NSData data, ref NSError error) : this(data, (NSDictionary)null, out ignore, ref error) { }
public NSFileSystemAttributes GetFileSystemAttributes(string path, out NSError error) { return(NSFileSystemAttributes.FromDictionary(_GetFileSystemAttributes(path, out error))); }
public NSErrorException(NSError error) { this.error = error; }
public NSFileSystemAttributes GetFileSystemAttributes(string path, out NSError error) { return NSFileSystemAttributes.FromDictionary (_GetFileSystemAttributes (path, out error)); }
public AVErrorEventArgs (NSError error) { Error = error; }
public bool SetAttributes(NSFileAttributes attributes, string path, out NSError error) { if (attributes == null) throw new ArgumentNullException ("attributes"); return SetAttributes (attributes.ToDictionary (), path, out error); }
AVAudioRecorder (NSUrl url, AudioSettings settings, out NSError error) { // We use this method because it allows us to out NSError but, as a side effect, it is possible for the handle to be null and we will need to check this manually (on the Create method). Handle = InitWithUrl (url, settings.Dictionary, out error); }
public NSAttributedString(NSUrl url, ref NSError error) : this(url, (NSDictionary) null, out ignore, ref error) { }
public static AVAudioRecorder ToUrl (NSUrl url, AVAudioRecorderSettings settings, out NSError error) { if (settings == null) throw new ArgumentNullException ("settings"); return ToUrl (url, settings.ToDictionary (), out error); }
public AVAudioRecorder (NSUrl url, NSDictionary settings, NSError outError) { throw new Exception ("This constructor is no longer supported, use the AVAudioRecorder.ToUrl factory method instead"); }
// use the best selector based on the OS version public NSAttributedString(NSUrl url, NSDictionary options, out NSDictionary resultDocumentAttributes, ref NSError error) { if (UIDevice.CurrentDevice.CheckSystemVersion(9, 0)) { Handle = InitWithURL(url, options, out resultDocumentAttributes, ref error); } else { Handle = InitWithFileURL(url, options, out resultDocumentAttributes, ref error); } if (Handle == IntPtr.Zero) { throw new ArgumentException(); } }
public static AVAudioRecorder Create (NSUrl url, AudioSettings settings, out NSError error) { if (settings == null) throw new ArgumentNullException ("settings"); error = null; try { AVAudioRecorder r = new AVAudioRecorder (url, settings, out error); if (r.Handle == IntPtr.Zero) return null; return r; } catch { return null; } }
public bool RemoveCalendarc(EKCalendar calendar, bool commit, out NSError error) { return RemoveCalendar (calendar, commit, out error); }
static AVAudioRecorder ToUrl (NSUrl url, NSDictionary settings, out NSError error) { return Create (url, new AudioSettings (settings), out error); }
public bool SaveTo(string fileName, QTMovieSaveOptions options, out NSError error) { return SaveTo (fileName, options == null ? null : options.ToDictionary (), out error); }
public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error) { if (cbFinished != null) cbFinished (controller, new MFComposeResultEventArgs (controller, result, error)); }
public MFComposeResultEventArgs(MFMailComposeViewController controller, MFMailComposeResult result, NSError error) { Result = result; Error = error; Controller = controller; }
public virtual bool InsertTimeRanges(NSValue cmTimeRanges, AVAssetTrack[] tracks, CMTime startTime, out NSError error) { return InsertTimeRanges (new NSValue [] { cmTimeRanges }, tracks, startTime, out error); }
public unsafe static NSData SendSynchronousRequest(NSUrlRequest request, out NSUrlResponse response, out NSError error) { IntPtr responseStorage = IntPtr.Zero; IntPtr errorStorage = IntPtr.Zero; void * resp = &responseStorage; void * errp = &errorStorage; IntPtr rhandle = (IntPtr)resp; IntPtr ehandle = (IntPtr)errp; var res = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr( class_ptr, Selector.GetHandle(selSendSynchronousRequestReturningResponseError), request.Handle, rhandle, ehandle); if (responseStorage != IntPtr.Zero) { response = (NSUrlResponse)Runtime.GetNSObject(responseStorage); } else { response = null; } if (errorStorage != IntPtr.Zero) { error = (NSError)Runtime.GetNSObject(errorStorage); } else { error = null; } return((NSData)Runtime.GetNSObject(res)); }