Class LikenessSourceFactory
Contains extension methods for working with Likeness<TSource, TDestination>.
Inheritance
System.Object
LikenessSourceFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SemanticComparison.Fluent
Assembly: SemanticComparison.dll
Syntax
public static class LikenessSourceFactory
Methods
| Improve this Doc View SourceAsSource<TSource>(TSource)
Creates a new LikenessSource<TSource> from an object instance.
Declaration
public static LikenessSource<TSource> AsSource<TSource>(this TSource value)
Parameters
Type | Name | Description |
---|---|---|
TSource | value | The source value. |
Returns
Type | Description |
---|---|
LikenessSource<TSource> | A new LikenessSource<TSource> instance. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the source value. |
Remarks
This method is particularly handy for anonymous types, since it can use type
inferencing to determine TSource
from the value itself. This is
essentially the only way you can create a Likeness<TSource, TDestination>
from the public API when the source value is an instance of an anonymous type.