Пример #1
0
        public static string ToWikiString(Wiki item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("Wiki");
            }

            try
            {
                using (Stream stream = OutoposConverter.ToStream <Wiki>(item))
                {
                    return("Wiki:" + OutoposConverter.ToBase64String(stream));
                }
            }
            catch (Exception)
            {
                throw new FormatException();
            }
        }
Пример #2
0
        public static string ToChatString(Chat item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("Chat");
            }

            try
            {
                using (Stream stream = OutoposConverter.ToStream <Chat>(item))
                {
                    return("Chat:" + OutoposConverter.ToBase64String(stream));
                }
            }
            catch (Exception)
            {
                throw new FormatException();
            }
        }
Пример #3
0
        public static string ToNodeString(Node item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            try
            {
                using (Stream stream = OutoposConverter.ToStream <Node>(item))
                {
                    return("Node:" + OutoposConverter.ToBase64String(stream));
                }
            }
            catch (Exception)
            {
                throw new FormatException();
            }
        }