/// <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)); }
public static TImplementation ToImplementation <TImplementation>([CanBeNull] this IAbstraction <TImplementation> abstraction) { return(ReferenceEquals(abstraction, null) ? default : abstraction.UnsafeConvert()); }
public static TImplementation?ToImplementation <TImplementation>(this IAbstraction <TImplementation>?abstraction) where TImplementation : notnull { return(ReferenceEquals(abstraction, null) ? default : abstraction.UnsafeConvert()); }