public MiiCardAuthorisationSuccessEventArgs(string accessToken, string accessTokenSecret, IDictionary<string, string> extraInfo, MiiUserProfile userProfile)
        {
            this.AccessToken = accessToken;
            this.AccessTokenSecret = accessTokenSecret;

            this.ExtraInfo = extraInfo;
            this.UserProfile = userProfile;
        }
        public MiiCardAuthorisationSuccessEventArgs(string accessToken, string accessTokenSecret, IDictionary <string, string> extraInfo, MiiUserProfile userProfile)
        {
            this.AccessToken       = accessToken;
            this.AccessTokenSecret = accessTokenSecret;

            this.ExtraInfo   = extraInfo;
            this.UserProfile = userProfile;
        }
Exemplo n.º 3
0
        public static string RenderUserProfile(MiiUserProfile profile)
        {
            string toReturn = "<div class='fact'>";

            toReturn += "<h2>User profile</h2>";
            toReturn += RenderFact("Username", profile.Username);
            toReturn += RenderFact("Salutation", profile.Salutation);
            toReturn += RenderFact("First name", profile.FirstName);
            toReturn += RenderFact("Middle name", profile.MiddleName);
            toReturn += RenderFact("Last name", profile.LastName);
            toReturn += RenderFact("Date of birth", profile.DateOfBirth);
            toReturn += RenderFact("Identity verified?", profile.IdentityAssured);
            toReturn += RenderFact("Identity last verified?", profile.LastVerified);
            toReturn += RenderFact("Has a public profile?", profile.HasPublicProfile);
            toReturn += RenderFact("Previous first name", profile.PreviousFirstName);
            toReturn += RenderFact("Previous middle name", profile.PreviousMiddleName);
            toReturn += RenderFact("Previous last name", profile.PreviousLastName);
            toReturn += RenderFact("Profile URL", profile.ProfileUrl);
            toReturn += RenderFact("Profile short URL", profile.ProfileShortUrl);
            toReturn += RenderFact("Card image URL", profile.CardImageUrl);
            toReturn += RenderFactHeading("Postal addresses");

            int ct = 0;

            if (profile.PostalAddresses != null)
            {
                foreach (var address in profile.PostalAddresses)
                {
                    toReturn += "<div class='fact'><h4>[" + ct++ + "]</h4>";
                    toReturn += RenderAddress(address);
                    toReturn += "</div>";
                }
            }

            toReturn += RenderFactHeading("Phone numbers");
            ct        = 0;

            if (profile.PhoneNumbers != null)
            {
                foreach (var number in profile.PhoneNumbers)
                {
                    toReturn += "<div class='fact'><h4>[" + ct++ + "]</h4>";
                    toReturn += RenderPhone(number);
                    toReturn += "</div>";
                }
            }

            toReturn += RenderFactHeading("Email addresses");
            ct        = 0;

            if (profile.EmailAddresses != null)
            {
                foreach (var address in profile.EmailAddresses)
                {
                    toReturn += "<div class='fact'><h4>[" + ct++ + "]</h4>";
                    toReturn += RenderEmail(address);
                    toReturn += "</div>";
                }
            }

            toReturn += RenderFactHeading("Internet identities");
            ct        = 0;

            if (profile.Identities != null)
            {
                foreach (Identity identity in profile.Identities)
                {
                    toReturn += "<div class='fact'><h4>[" + ct++ + "]</h4>";
                    toReturn += RenderIdentity(identity);
                    toReturn += "</div>";
                }
            }

            if (profile.PublicProfile != null)
            {
                toReturn += "<div class='fact'>";
                toReturn += RenderUserProfile(profile.PublicProfile);
                toReturn += "</div>";
            }

            toReturn += "</div>";

            return(toReturn);
        }