public T EnumU32 <T>(string name, T value) where T : unmanaged, Enum
 {
     _bw.Write(SerdesUtil.EnumToUInt(value));
     _offset += 4L;
     DebugCheck();
     return(value);
 }
Example #2
0
        public T EnumU32 <T>(string name, T value) where T : unmanaged, Enum
        {
            var offset = LocalOffset;

            value = _s.EnumU32(name, value);
            var label     = Enum.GetName(typeof(T), value);
            var uintValue = SerdesUtil.EnumToUInt(value);

            DoIndent();
            _tw.WriteLine("{0:X} {1} = {2} (0x{2:X} u) // {3}", offset, name, uintValue, label);
            return(value);
        }