Exemplo n.º 1
0
 public void SetTypeMappers(MappingEngineCollection coll)
 {
     foreach (var binder in coll.Binders)
     {
         TypeMappers.Add(binder);
     }
 }
        public void SetVersions(AbstractTypeMapper mainTypeMapper, AbstractTypeMapper[] secondaryTypeMappers = null)
        {
            TypeMappers.Clear();
            MainVersion = mainTypeMapper?.SqlVersion;

            if (mainTypeMapper != null && (secondaryTypeMappers?.Contains(mainTypeMapper) != true))
            {
                TypeMappers.Add(mainTypeMapper.SqlVersion, mainTypeMapper);
            }

            if (secondaryTypeMappers != null)
            {
                foreach (var mapper in secondaryTypeMappers)
                {
                    TypeMappers.Add(mapper.SqlVersion, mapper);
                }
            }
        }