Example #1
0
 static NSString Translate(CSFileProtection protectionOption)
 {
     switch (protectionOption) {
     case CSFileProtection.None:
         return null;
     case CSFileProtection.Complete:
         return NSFileManager.FileProtectionComplete;
     case CSFileProtection.CompleteUnlessOpen:
         return NSFileManager.FileProtectionCompleteUnlessOpen;
     case CSFileProtection.CompleteUntilFirstUserAuthentication:
         return NSFileManager.FileProtectionCompleteUntilFirstUserAuthentication;
     default:
         throw new ArgumentOutOfRangeException ("protectionOption");
     }
 }
Example #2
0
        static NSString Translate(CSFileProtection protectionOption)
        {
            switch (protectionOption)
            {
            case CSFileProtection.None:
                return(null);

            case CSFileProtection.Complete:
                return(NSFileManager.FileProtectionComplete);

            case CSFileProtection.CompleteUnlessOpen:
                return(NSFileManager.FileProtectionCompleteUnlessOpen);

            case CSFileProtection.CompleteUntilFirstUserAuthentication:
                return(NSFileManager.FileProtectionCompleteUntilFirstUserAuthentication);

            default:
                throw new ArgumentOutOfRangeException("protectionOption");
            }
        }
Example #3
0
 // Strongly typed version of initWithName:protectionClass:
 public CSSearchableIndex(string name, CSFileProtection protectionOption = CSFileProtection.None)
     : this(name, Translate (protectionOption))
 {
 }
Example #4
0
 // Strongly typed version of initWithName:protectionClass:
 public CSSearchableIndex(string name, CSFileProtection protectionOption = CSFileProtection.None) : this(name, Translate(protectionOption))
 {
 }