示例#1
0
        protected override ComponentInfo CreateComponentInfo(IPipelineComponentDescriptor componentDescriptor)
        {
            var componentInfo = base.CreateComponentInfo(componentDescriptor);

            componentInfo.QualifiedNameOrClassId = componentDescriptor.AssemblyQualifiedName;
            return(componentInfo);
        }
        public virtual void VisitComponent(IPipelineComponentDescriptor componentDescriptor)
        {
            if (componentDescriptor == null)
            {
                throw new ArgumentNullException(nameof(componentDescriptor));
            }
            var componentInfo = CreateComponentInfo(componentDescriptor);

            _stageDocument.Components.Add(componentInfo);
        }
        protected override ComponentInfo CreateComponentInfo(IPipelineComponentDescriptor componentDescriptor)
        {
            // save overridden component's default property values as set by the pipeline *binding*
            componentDescriptor.Save(componentDescriptor.Properties, false, false);
            var componentBinding = new ComponentBinding {
                QualifiedNameOrClassId = componentDescriptor.FullName,
                Properties             = (PropertyBag)componentDescriptor.Properties
            };

            return(componentBinding);
        }
        protected override ComponentInfo CreateComponentInfo(IPipelineComponentDescriptor componentDescriptor)
        {
            var componentInfo = new ComponentInfo {
                QualifiedNameOrClassId = componentDescriptor.FullName,
                ComponentName          = componentDescriptor.Name,
                Description            = componentDescriptor.Description,
                Version           = componentDescriptor.Version,
                CachedDisplayName = componentDescriptor.Name,
                CachedIsManaged   = true
            };

            componentDescriptor.PropertyContents.ForEach(property => componentInfo.ComponentProperties.Add(property));
            return(componentInfo);
        }
示例#5
0
        protected virtual ComponentInfo CreateComponentInfo(IPipelineComponentDescriptor componentDescriptor)
        {
            var componentInfo = new ComponentInfo {
                QualifiedNameOrClassId = componentDescriptor.FullName,
                ComponentName          = componentDescriptor.Name,
                Description            = componentDescriptor.Description,
                Version           = componentDescriptor.Version,
                CachedDisplayName = componentDescriptor.Name,
                CachedIsManaged   = true
            };
            var bag = new PropertyBag();

            componentDescriptor.Save(bag, false, false);
            bag.Properties.Cast <PropertyContents>().Each(property => componentInfo.ComponentProperties.Add(property));
            return(componentInfo);
        }
示例#6
0
 public new ComponentInfo CreateComponentInfo(IPipelineComponentDescriptor componentDescriptor)
 {
     return(base.CreateComponentInfo(componentDescriptor));
 }
示例#7
0
        public void VisitComponent(IPipelineComponentDescriptor componentDescriptor)
        {
            var componentInfo = CreateComponentInfo(componentDescriptor);

            _stageDocument.Components.Add(componentInfo);
        }
 protected abstract ComponentInfo CreateComponentInfo(IPipelineComponentDescriptor componentDescriptor);
示例#9
0
        public static CodeVariableDeclarationStatement DeclareComponent(this CodeConstructor constructor, IPipelineComponentDescriptor component, string variableName)
        {
            var declarationStatement = new CodeVariableDeclarationStatement(
                typeof(IBaseComponent),
                variableName,
                new CodeMethodInvokeExpression(
                    new CodeTypeReferenceExpression(typeof(PipelineManager)),
                    nameof(PipelineManager.CreateComponent),
                    new CodeSnippetExpression($"\"{component.AssemblyQualifiedName}\"")));

            constructor.Statements.Add(declarationStatement);
            return(declarationStatement);
        }