Method Context
Context(IGlobalObjects)
Spannt einen Ambient Context mit dem übergeben GlobalObject auf.
public static IDisposable Context(IGlobalObjects global)
Parameters
globalIGlobalObjects
Returns
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
}
}