Class SimpleMainDom
Provides a simple implementation of IMainDom.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
public class SimpleMainDom : IMainDom
Properties
View SourceIsMainDom
Gets a value indicating whether the current domain is the main domain.
Declaration
public bool IsMainDom { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Acquire must be called first else this will always return false
Methods
View SourceAcquire(IApplicationShutdownRegistry)
Declaration
public bool Acquire(IApplicationShutdownRegistry hostingEnvironment)
Parameters
Type | Name | Description |
---|---|---|
IApplicationShutdownRegistry | hostingEnvironment |
Returns
Type | Description |
---|---|
System.Boolean |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Register(Nullable<Action>, Nullable<Action>, Int32)
Registers a resource that requires the current AppDomain to be the main domain to function.
Declaration
public bool Register(Action? install, Action? release, int weight = 100)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<Action> | install | An action to execute when registering. |
System.Nullable<Action> | release | An action to execute before the AppDomain releases the main domain status. |
System.Int32 | weight | An optional weight (lower goes first). |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether it was possible to register. |
Remarks
If registering is successful, then the install
action
is guaranteed to execute before the AppDomain releases the main domain status.
Stop()
Declaration
public void Stop()