public string GetValue() { var defaultLocalization = new TDefaultLocalization(); var format = _propertyExpression == null ? _propertyFunc(defaultLocalization) : (_propertyExpression.Compile())(defaultLocalization); return(_formatProvider == null ? LocalizationServices.Format <TLocalization>(format, _args) : LocalizationServices.Format <TLocalization>(format, _formatProvider, _args)); }
public string GetValue() { var defaultLocalization = _typeResolver.Resolve <TLocalization, TDefaultLocalization>(); if (defaultLocalization == null) { throw new InvalidOperationException(); } var format = _propertyExpression == null ? _propertyFunc(defaultLocalization) : (_propertyExpression.Compile())(defaultLocalization); return(_formatProvider == null ? LocalizationServices.Format <TLocalization>(format, _args) : LocalizationServices.Format <TLocalization>(format, _formatProvider, _args)); }