//------------------------------------------------------------------------------
        protected override IInternalSettingsSerializer GetSerializer(bool secure)
        {
            IInternalSettingsSerializer serializer = null;

            if (secure)
            {
                if (m_keyChainSerializer == null)
                {
                    m_keyChainSerializer = new KeyChainSerializer(
                        secAccessible: SettingsConfiguration.KeyChainSecAccessible,
                        synchronizable: false);
                }

                serializer = m_keyChainSerializer;
            }
            else
            {
                if (m_userDefaultsSerializer == null)
                {
                    m_userDefaultsSerializer = new InternalUserDefaultsSerializer();
                }

                serializer = m_userDefaultsSerializer;
            }

            Debug.Assert(serializer != null);

            return(serializer);
        }
示例#2
0
        //------------------------------------------------------------------------------
        protected override IInternalSettingsSerializer GetSerializer(bool secure)
        {
            IInternalSettingsSerializer serializer = null;

            if (secure)
            {
                if (m_keyChainSerializer == null)
                {
                    m_keyChainSerializer = new KeyChainSerializer();
                }

                serializer = m_keyChainSerializer;
            }
            else
            {
                if (m_sharedPreferencesSerializer == null)
                {
                    m_sharedPreferencesSerializer = new InternalSharedPreferencesSerializer();
                }

                serializer = m_sharedPreferencesSerializer;
            }

            Debug.Assert(serializer != null);

            return(serializer);
        }