Represents a sorted list of abbreviation objects. The list of abbreviations is created by parsing the xml file that has a list of all the abbreviations.
Inheritance: IDisposable
Ejemplo n.º 1
0
        /// <summary>
        /// Loads abbreviations from the abbreviations file
        /// </summary>
        /// <returns></returns>
        public bool Init(String abbreviationsFile = null)
        {
            if (Abbreviations != null)
            {
                Abbreviations.Dispose();
            }

            Abbreviations = new Abbreviations();

            return(Abbreviations.Load(abbreviationsFile));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Disposer. Release resources and cleanup.
        /// </summary>
        /// <param name="disposing">true to dispose managed resources</param>
        protected virtual void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!_disposed)
            {
                Log.Debug();

                if (disposing)
                {
                    Context.EvtCultureChanged -= Context_EvtCultureChanged;

                    if (Abbreviations != null)
                    {
                        Abbreviations.Dispose();
                        Abbreviations = null;
                    }
                }

                // Release unmanaged resources.
            }

            _disposed = true;
        }
Ejemplo n.º 3
0
Archivo: Context.cs Proyecto: glwu/acat
        /// <summary>
        /// Creates the singleton instance of the Abbreviations manager
        /// </summary>
        /// <returns>true on success</returns>
        private static bool createAbbreviationsManager()
        {
            bool retVal = true;

            if (isEnabled(StartupFlags.Abbreviations))
            {
                AppAbbreviations = new Abbreviations();
                retVal = AppAbbreviations.Load();

                if (!retVal)
                {
                    setCompletionStatus("Abbreviations load error.  Abbreviations will be disabled", false);
                }
            }

            return retVal;
        }