How can we help you today? How can we help you today?

How to use IFeatureChecker on ScriptObject

In the latest version (11.3) of the SQL Comparison SDK the RedGate.SQLCompare.Engine.SchemaObject.ScriptObject method has a new parameter of type IFeatureChecker, but I can't find any documentation on how to use this.

Can you please point me in the right direction.

Thanks,
Martin.
MartinH
0

Comments

2 comments

  • Mark J
    Ah, apologies - this is due to a refactoring we've done recently to make version checks against different SQL Server versions more sensible.

    Anyway, there should be a extension method in IDatabaseObjectExtensionMethods which preserves the old API - it's defined like this:
    public static Regions ScriptObject(this ScriptableDatabaseObject objectToScript, SqlSetOptions sqlSetOptions, Options options)
    {
        var targetFeatures = objectToScript.Database.GetSupportedFeatures();
        return objectToScript.ScriptObject(sqlSetOptions, options, targetFeatures);
    }
    
    Is there something else that's causing the old code to not work?
    Mark J
    0
  • MartinH
    Mark:

    That did the trick, thanks very much!

    Regards,
    Martin.
    MartinH
    0

Add comment

Please sign in to leave a comment.