Esempio n. 1
0
        public HttpResponseMessage GetPartLayout(PartitionDTO partitionDto)
        {
            var partLayout = new ClientPartitionScript
            {
                profileId       = Convert.ToInt32(partitionDto.imageProfileId),
                HdNumberToGet   = Convert.ToInt32(partitionDto.hdToGet),
                NewHdSize       = partitionDto.newHdSize,
                ClientHd        = partitionDto.clientHd,
                TaskType        = partitionDto.taskType,
                partitionPrefix = partitionDto.partitionPrefix,
                clientBlockSize = Convert.ToInt32(partitionDto.lbs)
            };

            _response.Content = new StringContent(partLayout.GeneratePartitionScript(), Encoding.UTF8, "text/plain");
            return(_response);
        }
Esempio n. 2
0
        public void GetPartLayout(string imageProfileId, string hdToGet, string newHdSize, string clientHd, string taskType, string partitionPrefix, string lbs)
        {
            if (!Authorize())
            {
                return;
            }

            var partLayout = new ClientPartitionScript
            {
                profileId       = Convert.ToInt32(imageProfileId),
                HdNumberToGet   = Convert.ToInt32(hdToGet),
                NewHdSize       = newHdSize,
                ClientHd        = clientHd,
                TaskType        = taskType,
                partitionPrefix = partitionPrefix,
                clientBlockSize = Convert.ToInt32(lbs)
            };

            HttpContext.Current.Response.Write(partLayout.GeneratePartitionScript());
        }