Esempio n. 1
0
 public SKSearch Search(string query, SKSearchOptions options = SKSearchOptions.Default)
 {
     if (query == null)
     {
         throw new ArgumentNullException("query");
     }
     using (var nsq = new NSString(query)){
         return(new SKSearch(SKSearchCreate(handle, nsq.Handle, options)));
     }
 }
Esempio n. 2
0
        public SKSearch Search(string query, SKSearchOptions options = SKSearchOptions.Default)
        {
            if (query is null)
            {
                throw new ArgumentNullException(nameof(query));
            }
            var queryHandle = CFString.CreateNative(query);

            try {
                return(new SKSearch(SKSearchCreate(Handle, queryHandle, options), true));
            } finally {
                CFString.ReleaseNative(queryHandle);
            }
        }
Esempio n. 3
0
 extern static IntPtr SKSearchCreate(IntPtr h, IntPtr str, SKSearchOptions options);
Esempio n. 4
0
 static extern IntPtr SKSearchCreate(IntPtr h, IntPtr str, SKSearchOptions options);
Esempio n. 5
0
 public SKSearch Search(string query, SKSearchOptions options = SKSearchOptions.Default)
 {
     if (query == null)
         throw new ArgumentNullException ("query");
     using (var nsq = new NSString (query)){
         return new SKSearch (SKSearchCreate (handle, nsq.Handle, options));
     }
 }