Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

23 lines
995 B
C#

// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.TestHelpers
{
using System.Data.Common;
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;
public class FunctionalTestsManifestTokenService : IManifestTokenService
{
private static readonly DefaultManifestTokenService _defaultManifestTokenService = new DefaultManifestTokenService();
public string GetProviderManifestToken(DbConnection connection)
{
return (!string.IsNullOrWhiteSpace(connection.Database) // Some negative cases require the provider to fail
&& connection is SqlConnection)
|| connection.GetType().FullName.StartsWith("Castle.Proxies.")
? "2008"
: _defaultManifestTokenService.GetProviderManifestToken(connection);
}
}
}