Exemplo n.º 1
0
        protected PersistenceProvider()
        {
            convertToStoredType = new Lazy <Dictionary <Type, Conversion?> >(
                delegate()
            {
                return(SupportedTypeMappings.ToDictionary(item => item.ReturnType, item => Conversion.GetConverter(item.ReturnType, item.PersistedType)));
            }, true);

            convertFromStoredType = new Lazy <Dictionary <Type, Conversion?> >(
                delegate()
            {
                return(SupportedTypeMappings.ToDictionary(item => item.ReturnType, item => Conversion.GetConverter(item.PersistedType, item.ReturnType)));
            }, true);
        }
Exemplo n.º 2
0
        protected PersistenceProvider()
        {
            NodePersistenceProvider         = GetNodePersistenceProvider();
            RelationshipPersistenceProvider = GetRelationshipPersistenceProvider();
            Templates  = GetTemplates();
            Translator = GetTranslator();

            convertToStoredType = new Lazy <Dictionary <Type, Conversion?> >(
                delegate()
            {
                return(SupportedTypeMappings.ToDictionary(item => item.ReturnType, item => Conversion.GetConverter(item.ReturnType, item.PersistedType)));
            }, true);

            convertFromStoredType = new Lazy <Dictionary <Type, Conversion?> >(
                delegate()
            {
                return(SupportedTypeMappings.ToDictionary(item => item.ReturnType, item => Conversion.GetConverter(item.PersistedType, item.ReturnType)));
            }, true);
        }