Skip to main content

ReflectionClassInfo.SuppressSuspiciousMemberInheritanceCheck Property

OBSOLETE

SuppressSuspiciousMemberInheritanceCheck accessed

Specifies whether exceptions are thrown when overridden properties have attributes from the DevExpress.Xpo namespace applied.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

[Obsolete("SuppressSuspiciousMemberInheritanceCheck accessed")]
public static bool SuppressSuspiciousMemberInheritanceCheck { get; set; }

Property Value

Type Description
Boolean

true, if exceptions are suppressed; false, if exceptions are thrown. The default is false.

Remarks

When an instance of the ReflectionClassInfo class is created, the following exception may be thrown: “Member ‘MemberName’ and its attribute ‘AttributeName’ are ignored. The member with the same name is already declared in the base class ‘ClassName’.” This exception occurs when an overridden property has attributes from the DevExpress.Xpo namespace applied. The exception is thrown because overridden properties are not fully supported by the XPO. When you override a property of the base class, it can cause a mismatch between the database and business classes. A column is already created in the database table for the virtual property. Overridden properties use the same column and cannot modify its parameters. So, there is no point in applying attributes from the DevExpress.Xpo namespace to overridden properties.

The SuppressSuspiciousMemberInheritanceCheck property allows you to suppress exceptions caused by applying attributes to overridden properties. If the SuppressSuspiciousMemberInheritanceCheck property is set to true, the attributes from the DevExpress.Xpo namespace, applied to overridden properties, are still ignored, but exceptions aren’t thrown. Because of this, the SuppressSuspiciousMemberInheritanceCheck property shouldn’t be used. If your application uses overridden properties, make sure that they don’t have attributes from the DevExpress.Xpo namespace applied. If there are such attributes, remove them. Setting the SuppressSuspiciousMemberInheritanceCheck property to true may hide a potential design problem, but cannot address it.

See Also