共用方式為


SPAdministrationWebApplication.EnsureSystemTask Method

NOTE: This API is now obsolete.

Adds a system task to the administration Tasks list if it does not already exist.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("The admin task list is obsolete.", False)> _
Public Function EnsureSystemTask ( _
    title As String, _
    description As String, _
    priority As Integer, _
    actionTitle As String, _
    actionUrl As String, _
    service As String, _
    systemId As String _
) As SPListItem
'Usage
Dim instance As SPAdministrationWebApplication
Dim title As String
Dim description As String
Dim priority As Integer
Dim actionTitle As String
Dim actionUrl As String
Dim service As String
Dim systemId As String
Dim returnValue As SPListItem

returnValue = instance.EnsureSystemTask(title, _
    description, priority, actionTitle, _
    actionUrl, service, systemId)
[ObsoleteAttribute("The admin task list is obsolete.", false)]
public SPListItem EnsureSystemTask(
    string title,
    string description,
    int priority,
    string actionTitle,
    string actionUrl,
    string service,
    string systemId
)

Parameters

  • title
    Type: System.String

    A string that contains the title of the new item.

  • description
    Type: System.String

    A string that contains a description for the new item.

  • priority
    Type: System.Int32

    A 32-bit integer that specifies the priority of the new task item.

  • actionTitle
    Type: System.String

    A string that contains the descriptive text for the link to the task.

  • actionUrl
    Type: System.String

    A string that contains the URL for the link to the task.

  • service
    Type: System.String

    A string that contains the name of the service.

  • systemId
    Type: System.String

    A string that contains the system ID of the item.

Return Value

Type: Microsoft.SharePoint.SPListItem
An SPListItem object that represents the new item.

See Also

Reference

SPAdministrationWebApplication Class

SPAdministrationWebApplication Members

Microsoft.SharePoint.Administration Namespace