Exemplo n.º 1
0
 /// <summary>
 /// </summary>
 /// <param name="raw"> </param>
 public ChatEntry(byte[] raw)
 {
     Bytes = raw;
     Raw = Encoding.UTF8.GetString(raw.ToArray());
     var cut = (Raw.Substring(13, 1) == ":") ? 14 : 13;
     var cleaner = new ChatCleaner(raw, CultureInfo.CurrentUICulture, out JP);
     var cleaned = cleaner.Result;
     Line = XmlHelper.SanitizeXmlString(cleaned.Substring(cut));
     Code = Raw.Substring(8, 4);
     Combined = String.Format("{0}:{1}", Code, Line);
     TimeStamp = UnixTimeStampToDateTime(Int32.Parse(Raw.Substring(0, 8), NumberStyles.HexNumber));
 }
Exemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="raw"> </param>
        public ChatEntry(byte[] raw)
        {
            Bytes = raw;
            Raw   = Encoding.UTF8.GetString(raw.ToArray());
            var cut     = (Raw.Substring(13, 1) == ":") ? 14 : 13;
            var cleaner = new ChatCleaner(raw, CultureInfo.CurrentUICulture, out JP);
            var cleaned = cleaner.Result;

            Line      = XmlHelper.SanitizeXmlString(cleaned.Substring(cut));
            Code      = Raw.Substring(8, 4);
            Combined  = String.Format("{0}:{1}", Code, Line);
            TimeStamp = UnixTimeStampToDateTime(Int32.Parse(Raw.Substring(0, 8), NumberStyles.HexNumber));
        }