Exemplo n.º 1
0
        /// <summary>
        /// Loads a TPL file.
        /// </summary>
        /// <param name="tplFile"></param>
        /// <returns></returns>
        public static TPL Load(byte[] tplFile)
        {
            TPL tmpTpl = new TPL();
            MemoryStream ms = new MemoryStream(tplFile);

            try { tmpTpl.parseTpl(ms); }
            catch { ms.Dispose(); throw; }

            ms.Dispose();
            return tmpTpl;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Loads a TPL file.
 /// </summary>
 /// <param name="tpl"></param>
 /// <returns></returns>
 public static TPL Load(Stream tpl)
 {
     TPL t = new TPL();
     t.parseTpl(tpl);
     return t;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Loads a TPL file.
        /// </summary>
        /// <param name="pathToTpl"></param>
        /// <returns></returns>
        public static TPL Load(string pathToTpl)
        {
            TPL tmpTpl = new TPL();

            MemoryStream ms = new MemoryStream(File.ReadAllBytes(pathToTpl));

            try { tmpTpl.parseTpl(ms); }
            catch { ms.Dispose(); throw; }

            ms.Dispose();
            return tmpTpl;
        }