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 CachedDataHostItem 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 ( _
hostItemId As String _
) As CachedDataHostItem
public CachedDataHostItem Add(
string hostItemId
)
Parameters
- hostItemId
Type: System.String
The namespace and class in which the source data is cached.
Return Value
Type: Microsoft.VisualStudio.Tools.Applications.CachedDataHostItem
The CachedDataHostItem that was added to the end of the collection.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | A CachedDataHostItem that corresponds to hostItemId already exists in the collection. |
Remarks
The hostItemId parameter is a string that specifies the namespace and the class in the solution document that contains the cached data. The namespace and class name are separated by a period (.), for example, "ExcelWorkbook1.ThisWorkbook".
To add a CachedDataHostItem 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.