////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>Allows an application to get all the user context information.
        /// Information blocks can be filtered using the data set.</summary>
        /// <param name="userIdType">The customer Identifier: Type and Value.
        /// Whom information is going to be retrieved.</param>
        /// <param name="dataSet">Array of DataSet enumerators (the blocks to be retrieved).
        /// If null this function will return all info.</param>
        /// <returns>Object containing the blocks of user context information you've selected.</returns>
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        protected UserInfo GetUserInfo(Directory.Schemas.UserIdType userIdType, DirectoryDataSets[] dataSet)
        {
            var parameters = CreateParameters();

            if (dataSet != null)
            {
                parameters.Add("dataSets", HttpTools.CovertEnumToQueryParameter(dataSet));
            }

            //Dont need to select the apropiate parser/serializer for the operation:

            //The Bluevia´s complex response object, as result of the call:
            UserInfoType userInfoResponse = BaseRetrieve<UserInfoType>(
                DirectoryTools.CreateDirectoryServiceURL(userIdType, url, "")
                , parameters);

            return DirectorySimplifiers.SimplifyUserInfoType(userInfoResponse);
        }
Exemplo n.º 2
0
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>Allows an application to get all the user context information. Applications 
 /// will only be able to retrieve directory information on themselves.</summary>
 /// <param name="dataSet">Optional:An array of the Directory Info blocks to be retrieved.
 /// If not included this function will return all info.</param>
 /// <returns>An object containing the requested blocks of user context information.</returns>
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 public Schemas.UserInfo GetUserInfo(DirectoryDataSets[] dataSet = null)
 {
     return base.GetUserInfo(new Directory.Schemas.UserIdType(UserType.alias, connector.GetToken()), dataSet);
 }