共用方式為


QueueSystem.SetQueueConfiguration 方法

會指定佇列的組態設定的 Project Server 佇列服務中。

命名空間:  WebSvcQueueSystem
組件:  ProjectServerServices (在 ProjectServerServices.dll 中)

語法

'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/SetQueueConfiguration", 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 Sub SetQueueConfiguration ( _
    queueId As QueueID, _
    name As String, _
    value As String _
)
'用途
Dim instance As QueueSystem
Dim queueId As QueueID
Dim name As String
Dim value As String

instance.SetQueueConfiguration(queueId, _
    name, value)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/SetQueueConfiguration", 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 void SetQueueConfiguration(
    QueueID queueId,
    string name,
    string value
)

參數

備註

最小值、 最大值,與預設值,請參閱Project Web App (https://ServerName/ProjectServerName/_layouts/pwa/Admin/queuesettings.aspx) 中的 [佇列設定] 頁面。

Project Server 權限

權限

描述

ManageQueue

可讓使用者管理 Project Server 佇列。通用權限。

範例

下列程式碼範例會設定輪詢間隔設定為 2 秒的時程表佇列。您可以使用ReadQueueConfiguration方法,取得的組態設定時, SetQueueConfiguration可以設定任一佇列。

. . .
QueueSystemWS.QueueID qType = QueueSystemWS.QueueID.TimesheetQ;
string qSettingName = "PollingInterval";
string qSettingValue = "2000";
string qConfig = q.SetQueueConfiguration(qType, qSettingName, qSettingValue);

以下是ReadQueueConfiguration時程表佇列的預設結果。

<?xml version="1.0" encoding="utf-8"?>
<queueconfigurationsettings>
  <setting name="MaxThreads" value="4" />
  <setting name="QueueTimeout" value="3" />
  <setting name="MsgRetryInterval" value="1000" />
  <setting name="MsgRetryLimit" value="5" />
  <setting name="GrpRetryLimit" value="5" />
  <setting name="SqlRetryInterval" value="1000" />
  <setting name="SqlRetryLimit" value="5" />
  <setting name="PollingInterval" value="1000" />
  <setting name="RestartThrottle" value="60000" />
  <setting name="EnablePerfMon" value="1" />
  <setting name="PeriodicTasksInterval" value="10000" />
  <setting name="CleanupSuccessAgeLimit" value="24" />
  <setting name="CleanupNonSuccessAgeLimit" value="168" />
  <setting name="CleanupInterval" value="24" />
  <setting name="CleanupIntervalOffset" value="0" />
  <setting name="SqlCommandTimeout" value="1800" />
  <setting name="FastPolling" value="1" />
</queueconfigurationsettings>

請參閱

參照

QueueSystem 類別

QueueSystem 成員

WebSvcQueueSystem 命名空間