예제 #1
0
 /// <exclude />
 public DataScope(CultureInfo cultureInfo)
 {
     if (cultureInfo != null)
     {
         LocalizationScopeManager.PushLocalizationScope(cultureInfo);
         _cultureInfoPushed = true;
     }
 }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dataScope"></param>
        /// <param name="cultureInfo">null for default culture</param>
        public DataScope(DataScopeIdentifier dataScope, CultureInfo cultureInfo)
        {
            DataScopeManager.PushDataScope(dataScope);
            _dataScopePushed = true;


            if (cultureInfo != null)
            {
                LocalizationScopeManager.PushLocalizationScope(cultureInfo);
                _cultureInfoPushed = true;
            }
            else if (LocalizationScopeManager.IsEmpty)
            {
                LocalizationScopeManager.PushLocalizationScope(DataLocalizationFacade.DefaultLocalizationCulture);
                _cultureInfoPushed = true;
            }
        }