ChangePreferredLocales() public method

Updates the preferred locales used for the session.
public ChangePreferredLocales ( StringCollection preferredLocales ) : void
preferredLocales StringCollection The preferred locales.
return void
コード例 #1
0
ファイル: ComAeProxy.cs プロジェクト: yuriik83/UA-.NET
        /// <summary>
        /// Update locale ID for the session.
        /// </summary>
        private void UpdateLocale(Session session, string locale)
        {
            if (session == null) throw ComUtils.CreateComException(ResultIds.E_FAIL);

            try
            {
                StringCollection preferredLocales = new StringCollection();
                preferredLocales.Add(locale);
                session.ChangePreferredLocales(preferredLocales);
            }
            catch (Exception e)
            {
                Utils.Trace(e, "Unexpected error in UpdateLocale");
                throw ComUtils.CreateComException(e);
            }
        }