src/ApprienUnitySDK/Assets/Apprien/Editor/ApprienConnectionTester.cs
/// <summary>
/// Perform an availability check for the Apprien service and test the validity of the token.
/// </summary>
/// <param name="callback">The first parameter is true if Apprien is reachable. The second parameter is true if the provided token is valid</param>
/// <returns>Returns an IEnumerator that can be forwarded manually or passed to StartCoroutine</returns>
Perform an availability check for the Apprien service and test the validity of the token.
Perform an availability check for the Apprien service and test the validity of the token .
public IEnumerator TestConnection(Action<bool, bool> callback)
        {
            var statusCheck = CheckServiceStatus();
            var tokenCheck = CheckTokenValidity();
            while (statusCheck.MoveNext() || tokenCheck.MoveNext())
            {
                yield return null;
            }
            if (callback != null)
            {
                callback((bool) statusCheck.Current, (bool) tokenCheck.Current);
            }
        }
public IEnumerator TestConnection ( Action < bool , bool > callback ) { var statusCheck = CheckServiceStatus ( ) ; var tokenCheck = CheckTokenValidity ( ) ; while ( statusCheck . MoveNext ( ) || tokenCheck . MoveNext ( ) ) { yield return null ; } if ( callback != null ) { callback ( ( bool ) statusCheck . Current , ( bool ) tokenCheck . Current ) ; } }
Perform an availability check for the Apprien service and test the validity of the token.
Perform an availability check for the Apprien service and test the validity of the token .
// Check service status and validate the token // The two request IEnumerators will resolve to a boolean value in the end // Inform the calling component that Apprien is online
Returns an IEnumerator that can be forwarded manually or passed to StartCoroutine
Returns an IEnumerator that can be forwarded manually or passed to StartCoroutine
callback
Action<bool, bool>
The first parameter is true if Apprien is reachable. The second parameter is true if the provided token is valid
The first parameter is true if Apprien is reachable . The second parameter is true if the provided token is valid