예제 #1
0
        private static string GetVariableIdentifier(string variableName, bool strict, VariableType type)
        {
            if (variableName != null)
            {
                return(ContextVariable.Get(variableName, strict));
            }

            switch (type)
            {
            case VariableType.Request:
                return(ContextRequest.GetBody(true));

            case VariableType.Response:
                return(ContextResponse.Get(true));

            case VariableType.Undefined:
            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
예제 #2
0
 private static string GetIsNullOrEmptyCommand(string variableName, bool strict)
 {
     return($"(string.IsNullOrEmpty{ContextVariable.GetAsString(variableName, strict, true)})");
 }