Ejemplo n.º 1
0
        // ------------------------------------------------------------------
        // Ensures the hyphenator object is created
        // ------------------------------------------------------------------
        private NaturalLanguageHyphenator EnsureHyphenator()
        {
            if (CheckFlags(Flags.IsHyphenatorSet))
            {
                return HyphenatorField.GetValue(this);
            }

            // initialize hyphenator
            NaturalLanguageHyphenator hyphenator = new NaturalLanguageHyphenator();

            HyphenatorField.SetValue(this, hyphenator);
            SetFlags(true, Flags.IsHyphenatorSet);
            return hyphenator;
        }
Ejemplo n.º 2
0
        // -----------------------------------------------------------------
        // 
        //  Private Methods 
        //
        // ------------------------------------------------------------------ 

        #region Private Methods

        /// <summary> 
        /// Ensures the hyphenator exists.
        /// </summary> 
        private void EnsureHyphenator() 
        {
            if (_hyphenator == null) 
            {
                _hyphenator = new NaturalLanguageHyphenator();
            }
        }