public bool RemoveDocument(SKDocument document) { if (document == null) { throw new ArgumentNullException("document"); } return(SKIndexRemoveDocument(handle, document.Handle)); }
public bool RemoveDocument(SKDocument document) { if (document is null) { throw new ArgumentNullException(nameof(document)); } return(SKIndexRemoveDocument(Handle, document.Handle)); }
public bool AddDocument(SKDocument document, string mimeHint, bool canReplace) { if (document == null) { throw new ArgumentNullException("document"); } var ns = mimeHint == null ? null : new NSString(mimeHint); return(SKIndexAddDocument(handle, document.Handle, ns == null ? IntPtr.Zero : ns.Handle, canReplace)); }
public void SetDocumentProperties(SKDocument document, NSDictionary dict) { if (document == null) { throw new ArgumentNullException("document"); } if (dict == null) { throw new ArgumentNullException("dict"); } SKIndexSetDocumentProperties(handle, document.Handle, dict.Handle); }
public bool MoveDocument(SKDocument document, SKDocument newParent) { if (document == null) { throw new ArgumentNullException("document"); } if (newParent == null) { throw new ArgumentNullException("newParent"); } return(SKIndexMoveDocument(handle, document.Handle, newParent.Handle)); }
public void SetDocumentProperties(SKDocument document, NSDictionary dict) { if (document is null) { throw new ArgumentNullException(nameof(document)); } if (dict is null) { throw new ArgumentNullException(nameof(dict)); } SKIndexSetDocumentProperties(Handle, document.Handle, dict.Handle); }
public bool MoveDocument(SKDocument document, SKDocument newParent) { if (document is null) { throw new ArgumentNullException(nameof(document)); } if (newParent is null) { throw new ArgumentNullException(nameof(newParent)); } return(SKIndexMoveDocument(Handle, document.Handle, newParent.Handle)); }
public bool RenameDocument(SKDocument document, string newName) { if (document == null) { throw new ArgumentNullException("document"); } if (newName == null) { throw new ArgumentNullException("newName"); } using (var ns = new NSString(newName)) return(SKIndexRenameDocument(handle, document.Handle, ns.Handle)); }
public bool AddDocument(SKDocument document, string mimeHint, bool canReplace) { if (document is null) { throw new ArgumentNullException(nameof(document)); } var mimeHintHandle = CFString.CreateNative(mimeHint); try { return(SKIndexAddDocument(Handle, document.Handle, mimeHintHandle, canReplace)); } finally { CFString.ReleaseNative(mimeHintHandle); } }
public bool AddDocumentWithText(SKDocument document, string text, bool canReplace) { if (document == null) { throw new ArgumentNullException("document"); } var ns = text == null ? null : new NSString(text); try { return(SKIndexAddDocumentWithText(handle, document.Handle, ns == null ? IntPtr.Zero : ns.Handle, canReplace)); } finally { if (ns != null) { ns.Dispose(); } } }
public bool RenameDocument(SKDocument document, string newName) { if (document is null) { throw new ArgumentNullException(nameof(document)); } if (newName is null) { throw new ArgumentNullException(nameof(newName)); } var newNameHandle = CFString.CreateNative(newName); try { return(SKIndexRenameDocument(Handle, document.Handle, newNameHandle)); } finally { CFString.ReleaseNative(newNameHandle); } }
public SKDocument(string name, SKDocument parent = null, string scheme = null) { if (name == null) { throw new ArgumentNullException("name"); } var ss = scheme == null ? null : new NSString(scheme); using (var nn = new NSString(name)) handle = SKDocumentCreate(ss == null ? IntPtr.Zero : ss.Handle, parent == null ? IntPtr.Zero : parent.Handle, nn.Handle); if (ss != null) { ss.Dispose(); } if (handle == IntPtr.Zero) { throw new ArgumentNullException("Failed to create the specified document"); } }