31 lines
756 B
C#
31 lines
756 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace MesTools.ImsApi
|
|
{
|
|
public class FieldPrinter
|
|
{
|
|
public static bool INCLUDE_FIELD_NAMES = true;
|
|
public static bool FIELD_COUNTER = false;
|
|
|
|
public void print(String fieldName, StringBuilder stringBuffer)
|
|
{
|
|
if (INCLUDE_FIELD_NAMES && fieldName != null && fieldName.Length != 0)
|
|
{
|
|
stringBuffer.Append(fieldName).Append(":");
|
|
}
|
|
}
|
|
|
|
public void printCounter(int counter, StringBuilder stringBuffer)
|
|
{
|
|
if (FIELD_COUNTER)
|
|
{
|
|
stringBuffer.Append("#").Append(counter).Append(":");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|