Exemplo n.º 1
0
        public static Business.FindContainerParameters TranslateFromServiceToBusiness(DataContracts.FindContainerParameters serviceItem)
        {
            if (serviceItem == null)
            {
                return(null);
            }

            Business.FindContainerParameters businessItem = new Business.FindContainerParameters();
            businessItem.ContainerName = serviceItem.ContainerName;

            return(businessItem);
        }
        public FindContainerResponse FindContainer(FindContainerRequest request)
        {
            lock (findContainerActionLock)
            {
                if (findContainerAction == null)
                {
                    findContainerAction = PolicyInjection.Create <BusinessActions.FindContainerAction>();
                }
            }

            request.FindContainerParameters.ContainerName = GetUserContainerName(request.FindContainerParameters.ContainerName);

            BusinessEntities.FindContainerParameters parameters = FindContainerParametersTranslator.TranslateFromServiceToBusiness(request.FindContainerParameters);
            BusinessEntities.FindContainerResult     result     = findContainerAction.Execute(parameters);

            FindContainerResponse response = new FindContainerResponse();

            response.FindContainerResult = FindContainerResultTranslator.TranslateFromBusinessToService(result);

            return(response);
        }
Exemplo n.º 3
0
        public static DataContracts.FindContainerParameters TranslateFromBusinessToService(Business.FindContainerParameters businessItem)
        {
            if (businessItem == null)
            {
                return(null);
            }

            DataContracts.FindContainerParameters serviceItem = new DataContracts.FindContainerParameters();
            serviceItem.ContainerName = businessItem.ContainerName;

            return(serviceItem);
        }