Canguro.Model.Section.SectionManager.LoadTxtCatalog C# (CSharp) Method

LoadTxtCatalog() private method

private LoadTxtCatalog ( Catalog
cat, string filePath ) : void
cat Catalog
filePath string
return void
        private void LoadTxtCatalog(Catalog<Section> cat, string filePath)
        {
            Stream stream = File.Open(filePath, FileMode.Open);
            StreamReader reader = new StreamReader(stream);
            Material.Material mat = Material.MaterialManager.Instance.DefaultSteel;
            ConcreteSectionProps csp = null;
            try
            {
                while (!reader.EndOfStream)
                {
                    string line = reader.ReadLine();
                    string[] arr = line.Split("\t".ToCharArray());
                    if (arr.Length == 23)
                    {
                        Section sec = NewSection(mat, csp, arr);
                        cat[sec.Name] = sec;
                    }
                }
            }
            finally
            {
                reader.Close();
                stream.Close();
            }
        }