コード例 #1
0
        private object GetItem(string key)
        {
            NSObject obj = null;

            if (IsRoaming)
            {
                obj = _store.ValueForKey(new NSString(key));
            }
            else
            {
                obj = _defaults.ValueForKey(new NSString(key));
            }
            return(IOSTypeConverter.ConvertToObject(obj));
        }
コード例 #2
0
        private bool DoTryGetValue(string key, out object value)
        {
            NSObject obj = null;

            if (IsRoaming)
            {
                obj = _store.ValueForKey(new NSString(key));
            }
            else
            {
                obj = _defaults.ValueForKey(new NSString(key));
            }

            value = IOSTypeConverter.ConvertToObject(obj);
            return(obj != null);
        }