Inference/src/DynVarManagement/DynVarManager.cs
/// <summary>
/// Attemps to load the specified ".dyn" file.
/// If the file does not exist or an exception is thrown, a new file is created in its place.
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
Attemps to load the specified ".dyn" file.
If the file does not exist or an exception is thrown, a new file is created in its place.
Attemps to load the specified " . dyn " file . If the file does not exist or an exception is thrown a new file is created in its place .
public bool LoadOrCreate(string fileName) {
            this.fileName = fileName;
            document = new XmlDocument();
            try {
                document.Load(fileName);
                this.ready = true;
                return true;
            } catch (Exception) {
                XmlElement el = document.CreateElement(ApplicationTag);
                el.SetAttribute(NameAtt, Path.GetFileNameWithoutExtension(fileName));
                document.AppendChild(el);
                this.ready = true;
                return false;
            }
        }
public bool LoadOrCreate ( string fileName ) { this . fileName = fileName ; document = new XmlDocument ( ) ; try { document . Load ( fileName ) ; this . ready = true ; return true ; } catch ( Exception ) { XmlElement el = document . CreateElement ( ApplicationTag ) ; el . SetAttribute ( NameAtt , Path . GetFileNameWithoutExtension ( fileName ) ) ; document . AppendChild ( el ) ; this . ready = true ; return false ; } }
Attemps to load the specified ".dyn" file.
Attemps to load the specified " . dyn " file .
//Compatibility: //Compatibility:
None
fileName
string
None