Facebook.Session.ToDictionary C# (CSharp) Method

ToDictionary() public method

public ToDictionary ( ) : string>.Dictionary
return string>.Dictionary
        public Dictionary<string, string> ToDictionary()
        {
            var expires = Expires == DateTime.MaxValue ? "0" : ((long)(Expires - s_unixStart).TotalSeconds).ToString(CultureInfo.InvariantCulture);

            var dict = new Dictionary<string, string>(6);
            if (UserId > default(long))
                dict.Add("uid", UserId.ToString(CultureInfo.InvariantCulture));
            dict.Add("access_token", OAuthToken);
            dict.Add("expires", expires);

            if (!String.IsNullOrEmpty(Secret))
                dict.Add("secret", Secret);
#pragma warning disable 612,618
            if (!String.IsNullOrEmpty(SessionKey))
                dict.Add("session_key", SessionKey);
#pragma warning restore 612,618
            if (!String.IsNullOrEmpty(Signature))
                dict.Add("sig", Signature);

            return dict;
        }