DocumentProperties.CountObjects Method
Returns the number of objects managed by this DocumentProperties object.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
'Declaration
Public Overridable Function CountObjects ( _
flags As UInteger, _
<OutAttribute> ByRef pc As UInteger _
) As Integer
public virtual int CountObjects(
uint flags,
out uint pc
)
public:
virtual int CountObjects(
unsigned int flags,
[OutAttribute] unsigned int% pc
)
abstract CountObjects :
flags:uint32 *
pc:uint32 byref -> int
override CountObjects :
flags:uint32 *
pc:uint32 byref -> int
public function CountObjects(
flags : uint,
pc : uint
) : int
Parameters
flags
Type: System.UInt32[in] This is either GETOBJS_ALL to count all objects, or GETOBJS_SELECTED to count only the selected objects.
pc
Type: System.UInt32%[out] Returns the number of objects.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Implements
ISelectionContainer.CountObjects(UInt32, UInt32%)
Remarks
This method is used to handle multiple selectable objects in the Properties window. A language service typically needs only the one DocumentProperties object and the base method handles this automatically.
This method is an implementation of the CountObjects method on the ISelectionContainer interface.
The base method returns a count of 1 if the DocumentProperties object is visible; otherwise, the base method returns 0. The base method always returns a success code of S_OK.
.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.