Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Delegate ServiceAccessor<TService>

Represents a method used to resolve a service at runtime. During initializing a typed accessor is registered for each service configured using ServiceConfigurationAttribute.

Namespace: EPiServer.ServiceLocation
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public delegate TService ServiceAccessor<out TService>();
Returns
Type Description
TService

An instance of the service resolved at runtime.

Type Parameters
Name Description
TService

The type of service to access.

Constructors

ServiceAccessor(Object, IntPtr)

Declaration
public ServiceAccessor(object object, IntPtr method)
Parameters
Type Name Description
System.Object object
System.IntPtr method

Methods

BeginInvoke(AsyncCallback, Object)

Declaration
public virtual IAsyncResult BeginInvoke(AsyncCallback callback, object object)
Parameters
Type Name Description
System.AsyncCallback callback
System.Object object
Returns
Type Description
System.IAsyncResult

EndInvoke(IAsyncResult)

Declaration
public virtual TService EndInvoke(IAsyncResult result)
Parameters
Type Name Description
System.IAsyncResult result
Returns
Type Description
TService

Invoke()

Declaration
public virtual TService Invoke()
Returns
Type Description
TService

Extension Methods