< Summary

Class:Azure.Storage.Blobs.Models.AppendBlobRequestConditions
Assembly:Azure.Storage.Blobs
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs\src\Models\AppendBlobRequestConditions.cs
Covered lines:2
Uncovered lines:6
Coverable lines:8
Total lines:47
Line coverage:25% (2 of 8)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_IfAppendPositionEqual()-100%100%
get_IfMaxSizeLessThanOrEqual()-100%100%
AddConditions(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs\src\Models\AppendBlobRequestConditions.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 append blob specific access conditions.
 11    /// </summary>
 12    public class AppendBlobRequestConditions : BlobRequestConditions
 13    {
 14        /// <summary>
 15        /// IfAppendPositionEqual ensures that the AppendBlock operation
 16        /// succeeds only if the append position is equal to a value.
 17        /// </summary>
 42418        public long? IfAppendPositionEqual { get; set; }
 19
 20        /// <summary>
 21        /// IfMaxSizeLessThanOrEqual ensures that the AppendBlock operation
 22        /// succeeds only if the append blob's size is less than or equal to
 23        /// a value.
 24        /// </summary>
 37225        public long? IfMaxSizeLessThanOrEqual { get; set; }
 26
 27        /// <summary>
 28        /// Collect any request conditions.  Conditions should be separated by
 29        /// a semicolon.
 30        /// </summary>
 31        /// <param name="conditions">The collected conditions.</param>
 32        internal override void AddConditions(StringBuilder conditions)
 33        {
 034            base.AddConditions(conditions);
 35
 036            if (IfAppendPositionEqual != null)
 37            {
 038                conditions.Append(nameof(IfAppendPositionEqual)).Append('=').Append(IfAppendPositionEqual).Append(';');
 39            }
 40
 041            if (IfMaxSizeLessThanOrEqual != null)
 42            {
 043                conditions.Append(nameof(IfMaxSizeLessThanOrEqual)).Append('=').Append(IfMaxSizeLessThanOrEqual).Append(
 44            }
 045        }
 46    }
 47}