Example #1
0
        /// <summary>Initializes the internal mapping.</summary>
        private void InitializeMapping()
        {
            if (TypeMapping == null)
            {
                lock (_syncRoot)
                {
                    if (TypeMapping == null)
                    {
                        TypeMapping = new TypeMappingInfo <TSource, TTarget>();
                    }
                }
            }

            IEnumerable <MemberMappingInfo <TSource, TTarget> > mappings = GetMappings();

            if (mappings != null)
            {
                TypeMapping.AddRange(GetMappings());
            }

            TypeMapping.Compile();

            CurrentStatus = MapperStatus.Active;
        }