예제 #1
0
        public static void Decode(Object obj, Byte[] buff)
        {
            var t             = obj.GetType();
            var BitProperties = t.GetProperties()
                                .Select(pi => new { pi, a = PlacementAttribute.GetPlacementAttribute(pi) })
                                .Where(bp => bp.a != null);

            foreach (var bp in BitProperties)
            {
                bp.a.DecodeProperty(bp.pi, obj, buff);
            }
        }
예제 #2
0
 public static PlacementAttribute GetPlacementAttribute(PropertyInfo P)
 {
     return((PlacementAttribute)PlacementAttribute.GetCustomAttribute(P, typeof(PlacementAttribute)));
 }