Ejemplo n.º 1
0
 /// <summary>
 /// Converts provided abstraction to implementation.
 /// </summary>
 /// <param name="abstraction">Abstraction to convert.</param>
 /// <returns>Converted abstraction.</returns>
 public static TImplementation ToImplementation <TImplementation>(this IAbstraction <TImplementation> abstraction)
 {
     return(abstraction != null?abstraction.UnsafeConvert() : default(TImplementation));
 }
Ejemplo n.º 2
0
 public static TImplementation ToImplementation <TImplementation>([CanBeNull] this IAbstraction <TImplementation> abstraction)
 {
     return(ReferenceEquals(abstraction, null) ? default : abstraction.UnsafeConvert());
 }
Ejemplo n.º 3
0
 public static TImplementation?ToImplementation <TImplementation>(this IAbstraction <TImplementation>?abstraction)
     where TImplementation : notnull
 {
     return(ReferenceEquals(abstraction, null) ? default : abstraction.UnsafeConvert());
 }