示例#1
0
 public ClaimsResponse GetOpenIdProfileFields(ClaimsRequest request)
 {
     if (request == null) throw new ArgumentNullException("request");
     ClaimsResponse fields = request.CreateResponse();
     fields.BirthDate = DateOfBirth;
     fields.Country = countryDropdownList.SelectedValue;
     fields.Email = emailTextBox.Text;
     fields.FullName = fullnameTextBox.Text;
     fields.Gender = Gender;
     fields.Language = languageDropdownList.SelectedValue;
     fields.Nickname = nicknameTextBox.Text;
     fields.PostalCode = postcodeTextBox.Text;
     fields.TimeZone = timezoneDropdownList.SelectedValue;
     return fields;
 }
示例#2
0
		void parameterizedPreserveVersionFromRequest(string versionTypeUri) {
			Dictionary<string, string> fields = new Dictionary<string, string>{
				{"optional", "nickname"},
			};
			var req = new ClaimsRequest();
			Assert.IsTrue(((IExtensionRequest)req).Deserialize(fields, null, versionTypeUri));
			Assert.AreEqual(DemandLevel.Request, req.Nickname);
			ClaimsResponse resp = req.CreateResponse();
			Assert.AreEqual(versionTypeUri, ((IExtensionResponse)resp).TypeUri);
		}