IVsOutliningSession.AddOutlineRegions Method
Creates an outlining region over the specified span of text.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'宣告
Function AddOutlineRegions ( _
dwOutliningFlags As UInteger, _
cRegions As Integer, _
rgOutlnReg As NewOutlineRegion() _
) As Integer
'用途
Dim instance As IVsOutliningSession
Dim dwOutliningFlags As UInteger
Dim cRegions As Integer
Dim rgOutlnReg As NewOutlineRegion()
Dim returnValue As Integer
returnValue = instance.AddOutlineRegions(dwOutliningFlags, _
cRegions, rgOutlnReg)
int AddOutlineRegions(
uint dwOutliningFlags,
int cRegions,
NewOutlineRegion[] rgOutlnReg
)
int AddOutlineRegions(
[InAttribute] unsigned int dwOutliningFlags,
[InAttribute] int cRegions,
[InAttribute] array<NewOutlineRegion>^ rgOutlnReg
)
abstract AddOutlineRegions :
dwOutliningFlags:uint32 *
cRegions:int *
rgOutlnReg:NewOutlineRegion[] -> int
function AddOutlineRegions(
dwOutliningFlags : uint,
cRegions : int,
rgOutlnReg : NewOutlineRegion[]
) : int
Parameters
- dwOutliningFlags
Type: System.UInt32
[in] Outlining flags controlling whether existing outlining regions are removed or preserved. For more information, see ADD_OUTLINE_REGION_FLAGS.
- cRegions
Type: System.Int32
[in] Number of outlining regions to add.
- rgOutlnReg
Type: array<Microsoft.VisualStudio.TextManager.Interop.NewOutlineRegion[]
[in, size_is(cRegions)] Caller-allocated array of outlining regions to add. For more information, see NewOutlineRegion.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsOutliningSession::AddOutlineRegions(
[in] DWORD dwOutliningFlags,
[in] long cRegions,
[in, size_is(cRegions)] NewOutlineRegion *rgOutlnReg
);
If you have a several regions that you want to outline in the text buffer, then create an array of outline regions and then call AddOutlineRegions once.
.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.