예제 #1
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));
        }
예제 #2
0
        // 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);
        }
예제 #3
0
 static extern LSResult LSCanURLAcceptURL(IntPtr inItemUrl, IntPtr inTargetUrl,
                                          LSRoles inRole, LSAcceptanceFlags inFlags, out byte outAcceptsItem);
예제 #4
0
        // 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;
        }
예제 #5
0
 static extern LSResult LSCanURLAcceptURL(IntPtr inItemUrl, IntPtr inTargetUrl,
     LSRoles inRole, LSAcceptanceFlags inFlags, out byte outAcceptsItem);
예제 #6
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);
 }