PurplePen.EventDB.Load C# (CSharp) Method

Load() public method

Load the entire state of the event DB from a file.
public Load ( string filename ) : void
filename string
return void
        public void Load(string filename)
        {
            using (XmlInput xmlinput = new XmlInput(filename)) {
                xmlinput.CheckElement(rootElement);
                xmlinput.Read();

                eventStore.Load(xmlinput);
                controlPointStore.Load(xmlinput);
                courseStore.Load(xmlinput);
                courseControlStore.Load(xmlinput);
                legStore.Load(xmlinput);
                specialStore.Load(xmlinput);

                // Fix backward compatibility issues.
                FixCourseSortOrders();
                FixControlPointGaps();
                FixPrintAreas();
            }
        }