Share via


PublishingWeb.GetVariation method (VariationLabel, Boolean)

Get the peer variation PublishingWeb object of this PublishingWeb object for the given label.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Function GetVariation ( _
    varlabel As VariationLabel, _
    forceRefresh As Boolean _
) As PublishingWeb
'Usage
Dim instance As PublishingWeb
Dim varlabel As VariationLabel
Dim forceRefresh As Boolean
Dim returnValue As PublishingWeb

returnValue = instance.GetVariation(varlabel, _
    forceRefresh)
public PublishingWeb GetVariation(
    VariationLabel varlabel,
    bool forceRefresh
)

Parameters

  • forceRefresh
    Type: System.Boolean

    A flag to indicate whether finding the peer PublishingWeb object is using cache.

Return value

Type: Microsoft.SharePoint.Publishing.PublishingWeb
Returns PublishingWeb object that is a variation peer of the current PublishingWeb object in the requested Label object..

Remarks

Caller should call the Close() method on the returned object when it is not longer needed. It frees up the resources that are allocated to the PublishingWeb object.

See also

Reference

PublishingWeb class

PublishingWeb members

GetVariation overload

Microsoft.SharePoint.Publishing namespace