Beispiel #1
0
 internal static MsgPackMeta.PackDef GetTypeDescriptor(MsgPackTypeId typeId)
 {
     MsgPackMeta.PackDef def;
     if (MsgPackMeta.FromTypeId(typeId, out def))
     {
         return(def);
     }
     return(new MsgPackMeta.PackDef(typeId, string.Concat("Undefined (0x", ((int)typeId).ToString("X"), ")"),
                                    "This value is either invalid or new to the specification since the implementation of this library. Check the specification and check for updates if the value is defined."));
 }
Beispiel #2
0
 public static string GetOfficialTypeName(MsgPackTypeId typeId)
 {
     MsgPackMeta.PackDef def;
     if (MsgPackMeta.FromTypeId(typeId, out def))
     {
         return(def.OfficialName);
     }
     //if(typeId == MsgPackTypeId.NeverUsed) return "[\"Officially never used\"] (0xC1)";
     return(string.Concat("Undefined (0x", ((int)typeId).ToString("X"), ")"));
 }