IVsTaskProvider2.MaintainInitialTaskOrder Method
Determines whether or not the task list should maintain the task order given to it by the task provider.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaración
Function MaintainInitialTaskOrder ( _
<OutAttribute> ByRef bMaintainOrder As Integer _
) As Integer
'Uso
Dim instance As IVsTaskProvider2
Dim bMaintainOrder As Integer
Dim returnValue As Integer
returnValue = instance.MaintainInitialTaskOrder(bMaintainOrder)
int MaintainInitialTaskOrder(
out int bMaintainOrder
)
int MaintainInitialTaskOrder(
[OutAttribute] int% bMaintainOrder
)
function MaintainInitialTaskOrder(
bMaintainOrder : int
) : int
Parameters
bMaintainOrder
Type: System.Int32%[out] true if the task list should maintain the task order provided by the task provider, rather than use the task list's default sort.
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 vsshell.idl:
HRESULT MaintainInitialTaskOrder(
[out] int bMaintainOrder
);
When the task provider adds tasks to the task list, the task list performs a sort upon the items based upon the current sort. However, when the current sort is the default sort and the task provider wants the task list to maintain the order of the tasks it gives to the task list, this method should return a value of true in bMaintainOrder.
For example, compiler errors in C++ can occur from both .h and .cpp files. The default sort by the task list on these errors would put all of the errors from the .cpp files before those from the .h files. However, it may be more meaningful to have the task list display the errors in the order in which they are generated by the compiler. In such a case, this method should return a value of true in bMaintainOrder.
Note
Maintaining the task order only works when the current sort is the default sort. If the user has specified an explicit non-default sort, then that overrides maintaining the initial task order.
Permissions
- 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.