private Dictionary GenDictionary(byte[] inMsg)
{
Dictionary dictionary = new Dictionary();
string arg= Encoding.Default.GetString(inMsg);
char[] trimChars = new char[1];
string text = arg.TrimEnd(trimChars);
string[] array = text.Split(new char[]
{
';'
});
for (int i = 0; i < array.Length; i++)
{
string text2 = array[i];
if (!string.IsNullOrEmpty(text2) && !dictionary.ContainsKey(text2.Split(new char[]
{
':'
})[0]))
{
dictionary.Add(text2.Split(new char[]
{
':'
})[0], text2.Replace(text2.Split(new char[]
{
':'
})[0] + ":", ""));
}
}
return dictionary;
}