コード例 #1
0
 public virtual bool TryGetSqlTypesAssembly(Assembly assembly, out SqlTypesAssembly sqlAssembly)
 {
     if (IsKnownAssembly(assembly))
     {
         sqlAssembly = new SqlTypesAssembly(assembly);
         return true;
     }
     sqlAssembly = null;
     return false;
 }
コード例 #2
0
 private static bool TryGetSqlTypesAssembly(out SqlTypesAssembly sqlTypesAssembly)
 {
     sqlTypesAssembly = SqlTypesAssembly.Latest;
     return sqlTypesAssembly != null;
 }
コード例 #3
0
 /// <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);
 }