Freigeben über


IVsTaskProvider2.MaintainInitialTaskOrder(Int32) Method

Definition

Determines whether or not the task list should maintain the task order given to it by the task provider.

public:
 int MaintainInitialTaskOrder([Runtime::InteropServices::Out] int % bMaintainOrder);
int MaintainInitialTaskOrder([Runtime::InteropServices::Out] int & bMaintainOrder);
public int MaintainInitialTaskOrder (out int bMaintainOrder);
abstract member MaintainInitialTaskOrder : int -> int
Public Function MaintainInitialTaskOrder (ByRef bMaintainOrder As Integer) As Integer

Parameters

bMaintainOrder
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.

Returns

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.

Applies to