Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.