mirror of
https://github.com/MistWeatherMedia/i2ME.git
synced 2026-11-28 14:20:00 -08:00
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Xml;
|
|
|
|
namespace TWC.I2.MsgEncode.ProcessingSteps
|
|
{
|
|
public class CheckStarFlagsMsgEncodeStep : IMsgEncodeStep
|
|
{
|
|
private const string TAG = "CheckStarFlags";
|
|
private IEnumerable<string> flags;
|
|
|
|
public CheckStarFlagsMsgEncodeStep(IEnumerable<string> flags)
|
|
{
|
|
this.flags = flags;
|
|
}
|
|
|
|
public CheckStarFlagsMsgEncodeStep(string flag)
|
|
{
|
|
this.flags = (IEnumerable<string>)new string[1]
|
|
{
|
|
flag
|
|
};
|
|
}
|
|
|
|
public string Tag
|
|
{
|
|
get
|
|
{
|
|
return "CheckStarFlags";
|
|
}
|
|
}
|
|
|
|
public string Encode(string payloadFile, XmlElement descriptor)
|
|
{
|
|
foreach (string flag in this.flags)
|
|
{
|
|
XmlElement element = descriptor.OwnerDocument.CreateElement("Flag");
|
|
element.InnerText = flag;
|
|
descriptor.AppendChild((XmlNode)element);
|
|
}
|
|
return payloadFile;
|
|
}
|
|
}
|
|
}
|