internal ListBlobsFlatSegmentResponse(string serviceEndpoint, string containerName, string prefix, string marker, int?maxResults, BlobFlatListSegment segment, string nextMarker)
 {
     ServiceEndpoint = serviceEndpoint;
     ContainerName   = containerName;
     Prefix          = prefix;
     Marker          = marker;
     MaxResults      = maxResults;
     Segment         = segment;
     NextMarker      = nextMarker;
 }
        internal ListBlobsFlatSegmentResponse(string serviceEndpoint, string containerName, BlobFlatListSegment segment)
        {
            if (serviceEndpoint == null)
            {
                throw new ArgumentNullException(nameof(serviceEndpoint));
            }
            if (containerName == null)
            {
                throw new ArgumentNullException(nameof(containerName));
            }
            if (segment == null)
            {
                throw new ArgumentNullException(nameof(segment));
            }

            ServiceEndpoint = serviceEndpoint;
            ContainerName   = containerName;
            Segment         = segment;
        }
示例#3
0
        internal static ListBlobsFlatSegmentResponse DeserializeListBlobsFlatSegmentResponse(XElement element)
        {
            string serviceEndpoint      = default;
            string containerName        = default;
            string prefix               = default;
            string marker               = default;
            int?   maxResults           = default;
            BlobFlatListSegment segment = default;
            string nextMarker           = default;

            if (element.Attribute("ServiceEndpoint") is XAttribute serviceEndpointAttribute)
            {
                serviceEndpoint = (string)serviceEndpointAttribute;
            }
            if (element.Attribute("ContainerName") is XAttribute containerNameAttribute)
            {
                containerName = (string)containerNameAttribute;
            }
            if (element.Element("Prefix") is XElement prefixElement)
            {
                prefix = (string)prefixElement;
            }
            if (element.Element("Marker") is XElement markerElement)
            {
                marker = (string)markerElement;
            }
            if (element.Element("MaxResults") is XElement maxResultsElement)
            {
                maxResults = (int?)maxResultsElement;
            }
            if (element.Element("Blobs") is XElement blobsElement)
            {
                segment = BlobFlatListSegment.DeserializeBlobFlatListSegment(blobsElement);
            }
            if (element.Element("NextMarker") is XElement nextMarkerElement)
            {
                nextMarker = (string)nextMarkerElement;
            }
            return(new ListBlobsFlatSegmentResponse(serviceEndpoint, containerName, prefix, marker, maxResults, segment, nextMarker));
        }