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
varlabel
Type: Microsoft.SharePoint.Publishing.VariationLabelThe variation label to use to search for the variation peer PublishingWeb object of the current PublishingWeb object.
forceRefresh
Type: System.BooleanA 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.