QueueSystem.GetJobCount 方法
Project Server 队列服务中获取指定的关联、 作业状态以及邮件类型的作业数。
命名空间: WebSvcQueueSystem
程序集: ProjectServerServices(位于 ProjectServerServices.dll 中)
语法
声明
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/GetJobCount", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetJobCount ( _
CorrelationGUIDs As Guid(), _
jobStates As JobState(), _
messageTypes As QueueMsgType() _
) As Integer
用法
Dim instance As QueueSystem
Dim CorrelationGUIDs As Guid()
Dim jobStates As JobState()
Dim messageTypes As QueueMsgType()
Dim returnValue As Integer
returnValue = instance.GetJobCount(CorrelationGUIDs, _
jobStates, messageTypes)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/GetJobCount", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public int GetJobCount(
Guid[] CorrelationGUIDs,
JobState[] jobStates,
QueueMsgType[] messageTypes
)
参数
CorrelationGUIDs
类型:[]作业相关的 Guid 的数组。
jobStates
类型:[]JobState枚举值的数组。
messageTypes
类型:[]QueueMsgType枚举值的数组。
返回值
类型:System.Int32
具有{ [corrID1 OR corrID2 OR …] AND [state1 OR state2 OR …] AND [type1 OR type2 OR …]}作业的计数
备注
任何参数可以是空引用(无 在 Visual Basic 中)。例如,如果CorrelationGUIDs和jobStates这两个空引用(无 在 Visual Basic 中), GetJobCount将返回指定messageTypes的作业总数。
如果CorrelationGUIDs , 空引用(无 在 Visual Basic 中)GetJobCount计算所有相关。如果jobStates , 空引用(无 在 Visual Basic 中)计数所有作业状态。如果messageTypes , 空引用(无 在 Visual Basic 中)计数所有消息类型。
Project Server 权限
权限 |
说明 |
---|---|
允许用户管理 Project Server 队列。全局权限。 |
示例
以下示例返回的ProjectPublish类型和Success州的或corGuid1关联中corGuid1作业的队列的总数。q变量是 WebSvcQueueSystem.QueueSystem 的已初始化实例。
Guid[] correlationGuids = { corGuid1, corGuid2 };
WebSvcQueueSystem.JobState[] jobStates = { WebSvcQueueSystem.JobState.Success };
WebSvcQueueSystem.QueueMsgType[] jobTypes = { WebSvcQueueSystem.QueueMsgType.ProjectPublish };
int numJobs = q.GetJobCount(null, jobStates, jobTypes);
以下示例返回发布作业数加上或Failed状态中OnHold作业的存储的数目。
WebSvcQueueSystem.JobState[] jobStates = { WebSvcQueueSystem.JobState.OnHold,
WebSvcQueueSystem.JobState.Failed };
WebSvcQueueSystem.QueueMsgType[] jobTypes = { WebSvcQueueSystem.QueueMsgType.ProjectPublish,
WebSvcQueueSystem.QueueMsgType.ACProjectSave };
int numJobs = q.GetJobCount(null, jobStates, jobTypes);
以下示例返回在OnHold的作业总数或Failed状态。
WebSvcQueueSystem.JobState[] jobStates = { WebSvcQueueSystem.JobState.OnHold,
WebSvcQueueSystem.JobState.Failed };
int numJobs = q.GetJobCount(null, jobStates, null);