SmoUtility.IsSupportedObject Method

Definition

Overloads

IsSupportedObject(Type, ServerVersion, DatabaseEngineType, DatabaseEngineEdition)

Whether the specified type is supported by the specified server Version, Engine Type and Engine Edition.

IsSupportedObject<T>(SqlSmoObject, ScriptingPreferences)

Checks if the specified type is supported by the ServerVersion and DatabaseEngineType of the root server for this object. If ScriptingPreferences are non-null will also check if specified type is supported by the ServerVersion and DatabaseEngineType of the target server.

IsSupportedObject(Type, ServerVersion, DatabaseEngineType, DatabaseEngineEdition)

Whether the specified type is supported by the specified server Version, Engine Type and Engine Edition.

public static bool IsSupportedObject (Type type, Microsoft.SqlServer.Management.Common.ServerVersion serverVersion, Microsoft.SqlServer.Management.Common.DatabaseEngineType databaseEngineType, Microsoft.SqlServer.Management.Common.DatabaseEngineEdition databaseEngineEdition);
static member IsSupportedObject : Type * Microsoft.SqlServer.Management.Common.ServerVersion * Microsoft.SqlServer.Management.Common.DatabaseEngineType * Microsoft.SqlServer.Management.Common.DatabaseEngineEdition -> bool
Public Function IsSupportedObject (type As Type, serverVersion As ServerVersion, databaseEngineType As DatabaseEngineType, databaseEngineEdition As DatabaseEngineEdition) As Boolean

Parameters

type
Type
serverVersion
ServerVersion
databaseEngineType
DatabaseEngineType
databaseEngineEdition
DatabaseEngineEdition

Returns

Boolean

IsSupportedObject<T>(SqlSmoObject, ScriptingPreferences)

Checks if the specified type is supported by the ServerVersion and DatabaseEngineType of the root server for this object. If ScriptingPreferences are non-null will also check if specified type is supported by the ServerVersion and DatabaseEngineType of the target server.

public static bool IsSupportedObject<T> (this Microsoft.SqlServer.Management.Smo.SqlSmoObject smoObject, Microsoft.SqlServer.Management.Smo.ScriptingPreferences sp = default) where T : Microsoft.SqlServer.Management.Smo.SqlSmoObject;
static member IsSupportedObject : Microsoft.SqlServer.Management.Smo.SqlSmoObject * Microsoft.SqlServer.Management.Smo.ScriptingPreferences -> bool (requires 'T :> Microsoft.SqlServer.Management.Smo.SqlSmoObject)
<Extension()>
Public Function IsSupportedObject(Of T As SqlSmoObject) (smoObject As SqlSmoObject, Optional sp As ScriptingPreferences = null) As Boolean

Type Parameters

T

Parameters

smoObject
SqlSmoObject
sp
ScriptingPreferences

Optional - If provided will also check if target server supports specified type

Returns

Boolean

TRUE if the specified type is supported by the current connection and/or ScriptingPreferences

Applies to