How to use IFeatureChecker on ScriptObject

MartinHMartinH Posts: 82 Bronze 2
edited September 24, 2015 2:41AM in SQL Comparison SDK 11
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.

Comments

  • 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?
  • MartinHMartinH Posts: 82 Bronze 2
    Mark:

    That did the trick, thanks very much!

    Regards,
    Martin.
Sign In or Register to comment.