Goedel.Mesh.MeshClient.GetPersonalProfile C# (CSharp) Method

GetPersonalProfile() public method

Get the active profile associated with the current account.
public GetPersonalProfile ( ) : SignedPersonalProfile
return SignedPersonalProfile
        public SignedPersonalProfile GetPersonalProfile() {
            if (AccountID == null) return null;

            var GetRequest = new GetRequest ();
            GetRequest.Account = AccountID;
            GetRequest.Multiple = false;

            var GetResponse = MeshService.Get(GetRequest);

            if (GetResponse.Entries.Count == 0) { return null; }

            _SignedPersonalProfile = GetResponse.Entries[0] as SignedPersonalProfile;

            if (PersonalProfile != null) {
                PersonalProfile.SignedDeviceProfile = SignedDeviceProfile;
                }
            return _SignedPersonalProfile;
            }

Usage Example

        /// <summary>
        /// Create a MeshClient for the specified portal and request the specified 
        /// account.
        /// </summary>
        /// <param name="Portal">Mesh Portal.</param>
        /// <param name="Account">Mesh Account.</param>
        /// <returns>UDF of the personal profile.</returns>
        public string GetAccount (string Portal, string Account) {

            // Attempt to connect to portal and connect to account.

            this.Portal = Portal;
            this.AccountName = Account;

            MeshClient = new MeshClient(Portal, AccountID);
            SignedPersonalProfile = MeshClient.GetPersonalProfile();
            if (SignedPersonalProfile == null) return null;
            return SignedPersonalProfile.UDF;
            }
All Usage Examples Of Goedel.Mesh.MeshClient::GetPersonalProfile