Skip to content

Commit

Permalink
Tweak to compile 93266fd pre-NET40
Browse files Browse the repository at this point in the history
  • Loading branch information
Shay Rojansky committed Mar 10, 2015
1 parent 93266fd commit a4522cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Npgsql.EntityFramework/NpgsqlProviderManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ internal class NpgsqlProviderManifest : DbXmlEnabledProviderManifest
public NpgsqlProviderManifest(string serverVersion)
: base(CreateXmlReaderForResource("Npgsql.NpgsqlProviderManifest.Manifest.xml"))
{
if (string.IsNullOrEmpty(serverVersion) || !Version.TryParse(serverVersion, out _serverVersion))
try {
_serverVersion = new Version(serverVersion);
} catch {
_serverVersion = new Version(9, 4, 1); // Some default version
}
}

protected override XmlReader GetDbInformation(string informationType)
Expand Down

0 comments on commit a4522cc

Please sign in to comment.