Table of Contents

Method Context

Namespace
FS.Hosting.Shared.GlobalObj
Assembly
FS.Hosting.Shared.dll

Context(IGlobalObjects)

Spannt einen Ambient Context mit dem übergeben GlobalObject auf.

public static IDisposable Context(IGlobalObjects global)

Parameters

global IGlobalObjects

Returns

IDisposable

Remarks

Dieser Aufruf sollte immer in Verbindung mit einem using verwendet werden.

using(GlobalObjects localGlobal = FS.Hosting.Broker.Base.GlobalObjectManager.CreateGlobalObject(guid.NewGuid().Value))
{
    using(GlobalContext.Context(localGlobal))
    {
        // FSGlobal.Current hat hier den Wert localGlobal
    }
}