ALMRestClient.ALMClient.GetExistingSessionMethod C# (CSharp) Method

GetExistingSessionMethod() private method

Determines the current session state and returns the correct action to continue working the same session
private GetExistingSessionMethod ( ) : RestSharp.Method
return RestSharp.Method
        private RestSharp.Method GetExistingSessionMethod()
        {
            bool reuseSession = false;

            if (FindCookie(client, clientConfig.SessionCookieName, (cookie) =>
            {
                reuseSession = cookie.TimeStamp.AddMinutes(60) > DateTime.Now;
            }) == false)
            {
                reuseSession = false;
            }

            if (reuseSession == true)
            {
                return RestSharp.Method.GET;
            }
            else
            {
                return RestSharp.Method.POST;
            }
        }