Exemple #1
0
        internal static string BuildConcatenator(BuildContext buildContext, BuildArgs buildArgs, Variable variable)
        {
            if (buildContext.Current.IsQuery)
            {
                // not allowed in writable methods where direct values are used
                if (buildContext.Current is IWritable)
                {
                    buildContext.Current.Throw(QueryTalkExceptionType.ConcatenatorDisallowed,
                                               String.Format("concatenator = {0}", variable.Name), Text.Method.Collect);
                    return(null);
                }

                var concatenator = new Concatenator(variable);
                return(concatenator.Build(buildContext, buildArgs));
            }
            else
            {
                buildContext.Current.Throw(QueryTalkExceptionType.ConcatenatorDisallowed,
                                           String.Format("concatenator = {0}", variable.Name));
                return(null);
            }
        }
Exemple #2
0
        internal string BuildConcatenator(BuildContext buildContext, BuildArgs buildArgs, Concatenator arg)
        {
            IsConcat = true;

            if (this is Argument)
            {
                buildContext.Current.IsConcat = true;
            }

            return(arg.Build(buildContext, buildArgs));
        }
Exemple #3
0
 /// <summary>
 /// Sets the argument's type.
 /// </summary>
 /// <param name="arg">Is an argument.</param>
 protected internal void SetArgType(Concatenator arg)
 {
     ArgType = typeof(Concatenator);
     SetDebugValue(arg, DebugSetter.None);
 }