CachedAttribute Class

 

Instructs the Visual Studio Tools for Office runtime to add the specified data object to the data cache in the document.

Namespace:   Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly:  Microsoft.VisualStudio.Tools.Applications.Runtime (in Microsoft.VisualStudio.Tools.Applications.Runtime.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.Tools.Applications.Runtime.CachedAttribute

[AttributeUsageAttribute(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class CachedAttribute : Attribute

NameDescription
System_CAPS_pubmethodCachedAttribute()

Initializes a new instance of the CachedAttribute class.

NameDescription
System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This attribute can only be used in a document-level customization for Word or Excel created by using the Office development tools in Visual Studio.

To add an object to the data cache in a document, the object must have a public type that meets the requirements of XmlSerializer. For more information about adding objects to the data cache, see Caching Data. For more information about using attributes, see Extending Metadata Using Attributes.

If you want to have greater control over the caching behavior of the data object, you can implement the ICachedType interface in the type of the object.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: