다음을 통해 공유


SPAlertCollection.Add Method (SPListItem, SPEventType, SPAlertFrequency)

Adds an alert to the collection of alerts for a list item based on the specified event type and time interval. This method overload is deprecated. Use Add(SPListItem, SPEventType, SPAlertFrequency, SPAlertDeliveryChannels) instead.

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

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Function Add ( _
    item As SPListItem, _
    eventType As SPEventType, _
    alertFrequency As SPAlertFrequency _
) As Guid
'Usage
Dim instance As SPAlertCollection
Dim item As SPListItem
Dim eventType As SPEventType
Dim alertFrequency As SPAlertFrequency
Dim returnValue As Guid

returnValue = instance.Add(item, eventType, _
    alertFrequency)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public Guid Add(
    SPListItem item,
    SPEventType eventType,
    SPAlertFrequency alertFrequency
)

Parameters

Return Value

Type: System.Guid
The GUID for the new alert.

Remarks

Warning

If you write new applications, avoid using this deprecated overload, which is maintained only for backward compatibility. If you modify existing applications, you are strongly encouraged to remove any dependency on this feature.

This overload behaves identically to Add(SPListItem, SPEventType, SPAlertFrequency, SPAlertDeliveryChannels) if Email is passed as its final parameter.

See Also

Reference

SPAlertCollection Class

SPAlertCollection Members

Add Overload

Microsoft.SharePoint Namespace