Esempio n. 1
0
        public override DisplayContext GetContext(DisplayContextType type)
        {
            DisplayContext result;

            switch (type)
            {
            case DisplayContextType.DialectHandling:
                result = (dialectHandling == DialectHandling.STANDARD_NAMES) ? DisplayContext.StandardNames : DisplayContext.DialectNames;
                break;

            case DisplayContextType.Capitalization:
                result = capitalization;
                break;

            case DisplayContextType.DisplayLength:
                result = nameLength;
                break;

            case DisplayContextType.SubstituteHandling:
                result = substituteHandling;
                break;

            default:
                result = DisplayContext.StandardNames;     // hmm, we should do something else here
                break;
            }
            return(result);
        }
Esempio n. 2
0
            public override DisplayContext GetContext(DisplayContextType type)
            {
                DisplayContext result = DisplayContext.StandardNames;  // final fallback

                foreach (DisplayContext context in contexts)
                {
                    if (context.Type() == type)
                    {
                        result = context;
                        break;
                    }
                }
                return(result);
            }
Esempio n. 3
0
 public DisplayContextImpl(DisplayContextType type, int value)
 {
     this.type  = type;
     this.value = value;
 }
Esempio n. 4
0
 /// <summary>
 /// Returns the current value for a specified <see cref="DisplayContextType"/>.
 /// </summary>
 /// <param name="type">The <see cref="DisplayContextType"/> whose value to return.</param>
 /// <returns>The current DisplayContext setting for the specified type.</returns>
 /// <stable>ICU 51</stable>
 public abstract DisplayContext GetContext(DisplayContextType type);