< Summary

Class:Azure.Storage.Blobs.Models.PageBlobRequestConditions
Assembly:Azure.Storage.Blobs
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs\src\Models\PageBlobRequestConditions.cs
Covered lines:3
Uncovered lines:8
Coverable lines:11
Total lines:58
Line coverage:27.2% (3 of 11)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_IfSequenceNumberLessThan()-100%100%
get_IfSequenceNumberLessThanOrEqual()-100%100%
get_IfSequenceNumberEqual()-100%100%
AddConditions(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs\src\Models\PageBlobRequestConditions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Text;
 6
 7namespace Azure.Storage.Blobs.Models
 8{
 9    /// <summary>
 10    /// Specifies page blob specific access conditions.
 11    /// </summary>
 12    public class PageBlobRequestConditions : BlobRequestConditions
 13    {
 14        /// <summary>
 15        /// IfSequenceNumberLessThan ensures that the page blob operation
 16        /// succeeds only if the blob's sequence number is less than a value.
 17        /// </summary>
 49618        public long? IfSequenceNumberLessThan { get; set; }
 19
 20        /// <summary>
 21        /// IfSequenceNumberLessThanOrEqual ensures that the page blob
 22        /// operation succeeds only if the blob's sequence number is less than
 23        /// or equal to a value.
 24        /// </summary>
 49625        public long? IfSequenceNumberLessThanOrEqual { get; set; }
 26
 27        /// <summary>
 28        /// IfSequenceNumberEqual ensures that the page blob operation
 29        /// succeeds only if the blob's sequence number is equal to a value.
 30        /// </summary>
 49631        public long? IfSequenceNumberEqual { get; set; }
 32
 33        /// <summary>
 34        /// Collect any request conditions.  Conditions should be separated by
 35        /// a semicolon.
 36        /// </summary>
 37        /// <param name="conditions">The collected conditions.</param>
 38        internal override void AddConditions(StringBuilder conditions)
 39        {
 040            base.AddConditions(conditions);
 41
 042            if (IfSequenceNumberLessThan != null)
 43            {
 044                conditions.Append(nameof(IfSequenceNumberLessThan)).Append('=').Append(IfSequenceNumberLessThan).Append(
 45            }
 46
 047            if (IfSequenceNumberLessThanOrEqual != null)
 48            {
 049                conditions.Append(nameof(IfSequenceNumberLessThanOrEqual)).Append('=').Append(IfSequenceNumberLessThanOr
 50            }
 51
 052            if (IfSequenceNumberEqual != null)
 53            {
 054                conditions.Append(nameof(IfSequenceNumberEqual)).Append('=').Append(IfSequenceNumberEqual).Append(';');
 55            }
 056        }
 57    }
 58}