Table of Contents

Method EnsureCurrent

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

EnsureCurrent()

Stellt sicher, dass ein Context verfügbar ist und gibt diesen Zurück. Wirft eine NoGlobalContextException wenn der Code außerhalb eines GlobalContext ausgeführt wird.

public static IGlobalObjects EnsureCurrent()

Returns

IGlobalObjects

Das aktuelle GlobalObject

Remarks

Der Rückgabe-Typ ist das Basis-Interface IGlobalObjects. Um auf den korrekten Typ FSGlobalObjects zuzugreifen kann stattdessen FSGlobal.EnsureCurrent() verwendet werden.

Exceptions

NoGlobalContextException

Es ist aktuell kein GlobalContext vohanden.