コード例 #1
0
ファイル: BaseMapper.Generic.cs プロジェクト: jangocheng/MOO
        /// <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;
        }