/// <summary> /// Gets a <see cref="Func{IByteConverter}"/> factory for custom <see cref="IByteConverter"/>s conifgured in the App.Config. /// </summary> /// <param name="element">The <see cref="ConverterElement"/> from the App.Config.</param> /// <returns>A func for creating custom <see cref="IByteConverter"/> instances.</returns> public static Func<IByteConverter> GetConverter(ConverterElement element) { Assembly.GetExecutingAssembly(); var type = Type.GetType(element.Type, true); return () => (IByteConverter) Activator.CreateInstance(type); }
/// <summary> /// Gets a <see cref="Func{IByteConverter}"/> factory for custom <see cref="IByteConverter"/>s conifgured in the App.Config. /// </summary> /// <param name="element">The <see cref="ConverterElement"/> from the App.Config.</param> /// <returns>A func for creating custom <see cref="IByteConverter"/> instances.</returns> public static Func<IByteConverter> GetConverter(ConverterElement element) { return GetConverter(element.Type); }