initialize
This commit is contained in:
30
interface/asm/dotnet/MesTools/ImsApi/FieldPrinter.cs
Normal file
30
interface/asm/dotnet/MesTools/ImsApi/FieldPrinter.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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(":");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user