예제 #1
0
        private void AddComponentType(Type contractType)
        {
            ComponentType componentType = GetComponentType(contractType);

            if (componentType == null)
            {
                componentType = new ComponentType(contractType);

                using (_componentTypes.GetWriteLock())
                {
                    _componentTypes[componentType.BaseType] = componentType;
                }
            }
        }
예제 #2
0
        private IComponentBuilder GetDefaultComponentBuilder(ComponentType componentType)
        {
            IComponentBuilder builder;

            using (componentType.ComponentBuilders.GetReadLock())
            {
                builder = componentType.ComponentBuilders.DefaultBuilder;
            }

            return builder;
        }