Share via


CachedDataItemCollection.Add Method (String, String)

Adds the specified CachedDataItem to the end of the collection.

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

Syntax

'Declaration
Public Function Add ( _
    dataId As String, _
    dataType As String _
) As CachedDataItem
public CachedDataItem Add(
    string dataId,
    string dataType
)

Parameters

  • dataId
    Type: System.String
    The name of the object to add to the data cache.
  • dataType
    Type: System.String
    The full assembly-qualified name of the type of the object to add to the data cache.

Return Value

Type: Microsoft.VisualStudio.Tools.Applications.CachedDataItem
The CachedDataItem that was added to the end of the collection.

Exceptions

Exception Condition
InvalidOperationException

A CachedDataItem that corresponds to dataId already exists in the collection.

Remarks

For details about the format of an assembly-qualified name of a type, see the Type.AssemblyQualifiedName property.

To add a CachedDataItem to the collection at a specific index location, use the Insert method.

.NET Framework Security

See Also

Reference

CachedDataItemCollection Class

Add Overload

Microsoft.VisualStudio.Tools.Applications Namespace