.NET Portable TypeCast  3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
IConverterCollection.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.Collections.Concurrent;
13  using System.Reflection;
14  using System.Threading;
15 
16  using Core.TypeCast.Base;
17 
18  public interface IConverterCollection
19  {
25  ConcurrentDictionary<Assembly, bool> AssemblyInitialized { get; }
26 
31  BlockingCollection<Converter> Items { get; }
32 
34  int Count { get; }
35 
39  ConverterCollectionSettings Settings { get; set; }
40 
51  IConverterCollection Add(Converter converter, Type baseType = null, bool allowDisambiguates = false, CancellationToken cancellationToken = default(CancellationToken));
52 
63  IConverterCollection Add<TIn, TOut>(Func<TIn, TOut> converterAction, Type baseType = null, CancellationToken cancellationToken = default(CancellationToken));
64 
76  IConverterCollection Add<TIn, TOut, TBase>(Func<TIn, TOut> converterAction, CancellationToken cancellationToken = default(CancellationToken)) where TBase : class;
77 
90  IConverterCollection Add<TIn, TArg, TOut>(Func<TIn, TArg, TOut> converterActionAny, Type baseType = null, CancellationToken cancellationToken = default(CancellationToken));
91 
103  IConverterCollection Add<TIn, TOut, TBase>(Func<TIn, TOut, TOut> converterAction, CancellationToken cancellationToken = default(CancellationToken)) where TBase : class;
104 
112  IConverterCollection Add(object converterDelegate, Type baseType = null, CancellationToken cancellationToken = default(CancellationToken));
113 
122  IConverterCollection Add<TBase>(object converterDelegate, CancellationToken cancellationToken = default(CancellationToken)) where TBase : class;
123 
124  }
125 }
The settings for the ConverterCollection.
The Converter base class, providing a simple container for conversion types, ConverterAttribute and c...
Definition: Converter.cs:22