示例#1
0
 PrintContext PrintContextFactory(SpecContext ctx, CalledMethodInfo cmi)
 {
     return(printCtxFac.Create(cmi,
                               ctx.NameEnumeratorFor,
                               new PrintFormattingImpl(SpaceIndentation),
                               new PrintNamingImpl(ctx.SubjectName, SerializerName)));
 }
 PrintContext PrintContextFactory.Create(CalledMethodInfo info,
                                         NameEnumeratorFactory nameEnumeratorFac,
                                         PrintFormatting formatting,
                                         PrintNaming naming) {
   return new PrintContextImpl(
     nameEnumeratorFac, new StringBuilder(),
     info, variableFormatter, formatters, naming.SubjectName,
     naming.SerializerName, formatting.SpaceIndentation,
     null);
 }
 PrintContext PrintContextFactory.Create(CalledMethodInfo info,
                                         NameEnumeratorFactory nameEnumeratorFac,
                                         PrintFormatting formatting,
                                         PrintNaming naming)
 {
     return(new PrintContextImpl(
                nameEnumeratorFac, new StringBuilder(),
                info, variableFormatter, formatters, naming.SubjectName,
                naming.SerializerName, formatting.SpaceIndentation,
                null));
 }
    public PrintContextImpl(NameEnumeratorFactory nameEnumeratorFac, StringBuilder builder, CalledMethodInfo info, VariableFormatter variableFormatter, IEnumerable<Formatter> customFormatters, string subjectName, string serializerVarName, int spaceIndentation, string[] writtenVars) {
      if (nameEnumeratorFac == null) throw new ArgumentNullException("nameEnumeratorFac");

      SpaceIndentation = spaceIndentation;
      Builder = builder;
      Info = info;
      SubjectName = subjectName;
      VariableFormatter = variableFormatter;
      WrittenVars = writtenVars;
      this.customFormatters = new LinkedList<Formatter>(customFormatters);
      SerializerName = serializerVarName;
      this.nameEnumeratorFac = nameEnumeratorFac;
    }
示例#5
0
        public PrintContextImpl(NameEnumeratorFactory nameEnumeratorFac, StringBuilder builder, CalledMethodInfo info, VariableFormatter variableFormatter, IEnumerable <Formatter> customFormatters, string subjectName, string serializerVarName, int spaceIndentation, string[] writtenVars)
        {
            if (nameEnumeratorFac == null)
            {
                throw new ArgumentNullException("nameEnumeratorFac");
            }

            SpaceIndentation       = spaceIndentation;
            Builder                = builder;
            Info                   = info;
            SubjectName            = subjectName;
            VariableFormatter      = variableFormatter;
            WrittenVars            = writtenVars;
            this.customFormatters  = new LinkedList <Formatter>(customFormatters);
            SerializerName         = serializerVarName;
            this.nameEnumeratorFac = nameEnumeratorFac;
        }
示例#6
0
 void RecordDataKeeper.AddCall(CalledMethodInfo info)
 {
     Write(() => calledMethods.AddLast(info));
 }