Пример #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;
        }