Ejemplo n.º 1
0
        /// <summary>
        /// Get or create <see cref="ComponentInfoBuilder"/> for class owning currently visited element
        /// </summary>
        /// <returns><see cref="ComponentInfoBuilder"/> for currently visited class</returns>
        private ComponentInfoBuilder getOrCreateCurrentBuilder(CodeElement element)
        {
            var currentClass = element.DeclaringClass();

            ComponentInfoBuilder builder;

            if (!_builtComponents.TryGetValue(currentClass, out builder))
            {
                _builtComponents[currentClass] = builder = new ComponentInfoBuilder(_assembly.InfoBuilder.CreateDescriptor(currentClass));
            }

            return(builder);
        }