SPServiceContext.GetDefaultProxy Method

Returns the default service application proxy for the specified type.

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

Syntax

'Declaration
Public Function GetDefaultProxy ( _
    serviceApplicationProxyType As Type _
) As SPServiceApplicationProxy
'Usage
Dim instance As SPServiceContext
Dim serviceApplicationProxyType As Type
Dim returnValue As SPServiceApplicationProxy

returnValue = instance.GetDefaultProxy(serviceApplicationProxyType)
public SPServiceApplicationProxy GetDefaultProxy(
    Type serviceApplicationProxyType
)

Parameters

  • serviceApplicationProxyType
    Type: System.Type

    The type that specifies which default service application proxy to return.

Return Value

Type: Microsoft.SharePoint.Administration.SPServiceApplicationProxy
A SPServiceApplicationProxy that is the default service application proxy for the specified type.

Remarks

GetDefaultProxy(Type) returns null if serviceApplicationProxyType is null.

GetDefaultProxy(Type) returns null if there is no default service application proxy for the specified type.

See Also

Reference

SPServiceContext Class

SPServiceContext Members

Microsoft.SharePoint Namespace