public EnumTranslation<T>[] CreateEnumTranslation<T>() where T : struct, IConvertible { var type = typeof(T); if (_enumCache.ContainsKey(type)) return (EnumTranslation<T>[])_enumCache[type]; var translation = _baseTranslationFactory.CreateEnumTranslation<T>(); _enumCache[type] = translation; return translation; }
public ErrorCodeInterpreter(ITranslationFactory translationFactory) { _errorCodeTranslations = translationFactory.CreateEnumTranslation <ErrorCode>(); }