Esempio n. 1
0
        public static Business.DeleteContainerParameters TranslateFromServiceToBusiness(DataContracts.DeleteContainerParameters serviceItem)
        {
            if (serviceItem == null)
            {
                return(null);
            }

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

            return(businessItem);
        }
        public DeleteContainerResponse DeleteContainer(DeleteContainerRequest request)
        {
            lock (deleteContainerActionLock)
            {
                if (deleteContainerAction == null)
                {
                    deleteContainerAction = PolicyInjection.Create <BusinessActions.DeleteContainerAction>();
                }
            }

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

            BusinessEntities.DeleteContainerParameters parameters = DeleteContainerParametersTranslator.TranslateFromServiceToBusiness(request.DeleteContainerParameters);
            BusinessEntities.DeleteContainerResult     result     = deleteContainerAction.Execute(parameters);

            DeleteContainerResponse response = new DeleteContainerResponse();

            response.DeleteContainerResult = DeleteContainerResultTranslator.TranslateFromBusinessToService(result);

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

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

            return(serviceItem);
        }