Specifies that the property this attribute is attached to should be ignored by the CSO Gateway.

This attribute can be attached to properties of classes and structs. The CSO Gateway ignores all non-public properties and all properties with no get accessor. In these cases the CsoPropertyExcludeAttribute has no effect. The case of properties in structs is pretty straightforward because there is no inheritance: the property will be completely ignored by the CSO Gateway. For classes, the effect of this attribute is inherited by the declarations of the same property in derived classes unless a derived class is decorated with the CsoGeneratedTypeAttribute (a cso-ready class) and has CsoGeneratedTypeAttribute.IgnoreBaseClass set to true. In that case, if that derived class or one of its derived classes declares the property again (by overriding or hiding it) the CSO Gateway will take it into account.

This attribute has different effects on a virtual/override inheritance chain of properties then on a non-virtual/new inheritance chain of property. When the attribute is attached to the base declaration of an inheritance chain of virtual/overrides properties (the one with the virtual modifier), all the other declarations in derived classes will also be ignored whether of not the class of the base declaration is cso-ready. When the attribute is attached to an overriding declaration of the property (the ones with the 'override' modifier), the attribute has -no effect-.

When the attribute is attached to the base declaration of an inheritance chain of non-virtual/new properties (a method with no inheritance modifier), all the other declarations in the derived classes will also be ignored whether of not the class of the base declaration is cso-ready and EVEN if a property hides its base declaration with the new modifier. When the attribute is attached to an hiding declaration of the property (with the 'new' modifier), that property will still be defined in the cso-generated type corresponding to the declaring class of the property. But the value retreived by the Object Gateway will be the value returned by the version of the property that is the closest up in the inheritance chain.

To sum up, the effect of the CsoPropertyExcludeAttribute on a property (disregarding the possibility of a CsoGeneratedTypeAttribute.IgnoreBaseClass set to true):
ModifierEffect
virtualThe property and all overriding declaration of that same property in derived classes are ignored. The property won't exist for any cso-type.
overrideNo effect.
-no inheritance modifier-The property and all the hiding declarations of that same property in derived classes are ignored. The property won't exist for any cso-type.
newThe property and all the hiding declarations of that same property in derived classes are ignored. But since the property is still declared in an ancestor class, the property will still be defined for the cso-generated type. The value retreived by the Object Gateway and passed to the constructor control will be from the declaration of the property that is closest up in the inheritance chain.

Namespace:  ca.metaobjects.csogateway
Assembly:  ca.metaobjects.csogateway (in ca.metaobjects.csogateway.dll) Version: 0.7.1.0 (0.7.1.0)

Syntax

C#
public class CsoPropertyExcludeAttribute : Attribute
Visual Basic (Declaration)
Public Class CsoPropertyExcludeAttribute _
	Inherits Attribute
Visual C++
public ref class CsoPropertyExcludeAttribute : public Attribute

Inheritance Hierarchy

System..::.Object
  System..::.Attribute
    ca.metaobjects.csogateway..::.CsoPropertyExcludeAttribute

See Also