public TestThread(string name, ICUService service, long delay) { //this.name = name + " "; this.service = service; this.delay = delay; this.IsBackground = (true); }
/** * Convenience override of getDisplayNames(UCultureInfo, Comparer, string) that * uses the default collator for the locale as the comparator to * sort the display names. */ public IDictionary <string, string> GetDisplayNames(ICUService service, UCultureInfo locale, string matchID) { //Collator col = Collator.getInstance(locale.toLocale()); CompareInfo col = CompareInfo.GetCompareInfo(locale.ToCultureInfo().Name); return(service.GetDisplayNames(locale, col, matchID)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) that /// uses the default collator for the locale as the comparator to sort the /// display names. /// </summary> /// public SortedList GetDisplayNames(ICUService service, ULocale locale, String matchID) { Collator col = IBM.ICU.Text.Collator.GetInstance(locale); return(service.GetDisplayNames(locale, col, matchID)); }
/** * Convenience override of getDisplayNames(ULocale, Comparator, string) that * uses the default collator for the locale as the comparator to * sort the display names, and null for the matchID. */ public static IDictionary <string, string> GetDisplayNames(ICUService service, ULocale locale) { //Collator col; //try //{ // col = Collator.getInstance(locale.ToLocale()); //} //catch (MissingResourceException e) //{ // // if no collator resources, we can't collate // col = null; //} CompareInfo col; try { col = CompareInfo.GetCompareInfo(locale.ToLocale().ToString()); } catch (MissingManifestResourceException e) { // if no collator resources, we can't collate col = null; } return(service.GetDisplayNames(locale, col, null)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) that /// uses the current default ULocale as the locale, the default collator for /// the locale as the comparator to sort the display names, and null for the /// matchID. /// </summary> /// public SortedList GetDisplayNames(ICUService service) { ULocale locale = IBM.ICU.Util.ULocale.GetDefault(); Collator col = IBM.ICU.Text.Collator.GetInstance(locale); return(service.GetDisplayNames(locale, col, null)); }
public TestThread(string name, ICUService service, long delay) { //this.name = name + " "; this.service = service; this.delay = delay; this.SetDaemon(true); }
/** * Convenience override of getDisplayNames(ULocale, Comparator, string) that * uses the default collator for the locale as the comparator to * sort the display names, and null for the matchID. */ public SortedDictionary <string, string> GetDisplayNames(ICUService service, ULocale locale) { //Collator col = Collator.getInstance(locale.toLocale()); CompareInfo col = CompareInfo.GetCompareInfo(locale.ToLocale().Name); return(service.GetDisplayNames(locale, col, null)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) /// that uses the default collator for the locale as the comparator to /// sort the display names, and null for the matchID. /// </summary> /// public static SortedList GetDisplayNames(ICUService service, ULocale locale) { Collator col = IBM.ICU.Text.Collator.GetInstance(locale); return(service.GetDisplayNames(locale, col, null)); }
internal UnregisterFactoryThread(string name, ICUService service, long delay) : base("UNREG " + name, service, delay) { r = new Random(); factories = service.Factories(); }
/** * Convenience override of getDisplayNames(UCultureInfo, Comparator, string) that * uses the current default UCultureInfo as the locale, the default collator for * the locale as the comparator to sort the display names, and null for * the matchID. */ public IDictionary <string, string> GetDisplayNames(ICUService service) { UCultureInfo locale = UCultureInfo.CurrentCulture; //Collator col = Collator.getInstance(locale.toLocale()); CompareInfo col = CompareInfo.GetCompareInfo(locale.ToCultureInfo().Name); return(service.GetDisplayNames(locale, col, null)); }
public virtual Object Create(IBM.ICU.Impl.ICUService.Key key, ICUService serviceArg) { if (key.CurrentID().Equals(greetingID)) { Object previous = serviceArg.GetKey(key, null, this); return("A different greeting: \"" + previous + "\""); } return(null); }
public TestThread(String name, ICUService service_0, long delay_1, TestLog log_2) { // this.name = name + " "; this.service = service_0; this.delay = delay_1; this.log = new AbstractTestLog.DelegatingLog(log_2); this.IsDaemon = true; }
internal void RegisterFactories(ICUService service_0, ICollection c) { IIterator iter = new ILOG.J2CsMapping.Collections.IteratorAdapter(c.GetEnumerator()); while (iter.HasNext()) { service_0.RegisterFactory((IBM.ICU.Impl.ICUService.Factory)iter.Next()); } }
public void ServiceChanged(ICUService s) { outer_ICUServiceTest.Logln("listener 3 report " + n++ + " service changed..."); if (s.Get("en_BOINK") == null) { // don't recurse on // ourselves!!! outer_ICUServiceTest.Logln("registering boink..."); s.RegisterObject("boink", "en_BOINK"); } }
public static void InitRegistry() { registry = new IBM.ICU.Charset.ICUServiceTestSample.HelloService.Anonymous_C0(); // initialize DoRegister("Hello", "en"); DoRegister("Bonjour", "fr"); DoRegister("Ni Hao", "zh_CN"); DoRegister("Guten Tag", "de"); }
internal void RegisterFactories(ICUService service, ICollection <IServiceFactory> c) { using (var iter = c.GetEnumerator()) { while (iter.MoveNext()) { service.RegisterFactory((IServiceFactory)iter.Current); } } }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) that /// uses the default collator for the locale as the comparator to sort the /// display names, and null for the matchID. /// </summary> /// public static SortedList GetDisplayNames(ICUService service, ULocale locale) { Collator col; try { col = IBM.ICU.Text.Collator.GetInstance(locale); } catch (MissingManifestResourceException e) { // if no collator resources, we can't collate col = null; } return(service.GetDisplayNames(locale, col, null)); }
public override object Create(ICUServiceKey key, ICUService srvc) { if (!HandlesKey(key) || !(key is LocaleKey)) { return(null); } LocaleKey lkey = (LocaleKey)key; object result = @delegate.CreateFormat(lkey.GetCanonicalCulture(), lkey.Kind); if (result == null) { result = srvc.GetKey(key, this); } return(result); }
protected override object HandleCreate(UCultureInfo loc, int kind, ICUService service) { return(factoryID + loc.ToString()); }
public virtual void ServiceChanged(ICUService service) { serviceChanged(service, this); }
public object Create(ICUServiceKey key, ICUService service) { return(create != null?create(key, service) : new UCultureInfo(key.CurrentID)); }
internal GetListThread(string name, ICUService service, long delay, string[] list) : base("GETL " + name, service, delay) { this.list = list; }
internal GetThread(string name, ICUService service, long delay) : base("GET " + name, service, delay) { actualID = new string[1]; }
internal GetDisplayThread(string name, ICUService service, long delay, ULocale locale) : base("DIS " + name, service, delay) { this.locale = locale; }