Пример #1
0
 internal BlobItemInternal(string name, bool deleted, string snapshot, string versionId, bool?isCurrentVersion, BlobPropertiesInternal properties, string deletionId)
 {
     Name             = name;
     Deleted          = deleted;
     Snapshot         = snapshot;
     VersionId        = versionId;
     IsCurrentVersion = isCurrentVersion;
     Properties       = properties;
     DeletionId       = deletionId;
 }
Пример #2
0
        internal BlobItemInternal(string name, bool deleted, string snapshot, BlobPropertiesInternal properties)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (snapshot == null)
            {
                throw new ArgumentNullException(nameof(snapshot));
            }
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Name       = name;
            Deleted    = deleted;
            Snapshot   = snapshot;
            Properties = properties;
        }
Пример #3
0
        internal static BlobItemInternal DeserializeBlobItemInternal(XElement element)
        {
            string name                       = default;
            bool   deleted                    = default;
            string snapshot                   = default;
            string versionId                  = default;
            bool?  isCurrentVersion           = default;
            BlobPropertiesInternal properties = default;
            string deletionId                 = default;

            if (element.Element("Name") is XElement nameElement)
            {
                name = (string)nameElement;
            }
            if (element.Element("Deleted") is XElement deletedElement)
            {
                deleted = (bool)deletedElement;
            }
            if (element.Element("Snapshot") is XElement snapshotElement)
            {
                snapshot = (string)snapshotElement;
            }
            if (element.Element("VersionId") is XElement versionIdElement)
            {
                versionId = (string)versionIdElement;
            }
            if (element.Element("IsCurrentVersion") is XElement isCurrentVersionElement)
            {
                isCurrentVersion = (bool?)isCurrentVersionElement;
            }
            if (element.Element("Properties") is XElement propertiesElement)
            {
                properties = BlobPropertiesInternal.DeserializeBlobPropertiesInternal(propertiesElement);
            }
            if (element.Element("DeletionId") is XElement deletionIdElement)
            {
                deletionId = (string)deletionIdElement;
            }
            return(new BlobItemInternal(name, deleted, snapshot, versionId, isCurrentVersion, properties, deletionId));
        }