.NET Portable TypeCast  3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
Converter_2T.cs
Go to the documentation of this file.
1 // <copyright file=mitlicense.md url=http://lsauer.mit-license.org/ >
2 // Lo Sauer, 2013-2016
3 // </copyright>
4 // <summary> A tested, generic, portable, runtime-extensible type converter library </summary
5 // <language> C# > 6.0 </language>
6 // <version> 3.1.0.2 </version>
7 // <author> Lorenz Lo Sauer; people credited in the sources </author>
8 // <project> https://github.com/lsauer/dotnet-portable-type-cast </project>
9 namespace Core.TypeCast
10 {
11  using System;
12  using System.Reflection;
13  using System.Reflection.Emit;
14  using System.Runtime.Serialization;
15 
16  using Core.TypeCast.Base;
17 
25  public sealed class Converter<TIn, TOut> : Converter<TIn, TOut, object>
26  {
33  public Converter(Func<TIn, TOut> converter)
34  : base(converter)
35  {
36  }
37 
48  public Converter(Func<TIn, TOut, TOut> converterDefault)
49  : base(converterDefault)
50  {
51  }
52 
62  public Converter(Func<TIn, object, TOut> converterDefaultAnyType)
63  : base(converterDefaultAnyType)
64  {
65  //this.Argument = argument ?? typeof(object);
66  }
67 
78  public Converter(MethodInfo converterInfo, Type argument)
79  : base(converterInfo, argument)
80  {
81  }
82  }
83 }
Converter(Func< TIn, TOut > converter)
Initializes a new instance of the Converter<TIn, TOut> class.
Definition: Converter_2T.cs:33
Converter(MethodInfo converterInfo, Type argument)
Initializes a new instance of the Converter<TIn, TOut> class.
Definition: Converter_2T.cs:78
Converter(Func< TIn, object, TOut > converterDefaultAnyType)
Initializes a new instance of the Converter<TIn, TOut> class.
Definition: Converter_2T.cs:62
Converter(Func< TIn, TOut, TOut > converterDefault)
Initializes a new instance of the Converter<TIn, TOut> class.
Definition: Converter_2T.cs:48
The Converter base class, providing a simple container for conversion types, ConverterAttribute and c...
Definition: Converter.cs:22