Beispiel #1
0
        public override void Decode(byte[] data, IMessageConverter converter, Dictionary <string, object> packageInfo)
        {
            if (converter.CanConvert(typeof(T)))
            {
                if (!packageInfo.ContainsKey(Name))
                {
                    packageInfo.Add(Name, converter.GetValue <T>(data, Address));
                }
            }

            ///Todo: localized error text - what happend?
            else
            {
                throw new NotSupportedException();
            }
        }