IEnumerable <Proxy> GenerateCommandProxy(Type artifact, ArtifactsConfiguration artifactsConfig, BuildTaskConfiguration configuration, Func <object, string> template)
        {
            _buildMessages.Trace($"Creating command proxy for {ClrType.FromType(artifact).TypeString}");

            var artifactId        = GetArtifactId(artifact, artifactsConfig);
            var handlebarsCommand = new HandlebarsCommand()
            {
                CommandName = artifact.Name,
                ArtifactId  = artifactId.Value.ToString()
            };
            var setableProperties = artifact.GetSettableProperties();

            if (setableProperties.Length > 0)
            {
                handlebarsCommand.Properties = CreateProxyProperties(setableProperties);
            }

            var proxies = new List <Proxy>();

            foreach (var path in configuration.ProxiesBasePath)
            {
                proxies.Add(CreateProxy(artifact, template(handlebarsCommand), configuration, path));
            }

            return(proxies);
        }
Esempio n. 2
0
        Proxy GenerateCommandProxy(Type artifact, ArtifactsConfiguration artifactsConfig, BuildTaskConfiguration configuration, Func <object, string> template)
        {
            _buildMessages.Trace($"Creating command proxy for {ClrType.FromType(artifact).TypeString}");

            var artifactId        = GetArtifactId(artifact, artifactsConfig);
            var handlebarsCommand = new HandlebarsCommand()
            {
                CommandName = artifact.Name,
                ArtifactId  = artifactId.Value.ToString()
            };
            var setableProperties = artifact.GetSettableProperties();

            if (setableProperties.Any())
            {
                handlebarsCommand.Properties = CreateProxyProperties(setableProperties);
            }

            return(CreateProxy(artifact, template(handlebarsCommand), configuration));
        }
Esempio n. 3
0
        Proxy GenerateCommandProxy(Type artifact, ArtifactsConfiguration artifactsConfig, ArgumentsParsingResult parsingResults, Func <object, string> template)
        {
            _logger.Trace($"Creating command proxy for {ClrType.FromType(artifact).TypeString}");

            var artifactId        = GetArtifactId(artifact, artifactsConfig);
            var handlebarsCommand = new HandlebarsCommand()
            {
                CommandName = artifact.Name,
                ArtifactId  = artifactId.Value.ToString()
            };
            var setableProperties = artifact.GetSettableProperties();

            if (setableProperties.Any())
            {
                handlebarsCommand.Properties = CreateProxyProperties(setableProperties);
            }

            return(CreateProxy(artifact, template(handlebarsCommand), parsingResults));
        }