Exemplo n.º 1
0
        internal ListFilesAndDirectoriesSegmentResponse(string serviceEndpoint, string shareName, string directoryPath, string prefix, FilesAndDirectoriesListSegment segment, string nextMarker)
        {
            if (serviceEndpoint == null)
            {
                throw new ArgumentNullException(nameof(serviceEndpoint));
            }
            if (shareName == null)
            {
                throw new ArgumentNullException(nameof(shareName));
            }
            if (directoryPath == null)
            {
                throw new ArgumentNullException(nameof(directoryPath));
            }
            if (prefix == null)
            {
                throw new ArgumentNullException(nameof(prefix));
            }
            if (segment == null)
            {
                throw new ArgumentNullException(nameof(segment));
            }
            if (nextMarker == null)
            {
                throw new ArgumentNullException(nameof(nextMarker));
            }

            ServiceEndpoint = serviceEndpoint;
            ShareName       = shareName;
            DirectoryPath   = directoryPath;
            Prefix          = prefix;
            Segment         = segment;
            NextMarker      = nextMarker;
        }
Exemplo n.º 2
0
        internal static ListFilesAndDirectoriesSegmentResponse DeserializeListFilesAndDirectoriesSegmentResponse(XElement element)
        {
            string serviceEndpoint = default;
            string shareName       = default;
            string shareSnapshot   = default;
            string directoryPath   = default;
            string prefix          = default;
            string marker          = default;
            int?   maxResults      = default;
            FilesAndDirectoriesListSegment segment = default;
            string nextMarker  = default;
            string directoryId = default;

            if (element.Attribute("ServiceEndpoint") is XAttribute serviceEndpointAttribute)
            {
                serviceEndpoint = (string)serviceEndpointAttribute;
            }
            if (element.Attribute("ShareName") is XAttribute shareNameAttribute)
            {
                shareName = (string)shareNameAttribute;
            }
            if (element.Attribute("ShareSnapshot") is XAttribute shareSnapshotAttribute)
            {
                shareSnapshot = (string)shareSnapshotAttribute;
            }
            if (element.Attribute("DirectoryPath") is XAttribute directoryPathAttribute)
            {
                directoryPath = (string)directoryPathAttribute;
            }
            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("Entries") is XElement entriesElement)
            {
                segment = FilesAndDirectoriesListSegment.DeserializeFilesAndDirectoriesListSegment(entriesElement);
            }
            if (element.Element("NextMarker") is XElement nextMarkerElement)
            {
                nextMarker = (string)nextMarkerElement;
            }
            if (element.Element("DirectoryId") is XElement directoryIdElement)
            {
                directoryId = (string)directoryIdElement;
            }
            return(new ListFilesAndDirectoriesSegmentResponse(serviceEndpoint, shareName, shareSnapshot, directoryPath, prefix, marker, maxResults, segment, nextMarker, directoryId));
        }
Exemplo n.º 3
0
 internal ListFilesAndDirectoriesSegmentResponse(string serviceEndpoint, string shareName, string shareSnapshot, string directoryPath, string prefix, string marker, int?maxResults, FilesAndDirectoriesListSegment segment, string nextMarker)
 {
     ServiceEndpoint = serviceEndpoint;
     ShareName       = shareName;
     ShareSnapshot   = shareSnapshot;
     DirectoryPath   = directoryPath;
     Prefix          = prefix;
     Marker          = marker;
     MaxResults      = maxResults;
     Segment         = segment;
     NextMarker      = nextMarker;
 }