다음을 통해 공유


SPUsageReceiverDefinitionCollection.Add Method (String, String)

Adds a receiver definition to this collection.

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

Syntax

'Declaration
Public Function Add ( _
    receiverAssembly As String, _
    receiverClass As String _
) As SPUsageReceiverDefinition
'Usage
Dim instance As SPUsageReceiverDefinitionCollection
Dim receiverAssembly As String
Dim receiverClass As String
Dim returnValue As SPUsageReceiverDefinition

returnValue = instance.Add(receiverAssembly, _
    receiverClass)
public SPUsageReceiverDefinition Add(
    string receiverAssembly,
    string receiverClass
)

Parameters

  • receiverAssembly
    Type: System.String

    The assembly in which the receiver being added is defined.

  • receiverClass
    Type: System.String

    The full name of the type of the receiver being added.

Return Value

Type: Microsoft.SharePoint.Administration.SPUsageReceiverDefinition
SPUsageReceiverDefinition is the usage receiver definition which has been added.

Remarks

An exception is thrown if either input parameter is null or an empty string.

See Also

Reference

SPUsageReceiverDefinitionCollection Class

SPUsageReceiverDefinitionCollection Members

Add Overload

Microsoft.SharePoint.Administration Namespace