Ejemplo n.º 1
0
        public static NSData FromUrl(string url, NSDataReadingOptions mask, out NSError error)
        {
            IntPtr errorHandle;
            var    data = Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr_NSUrl(_classHandle, Selector.GetHandle("dataWithContentsOfURL:options:error:"), url, (uint)mask, out errorHandle));

            error = errorHandle == IntPtr.Zero ? null : Runtime.GetNSObject <NSError>(errorHandle);
            return(data);
        }
Ejemplo n.º 2
0
        public static NSData FromUrl(string url, NSDataReadingOptions mask, out NSError error)
        {
            IntPtr arg;
            NSData nSObject = Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr_NSUrl(_classHandle, Selector.GetHandle("dataWithContentsOfURL:options:error:"), url, (uint)mask, out arg));

            error = ((arg == IntPtr.Zero) ? null : Runtime.GetNSObject <NSError>(arg));
            return(nSObject);
        }
Ejemplo n.º 3
0
 public static NSData FromUrl(string url)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr_NSUrl(_classHandle, Selector.GetHandle("dataWithContentsOfURL:"), url)));
 }