Server.IsSupportedProperty Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IsSupportedProperty(Type, String, DatabaseEngineEdition) |
Returns true if the given property name is valid for the object of Type type for the Server's version and edition. |
IsSupportedProperty<T>(Expression<Func<T,Object>>, DatabaseEngineEdition) |
Returns true if the expression identifies a valid SqlSmoObject property for the current Server version and edition |
IsSupportedProperty<T>(String, DatabaseEngineEdition) |
Returns true if the given property name is valid for the object of Type T for the Server's version and edition. |
IsSupportedProperty(Type, String, DatabaseEngineEdition)
Returns true if the given property name is valid for the object of Type type for the Server's version and edition.
public bool IsSupportedProperty(Type type, string propertyName, Microsoft.SqlServer.Management.Common.DatabaseEngineEdition databaseEngineEdition = Microsoft.SqlServer.Management.Common.DatabaseEngineEdition.Unknown);
override this.IsSupportedProperty : Type * string * Microsoft.SqlServer.Management.Common.DatabaseEngineEdition -> bool
Public Function IsSupportedProperty (type As Type, propertyName As String, Optional databaseEngineEdition As DatabaseEngineEdition = Microsoft.SqlServer.Management.Common.DatabaseEngineEdition.Unknown) As Boolean
Parameters
- type
- Type
A type that is assignable to SqlSmoObject
- propertyName
- String
- databaseEngineEdition
- DatabaseEngineEdition
Specific database edition to check for property supported. If Unknown or not specified, the check will use the edition of the master database.
Returns
true if the property can be requested, false otherwise
Exceptions
When type is not a SqlSmoObject or if the SqlSmoObject does not have property visibility based on the Server version
Applies to
IsSupportedProperty<T>(Expression<Func<T,Object>>, DatabaseEngineEdition)
Returns true if the expression identifies a valid SqlSmoObject property for the current Server version and edition
public bool IsSupportedProperty<T>(System.Linq.Expressions.Expression<Func<T,object>> expression, Microsoft.SqlServer.Management.Common.DatabaseEngineEdition databaseEngineEdition = Microsoft.SqlServer.Management.Common.DatabaseEngineEdition.Unknown);
override this.IsSupportedProperty : System.Linq.Expressions.Expression<Func<'T, obj>> * Microsoft.SqlServer.Management.Common.DatabaseEngineEdition -> bool
Public Function IsSupportedProperty(Of T) (expression As Expression(Of Func(Of T, Object)), Optional databaseEngineEdition As DatabaseEngineEdition = Microsoft.SqlServer.Management.Common.DatabaseEngineEdition.Unknown) As Boolean
Type Parameters
- T
The derived type of SqlSmoObject for which to check
Parameters
- expression
- Expression<Func<T,Object>>
A LINQ expression that references a property of the object of type T. The name of the referenced property in the expression is used for the lookup.
- databaseEngineEdition
- DatabaseEngineEdition
Returns
true if the property can be requested, false otherwise
Exceptions
When the SqlSmoObject does not have property visibility based on the Server version
Examples
server.IsSupportedProperty<Table>(t => t.LedgerType)
Applies to
IsSupportedProperty<T>(String, DatabaseEngineEdition)
Returns true if the given property name is valid for the object of Type T for the Server's version and edition.
public bool IsSupportedProperty<T>(string propertyName, Microsoft.SqlServer.Management.Common.DatabaseEngineEdition databaseEngineEdition = Microsoft.SqlServer.Management.Common.DatabaseEngineEdition.Unknown) where T : Microsoft.SqlServer.Management.Smo.SqlSmoObject;
override this.IsSupportedProperty : string * Microsoft.SqlServer.Management.Common.DatabaseEngineEdition -> bool (requires 'T :> Microsoft.SqlServer.Management.Smo.SqlSmoObject)
Public Function IsSupportedProperty(Of T As SqlSmoObject) (propertyName As String, Optional databaseEngineEdition As DatabaseEngineEdition = Microsoft.SqlServer.Management.Common.DatabaseEngineEdition.Unknown) As Boolean
Type Parameters
- T
The derived type of SqlSmoObject for which to check
Parameters
- propertyName
- String
- databaseEngineEdition
- DatabaseEngineEdition
Specific database edition to check for property supported. If Unknown or not specified, the check will use the edition of the master database.
Returns
true if the property can be requested, false otherwise
Exceptions
When the SqlSmoObject does not have property visibility based on the Server version