public virtual bool TryGetSqlTypesAssembly(Assembly assembly, out SqlTypesAssembly sqlAssembly) { if (IsKnownAssembly(assembly)) { sqlAssembly = new SqlTypesAssembly(assembly); return true; } sqlAssembly = null; return false; }
private static bool TryGetSqlTypesAssembly(out SqlTypesAssembly sqlTypesAssembly) { sqlTypesAssembly = SqlTypesAssembly.Latest; return sqlTypesAssembly != null; }
/// <summary> /// Used to create an instance of <see cref="SqlTypesAssemblyLoader"/> for a specific SQL Types assembly /// such that it can be used for converting EF spatial types backed by one version to those backed by /// the version actually in use in this app domain. /// </summary> public SqlTypesAssemblyLoader(SqlTypesAssembly assembly) { _latestVersion = new Lazy<SqlTypesAssembly>(() => assembly, isThreadSafe: true); }