Exemple #1
0
 public void Save()
 {
     foreach (var element in m_files)
     {
         string   path = Path.Combine(m_directory, element.Key);
         MathFile file = element.Value;
         file.Save(path);
     }
 }
Exemple #2
0
        private T File <T>(string name, string extenstion) where T : MathFile, new()
        {
            if (string.IsNullOrEmpty(m_directory))
            {
                throw new InvalidOperationException("Output directory is not initialized");
            }
            string   fullName = name + extenstion;
            MathFile file     = null;

            if (!m_files.TryGetValue(fullName, out file))
            {
                file = new T();
                m_files[fullName] = file;
            }
            T result = (T)file;

            return(result);
        }