public static bool CanUrlAcceptUrl(NSUrl itemUrl, NSUrl targetUrl, LSRoles roles = LSRoles.All, LSAcceptanceFlags acceptanceFlags = LSAcceptanceFlags.Default) { LSResult result; return(CanUrlAcceptUrl(itemUrl, targetUrl, roles, acceptanceFlags, out result)); }
// NOTE: intentionally inverting the status results (return bool, with an out // LSResult vs return LSResult with an out bool) to make the API nicer to use public static bool CanUrlAcceptUrl(NSUrl itemUrl, NSUrl targetUrl, LSRoles roles, LSAcceptanceFlags acceptanceFlags, out LSResult result) { if (itemUrl == null) { throw new ArgumentNullException(nameof(itemUrl)); } if (targetUrl == null) { throw new ArgumentNullException(nameof(targetUrl)); } byte acceptsItem; result = LSCanURLAcceptURL(itemUrl.Handle, targetUrl.Handle, roles, acceptanceFlags, out acceptsItem); return(acceptsItem != 0); }
static extern LSResult LSCanURLAcceptURL(IntPtr inItemUrl, IntPtr inTargetUrl, LSRoles inRole, LSAcceptanceFlags inFlags, out byte outAcceptsItem);
// NOTE: intentionally inverting the status results (return bool, with an out // LSResult vs return LSResult with an out bool) to make the API nicer to use public static bool CanUrlAcceptUrl(NSUrl itemUrl, NSUrl targetUrl, LSRoles roles, LSAcceptanceFlags acceptanceFlags, out LSResult result) { if (itemUrl == null) throw new ArgumentNullException (nameof (itemUrl)); if (targetUrl == null) throw new ArgumentNullException (nameof (targetUrl)); byte acceptsItem; result = LSCanURLAcceptURL (itemUrl.Handle, targetUrl.Handle, roles, acceptanceFlags, out acceptsItem); return acceptsItem != 0; }
public static bool CanUrlAcceptUrl(NSUrl itemUrl, NSUrl targetUrl, LSRoles roles = LSRoles.All, LSAcceptanceFlags acceptanceFlags = LSAcceptanceFlags.Default) { LSResult result; return CanUrlAcceptUrl (itemUrl, targetUrl, roles, acceptanceFlags, out result); }