Beispiel #1
0
        /// <summary>Creates <see cref="NSError"/> of FileProvider domain.</summary>
        /// <param name="fileProviderErrorType">The FileProvider error type.</param>
        /// <param name="description">The description.</param>
        /// <returns>The <see cref="NSError"/>.</returns>
        public static NSError CreateError(NSFileProviderError fileProviderErrorType, string description)
        {
            var      userInfo    = new NSDictionary(NSError.LocalizedDescriptionKey, description);
            NSString errorDomain = fileProviderErrorType.GetDomain();

            return(new NSError(errorDomain, (int)fileProviderErrorType, userInfo));
        }
Beispiel #2
0
        /// <summary>Creates <see cref="NSError"/> of FileProvider domain.</summary>
        /// <param name="fileProviderErrorType">The FileProvider error type.</param>
        /// <returns>The <see cref="NSError"/>.</returns>
        public static NSError CreateError(NSFileProviderError fileProviderErrorType)
        {
            NSString errorDomain = fileProviderErrorType.GetDomain();

            return(new NSError(errorDomain, (int)fileProviderErrorType));
        }