An
can instantiate only those objects within its scope. For example, a
object is within the scope of an
, but is not within the scope of a
. This interface provides methods for creating or retrieving objects when you do not have type-specific knowledge of the objects to be instantiated. You can create or retrieve objects by supplying just a class name and (for retrieval) an object identifier or path.
![]() |
---|
To create or retrieve known object types, use the static methods are more convenient and provide type safety. The method results do not have to be cast and programming errors on the returned type may be caught at build time instead of runtime. The methods also avoid the inconvenience (and potential for error) of specifying the type. |
The following tables list the members exposed by IInstantiatingScope.
Public Methods
Name | Description | |
---|---|---|
![]() | CreateObject | Overloaded. Creates a new object of the specified class. |
![]() | FetchObject | Overloaded. Retrieves an object of the requested type, given a class identifier and an object ID. This method always makes a round-trip to the server. You can optionally include a filter to control which properties to return with the object. If you pass in |
![]() | GetObject | Overloaded. Retrieves an object of the requested type, given a class identifier and an object ID. This method does not verify the existence of the requested object on the server; it simply returns a local reference without making a round-trip to the server. The local reference is not affiliated with an object of this class type until you perform a function on the object (for example, |