public static Business.FindBlobParameters TranslateFromServiceToBusiness(DataContracts.FindBlobParameters serviceItem) { if (serviceItem == null) { return null; } Business.FindBlobParameters businessItem = new Business.FindBlobParameters(); businessItem.ContainerName = serviceItem.ContainerName; businessItem.BlobName = serviceItem.BlobName; return businessItem; }
public FindBlobResponse FindBlob(FindBlobRequest request) { lock (findBlobActionLock) { if (findBlobAction == null) { findBlobAction = PolicyInjection.Create <BusinessActions.FindBlobAction>(); } } request.FindBlobParameters.ContainerName = GetUserContainerName(request.FindBlobParameters.ContainerName); BusinessEntities.FindBlobParameters parameters = FindBlobParametersTranslator.TranslateFromServiceToBusiness(request.FindBlobParameters); BusinessEntities.FindBlobResult result = findBlobAction.Execute(parameters); FindBlobResponse response = new FindBlobResponse(); response.FindBlobResult = FindBlobResultTranslator.TranslateFromBusinessToService(result); return(response); }
public static DataContracts.FindBlobParameters TranslateFromBusinessToService(Business.FindBlobParameters businessItem) { if (businessItem == null) { return null; } DataContracts.FindBlobParameters serviceItem = new DataContracts.FindBlobParameters(); serviceItem.ContainerName = businessItem.ContainerName; serviceItem.BlobName = businessItem.BlobName; return serviceItem; }