Microsoft.Protocols.TestSuites.MS_AUTHWS.TestSuiteBase.GetCookieNumber C# (CSharp) Method

GetCookieNumber() protected method

This method is used to get count of the cookies exist on the server.
protected GetCookieNumber ( CookieContainer cookieContainer ) : int
cookieContainer System.Net.CookieContainer The cookie container which contains the specified cookie.
return int
        protected int GetCookieNumber(CookieContainer cookieContainer)
        {
            CookieCollection cookieCollection = cookieContainer.GetCookies(new Uri(this.GetFormsAuthenticationServiceUrl()));
            if (cookieCollection != null)
            {
                return cookieCollection.Count;
            }
            else
            {
                return 0;
            }
        }