Exemplo n.º 1
0
        /*
         * MetafileToString
         */

        /// <summary>
        /// </summary>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="metafileToConvert"/> is <see langword="null"/>.
        /// </exception>
        public static string MetafileToString(Metafile metafileToConvert)
        {
            if (metafileToConvert == null)
            {
                throw new ArgumentNullException("metafileToConvert");
            }

            byte[] buffer = NuGenMetafileConverter.MetafileToBytes(metafileToConvert);
            return(Convert.ToBase64String(buffer));
        }
Exemplo n.º 2
0
        /*
         * StringToMetafile
         */

        /// <summary>
        /// </summary>
        /// <exception cref="ArgumentNullException">
        ///	<paramref name="stringToConstructMetafileFrom"/> is <see langword="null"/>.
        ///	</exception>
        public static Metafile StringToMetafile(string stringToConstructMetafileFrom)
        {
            if (stringToConstructMetafileFrom == null)
            {
                throw new ArgumentNullException("stringToConstructMetafileFrom");
            }

            byte[] buffer = Convert.FromBase64String(stringToConstructMetafileFrom);
            return(NuGenMetafileConverter.BytesToMetafile(buffer));
        }