Esempio n. 1
0
 public TemplateViewModel GetTemplate(string name, string templateFolder)
 {
     V_0 = (new DirectoryInfo(templateFolder)).GetFiles(name).FirstOrDefault <FileInfo>();
     V_1 = null;
     if (V_0 != null)
     {
         V_2 = V_0.OpenText();
         try
         {
             stackVariable11 = new TemplateViewModel();
             stackVariable11.set_FileFolder(templateFolder);
             stackVariable11.set_Filename(V_0.get_Name());
             stackVariable11.set_Extension(V_0.get_Extension());
             stackVariable11.set_Content(V_2.ReadToEnd());
             V_1 = stackVariable11;
         }
         finally
         {
             if (V_2 != null)
             {
                 ((IDisposable)V_2).Dispose();
             }
         }
     }
     stackVariable7 = V_1;
     if (stackVariable7 == null)
     {
         dummyVar0      = stackVariable7;
         stackVariable7 = new TemplateViewModel();
         stackVariable7.set_FileFolder(templateFolder);
     }
     return(stackVariable7);
 }