public virtual void AddEntriesFromDictionary(NSDictionary otherDictionary) { NSEnumerator enumerator = otherDictionary.KeyEnumerator(); id aKey = null; while ( (aKey = enumerator.NextObject()) != null) { id value = otherDictionary.ObjectForKey(aKey); this.SetObjectForKey(value, aKey); } }
public virtual id InitDirectoryWithFileWrappers(NSDictionary docs) { NSFileWrapper self = this; if (base.Init() != null) { NSEnumerator enumerator; id key; NSFileWrapper wrapper; _wrapperType = GSFileWrapperType.GSFileWrapperDirectoryType; _wrapperData = NSMutableDictionary.Alloc().InitWithCapacity((uint)docs.Count); enumerator = docs.KeyEnumerator(); while ((key = enumerator.NextObject()) != null) { wrapper = (NSFileWrapper)docs.ObjectForKey(key); if (wrapper.PreferredFilename() == null) { wrapper.SetPreferredFilename((NSString)key); } ((NSMutableDictionary)_wrapperData).SetObjectForKey(wrapper, key); } } return self; }