src/ServiceRuntime/RoleEnvironment.php
public static function isAvailable()
    {
        try {
            self::_initialize();
        } catch (RoleEnvironmentNotAvailableException $ex) {
            return false;
        } catch (ChannelNotAvailableException $ex) {
            return false;
        }

        return self::$_runtimeClient != null;
    }
public static function isAvailable()
    {
        try {
            self::_initialize();
        } catch (RoleEnvironmentNotAvailableException $ex) {
            return false;
        } catch (ChannelNotAvailableException $ex) {
            return false;
        }

        return self::$_runtimeClient != null;
    }
public static function isAvailable ( ) { try { self :: _initialize ( ) ; } catch ( RoleEnvironmentNotAvailableException $ ex ) { return false ; } catch ( ChannelNotAvailableException $ ex ) { return false ; } return self :: $ _runtimeClient != null ; }
Indicates whether the role instance is running in the Windows Azure
environment.

@static

@return bool
Indicates whether the role instance is running in the Windows Azure environment .