using System; using System.Collections.Generic; using System.Text; namespace System.Data.Linq.SqlClient { /// /// Annotation which indicates that the given node will cause a compatibility problem /// for the indicated set of providers. /// internal class SqlServerCompatibilityAnnotation : SqlNodeAnnotation { SqlProvider.ProviderMode[] providers; /// /// Constructor /// /// The compatibility message. /// The set of providers this compatibility issue applies to. internal SqlServerCompatibilityAnnotation(string message, params SqlProvider.ProviderMode[] providers) : base(message) { this.providers = providers; } /// /// Returns true if this annotation applies to the specified provider. /// internal bool AppliesTo(SqlProvider.ProviderMode provider) { foreach (SqlProvider.ProviderMode p in providers) { if (p == provider) { return true; } } return false; } } }