private void DiscoveredUserInfo (CKDiscoveredUserInfo user)
		{
			if (user == null)
				name.Text = "Anonymous";
			else
				name.Text = string.Format ("{0} {1}", user.FirstName, user.LastName);
		}
Exemple #2
0
 void DiscoveredUserInfo(CKDiscoveredUserInfo user)
 {
     if (user == null)
     {
         name.Text = "Anonymous";
     }
     else
     {
         name.Text = string.Format("{0} {1}", user.FirstName, user.LastName);
     }
 }
Exemple #3
0
        public async override Task <Results> Run()
        {
            object emailAddress;

            if (!Data.TryGetValue("emailAddress", out emailAddress))
            {
                throw new InvalidProgramException();
            }

            var container = CKContainer.DefaultContainer;
            CKDiscoveredUserInfo userInfo = await container.DiscoverUserInfoAsync((string)emailAddress);

            return(new Results(new IResult [] { new CKDiscoveredUserInfoWrapper(userInfo) }));
        }
        public async override Task <Results> Run()
        {
            object recordName, zoneName;

            if (Data.TryGetValue("recordName", out recordName) && Data.TryGetValue("zoneName", out zoneName))
            {
                var container    = CKContainer.DefaultContainer;
                var zoneId       = new CKRecordZoneID((string)zoneName, CKContainer.OwnerDefaultName);
                var userRecordID = new CKRecordID((string)recordName, zoneId);

                CKDiscoveredUserInfo userInfo = await container.DiscoverUserInfoAsync(userRecordID);

                return(new Results(new IResult [] { new CKDiscoveredUserInfoWrapper(userInfo) }));
            }
            throw new InvalidProgramException("there are no recordName and zoneName");
        }
 public CKDiscoveredUserInfoWrapper(CKDiscoveredUserInfo userInfo)
 {
     this.userInfo = userInfo;
 }
		public CKDiscoveredUserInfoWrapper (CKDiscoveredUserInfo userInfo)
		{
			this.userInfo = userInfo;
		}