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"); } }
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"); } }
// Strongly typed version of initWithName:protectionClass: public CSSearchableIndex(string name, CSFileProtection protectionOption = CSFileProtection.None) : this(name, Translate (protectionOption)) { }
// Strongly typed version of initWithName:protectionClass: public CSSearchableIndex(string name, CSFileProtection protectionOption = CSFileProtection.None) : this(name, Translate(protectionOption)) { }