private static object ReadPropValue(BinaryReader reader, PropType type, uint len)
 {
     if (type <= PropType.Binary)
     {
         if (type == PropType.Int)
         {
             return(ExternalUserCollection.ReadInt(reader, len));
         }
         if (type == PropType.String)
         {
             return(ExternalUserCollection.ReadString(reader, len));
         }
         if (type == PropType.Binary)
         {
             return(ExternalUserCollection.ReadBytes(reader, len));
         }
     }
     else
     {
         if (type == PropType.IntArray)
         {
             return(ExternalUserCollection.ReadArrayValue <int>(reader, len, new ExternalUserCollection.ReadValue <int>(ExternalUserCollection.ReadInt)));
         }
         if (type == PropType.StringArray)
         {
             return(ExternalUserCollection.ReadArrayValue <string>(reader, len, new ExternalUserCollection.ReadValue <string>(ExternalUserCollection.ReadString)));
         }
         if (type == PropType.BinaryArray)
         {
             return(ExternalUserCollection.ReadArrayValue <byte[]>(reader, len, new ExternalUserCollection.ReadValue <byte[]>(ExternalUserCollection.ReadBytes)));
         }
     }
     return(null);
 }
        private static string ReadString(BinaryReader reader, uint len)
        {
            string text  = new string(Encoding.Unicode.GetChars(ExternalUserCollection.ReadBytes(reader, len)));
            string text2 = text;

            char[] trimChars = new char[1];
            return(text2.TrimEnd(trimChars));
        }