protected override object ExecuteSearchAsync(object parameters)
        {
            object data = null;


            viewParameters = parameters as FindOutputManagersParameters;


            FindOutputManagersRequest serviceRequest = new FindOutputManagersRequest();

            serviceRequest.FindOutputManagersParameters = new FindOutputManagersParameters();

            _backendCallIsRunning = true;

            FindOutputManagersResponse serviceResponse = Service.FindOutputManagers(serviceRequest);

            if ((serviceResponse != null) && (serviceResponse.FindOutputManagerResult != null))
            {
                data = serviceResponse.FindOutputManagerResult;
            }



            return(data);
        }
        public FindOutputManagersResponse FindOutputManagers(FindOutputManagersRequest request)
        {
            IClaimsIdentity identity = (IClaimsIdentity)Thread.CurrentPrincipal.Identity;
            string          upn      = identity.Claims.FindAll(c => { return(c.ClaimType == ClaimTypes.Upn); }).First().Value;

            InitializationActions.FindOutputManagersAction action = PolicyInjection.Create <InitializationActions.FindOutputManagersAction>();

            InitializationEntities.FindOutputManagersParameters parameters = Translators.FindOutputManagersTranslator.TranslateFromServiceToBusiness(request.FindOutputManagersParameters);

            //parameters.UserPrincipalIdentity = upn; /* user@domain */
            //parameters.UserIdentity = upn.Split('@')[0];


            InitializationEntities.FindOutputManagersResult r = action.Execute();

            FindOutputManagersResponse response = new FindOutputManagersResponse();

            response.FindOutputManagerResult = GenericMapper.MapNew <DataContracts.FindOutputManagerResult>(r);

            response.FindOutputManagerResult.OutputManagers =
                GenericMapper.MapListNew <DataContracts.OutputManagerCollection, InitializationEntities.FindOutputManagerResult, DataContracts.OutputManager>(
                    r.OutputManagers, Translators.FindOutputManagersTranslator.TranslateFromBusinessToService);


            return(response);
        }
        public FindOutputManagersResponse FindOutputManagers(FindOutputManagersRequest request)
        {
            InitializationServiceAdapter adapter = PolicyInjection.Create <InitializationServiceAdapter>();

            return(adapter.FindOutputManagers(request));
        }