public static Business.CreateOrUpdateBlobParameters TranslateFromServiceToBusiness(DataContracts.CreateOrUpdateBlobParameters serviceItem)
        {
            if (serviceItem == null)
            {
                return(null);
            }

            Business.CreateOrUpdateBlobParameters businessItem = new Business.CreateOrUpdateBlobParameters();
            businessItem.ContainerName = serviceItem.ContainerName;
            businessItem.Blobs         = BlobCollectionTranslator.TranslateFromServiceToBusiness(serviceItem.Blobs);

            return(businessItem);
        }
        public CreateOrUpdateBlobResponse CreateOrUpdateBlob(CreateOrUpdateBlobRequest request)
        {
            lock (createOrUpdateBlobActionLock)
            {
                if (createOrUpdateBlobAction == null)
                {
                    createOrUpdateBlobAction = PolicyInjection.Create <BusinessActions.CreateOrUpdateBlobAction>();
                }
            }

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

            BusinessEntities.CreateOrUpdateBlobParameters parameters = CreateOrUpdateBlobParametersTranslator.TranslateFromServiceToBusiness(request.CreateOrUpdateBlobParameters);
            BusinessEntities.CreateOrUpdateBlobResult     result     = createOrUpdateBlobAction.Execute(parameters);

            CreateOrUpdateBlobResponse response = new CreateOrUpdateBlobResponse();

            response.CreateOrUpdateBlobResult = CreateOrUpdateBlobResultTranslator.TranslateFromBusinessToService(result);

            return(response);
        }
        public static DataContracts.CreateOrUpdateBlobParameters TranslateFromBusinessToService(Business.CreateOrUpdateBlobParameters businessItem)
        {
            if (businessItem == null)
            {
                return(null);
            }

            DataContracts.CreateOrUpdateBlobParameters serviceItem = new DataContracts.CreateOrUpdateBlobParameters();
            serviceItem.ContainerName = businessItem.ContainerName;
            serviceItem.Blobs         = BlobCollectionTranslator.TranslateFromBusinessToService(businessItem.Blobs);

            return(serviceItem);
        }