SPWebPipeBind.Read Method (SPSite)
Retrieves an SPWeb object that is defined by both site and relative URL. If the site is null, it uses the Web guid and site guid, or the absolute URL.
Namespace: Microsoft.SharePoint.PowerShell
Assembly: Microsoft.SharePoint.PowerShell (in Microsoft.SharePoint.PowerShell.dll)
Syntax
'Declaration
Public Function Read ( _
site As SPSite _
) As SPWeb
'Usage
Dim instance As SPWebPipeBind
Dim site As SPSite
Dim returnValue As SPWeb
returnValue = instance.Read(site)
public SPWeb Read(
SPSite site
)
Parameters
site
Type: Microsoft.SharePoint.SPSiteThe associated SPSite instance.
Return Value
Type: Microsoft.SharePoint.SPWeb
Returns an SPWeb instance.
Remarks
If the site is a null reference (Nothing in Visual Basic), then a new site object is opened and a new web object is returned to the caller. In this case, you need to dispose both the Web and the site in ordeer to prevent a memory leak on request operations.