private string GetServiceName(IMacroParameterValueNew interfaceName)
        {
            string iName    = interfaceName.GetValue();
            string baseName = iName.Substring(1, iName.Length - 1);

            return("LS" + baseName + "();");
        }
示例#2
0
        public static Transform GetTransformValueFromArgument(IMacroParameterValueNew arg)
        {
            string value = null;

            if (arg != null)
            {
                value = arg.GetValue();
            }

            return(GetTransformValueFromValue(value));
        }
        public AddPreSufFixVariableMacroImplementation([Optional] MacroParameterValueCollection arguments)
        {
            if (arguments == null || arguments.Count != 4)
            {
                return;
            }

            _variableParameter = arguments[0];
            _prefix            = ProcessHelper.GetRealValueOrNull(arguments[1]);
            _suffix            = ProcessHelper.GetRealValueOrNull(arguments[2]);
            _transform         = ProcessHelper.GetTransformValueFromArgument(arguments[3]);
        }
示例#4
0
        public GeneralFunctionVariableMacroImplementation([Optional] MacroParameterValueCollection arguments)
        {
            if (arguments == null || arguments.Count != 2)
            {
                _functionToRun = NoTransform;
                return;
            }

            _variableParameter = arguments[0];

            _functionToRun = CreateFunctionBasedOn(ProcessHelper.GetRealValueOrNull(arguments[1]));
        }
示例#5
0
 public ReplaceFromOtherValueMacroImpl([Optional] MacroParameterValueCollection arguments)
 {
     _variableArgument    = arguments.OptionalFirstOrDefault();
     _regexArgument       = arguments == null || arguments.Count < 2 ? null : arguments[1];
     _replacementArgument = arguments == null || arguments.Count < 3 ? null : arguments[2];
 }
 public GetBranchNameMacroImplementation(GitRepositoryProvider gitRepositoryProvider, MacroParameterValueCollection parameters = null)
 {
     _gitRepositoryProvider  = gitRepositoryProvider;
     _stripingRegexParameter = parameters.OptionalFirstOrDefault();
 }
 public ServiceNameFromInterfaceImpl([Optional] MacroParameterValueCollection args)
 {
     _interfaceName = args?.ElementAt(0);
 }
示例#8
0
        public static string GetRealValueOrNull(IMacroParameterValueNew argument)
        {
            var value = argument.GetValue();

            return(value.IsEmpty() ? null : value);
        }
示例#9
0
        public static string ProcessVariable(IMacroParameterValueNew variableParameter, Transform transform)
        {
            var value = variableParameter.GetValue();

            return(ProcessValue(transform, value));
        }
示例#10
0
 public PrivateVariableMacroImplementation([Optional] MacroParameterValueCollection parameters)
 {
     _variableParameter = parameters.OptionalFirstOrDefault();
 }