Esempio n. 1
0
        public static void SetOutputVariable(string name, string value, VariableDictionary variables)
        {
            Guard.NotNull(name, "name can not be null");
            Guard.NotNull(value, "value can not be null");

            Info($"##octopus[setVariable name=\"{ConvertServiceMessageValue(name)}\" value=\"{ConvertServiceMessageValue(value)}\"]");

            variables?.SetOutputVariable(name, value);
        }
Esempio n. 2
0
        public static void SetOutputVariable(string name, string value, VariableDictionary variables)
        {
            Info(String.Format("##octopus[setVariable name=\"{0}\" value=\"{1}\"]",
                ConvertServiceMessageValue(name),
                ConvertServiceMessageValue(value)));

            if (variables != null)
                variables.SetOutputVariable(name, value);
        }
Esempio n. 3
0
        public static void SetOutputVariable(string name, string value, VariableDictionary variables, bool isSensitive = false)
        {
            Guard.NotNull(name, "name can not be null");
            Guard.NotNull(value, "value can not be null");

            Info(isSensitive
                ? $"##octopus[setVariable name=\"{ConvertServiceMessageValue(name)}\" value=\"{ConvertServiceMessageValue(value)}\" sensitive=\"{ConvertServiceMessageValue(Boolean.TrueString)}\"]"
                : $"##octopus[setVariable name=\"{ConvertServiceMessageValue(name)}\" value=\"{ConvertServiceMessageValue(value)}\"]");

            variables?.SetOutputVariable(name, value);
        }
        private void ProcessServiceMessage(ServiceMessage message)
        {
            switch (message.Name)
            {
            case ServiceMessageNames.SetVariable.Name:
                var variableName  = message.GetValue(ServiceMessageNames.SetVariable.NameAttribute);
                var variableValue = message.GetValue(ServiceMessageNames.SetVariable.ValueAttribute);

                if (!string.IsNullOrWhiteSpace(variableName))
                {
                    variables.SetOutputVariable(variableName, variableValue);
                }
                break;
            }
        }
Esempio n. 5
0
        public static void SetOutputVariable(string name, string value, VariableDictionary variables)
        {
            Info($"##octopus[setVariable name=\"{ConvertServiceMessageValue(name)}\" value=\"{ConvertServiceMessageValue(value)}\"]");

            variables?.SetOutputVariable(name, value);
        }