Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the specified object based on its associated name, GUID, and type.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Function GetObject ( _
name As String, _
parentId As Guid, _
type As Type _
) As SPPersistedObject
'Usage
Dim instance As SPFarm
Dim name As String
Dim parentId As Guid
Dim type As Type
Dim returnValue As SPPersistedObject
returnValue = instance.GetObject(name, _
parentId, type)
public SPPersistedObject GetObject(
string name,
Guid parentId,
Type type
)
Parameters
name
Type: System.StringA string that contains the name of the object.
parentId
Type: System.GuidA System.Guid that identifies the parent of the object.
type
Type: System.TypeA System.Type that represents the type of the object.
Return Value
Type: Microsoft.SharePoint.Administration.SPPersistedObject
An SPPersistedObject object that represents the object that is associated with the GUID and type.
Remarks
To return a Web application object called MyWeb, call the GetObject method as follows:
SPFarm.GetObject("MyWeb", SPWebService, SpWebApplication)