NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PersistableAttribute Class

Specifies which values are saved for a property, or event.

Object
   Attribute
      MemberAttribute
         PersistableAttribute

[Visual Basic]
Public Class PersistableAttribute
   Inherits MemberAttribute
[C#]
public class PersistableAttribute : MemberAttribute
[C++]
public __gc class PersistableAttribute : public MemberAttribute
[JScript]
public class PersistableAttribute extends MemberAttribute

Remarks

When generating code, the value used to set persistence determines which aspects of the property, or event are examined and saved.

When you mark a property with this attribute, it is set to a constant member. When you want to check the value of this attribute in your code, you must specify the constant member. The constant member that each value is set to, is listed in the Description column in the table below.

The following persistence values are defined:

Persistence

Value

Description
PersistableSupport.None The component code generator will not generate code for any format.

The attribute is set to the constant member PersistableAttribute.None.

PersistableSupport.All The component code generator will generate code for all formats. This is the default.

The attribute is set to the constant member PersistableAttribute.All.

PersistableSupport.Resource The component code generator will generate code only for resources.

The attribute is set to the constant member PersistableAttribute.Resource.

PersistableSupport.Code The component code generator will generate code only for code.

The attribute is set to the constant member PersistableAttribute.Code.

PersistableSupport.Declarative The component code generator will generate code for a declarative format such as HTML.

The attribute is set to the constant member PersistableAttribute.Declarative.

PersistableSupport.NotCode The component code generator will generate code for any format except code.

The attribute is set to the constant member PersistableAttribute.NotCode.

PersistableSupport.NotDeclarative The component code generator will generate code for any format except declarative, for example HTML.

The attribute is set to the constant member PersistableAttribute.NotDeclarative.

Yes The component code generator will generate code for all formats.

The attribute is set to the constant member PersistableAttribute.All.

No The component code generator will not generate code for any format.

The attribute is set to the constant member PersistableAttribute.None.

Use the Support property to get the type of persistence that is defined for a member.

For more information, see TBD and TBD.

Requirements

Namespace: System.ComponentModel

Assembly: System.dll

See Also

System.ComponentModel Namespace | MemberAttribute | PropertyDescriptor