< Summary

Class:Azure.Messaging.ServiceBus.Management.FalseRuleFilter
Assembly:Azure.Messaging.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Azure.Messaging.ServiceBus\src\Management\Rules\FalseRuleFilter.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:81
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
Clone()-0%100%
ToString()-0%100%
GetHashCode()-0%100%
Equals(...)-0%100%
Equals(...)-0%100%
op_Equality(...)-0%0%
op_Inequality(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\servicebus\Azure.Messaging.ServiceBus\src\Management\Rules\FalseRuleFilter.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4namespace Azure.Messaging.ServiceBus.Management
 5{
 6    /// <summary>
 7    /// Matches none the messages arriving to be selected for the subscription.
 8    /// </summary>
 9    public sealed class FalseRuleFilter : SqlRuleFilter
 10    {
 11        /// <summary>
 12        /// Initializes a new instance of the <see cref="FalseRuleFilter" /> class.
 13        /// </summary>
 14        public FalseRuleFilter()
 015            : base("1=0")
 16        {
 017        }
 18
 19        internal override RuleFilter Clone() =>
 020            new FalseRuleFilter();
 21
 22        /// <summary>
 23        /// Converts the current instance to its string representation.
 24        /// </summary>
 25        /// <returns>A string representation of the current instance.</returns>
 26        public override string ToString()
 27        {
 028            return "FalseRuleFilter";
 29        }
 30
 31        /// <inheritdoc/>
 32        public override int GetHashCode()
 33        {
 034            return base.GetHashCode();
 35        }
 36
 37        /// <inheritdoc/>
 38        public override bool Equals(object obj)
 39        {
 040            return obj is FalseRuleFilter;
 41        }
 42
 43        /// <inheritdoc/>
 44        public override bool Equals(RuleFilter other)
 45        {
 046            return other is FalseRuleFilter;
 47        }
 48
 49        /// <summary>
 50        ///
 51        /// </summary>
 52        /// <param name="left"></param>
 53        /// <param name="right"></param>
 54        /// <returns></returns>
 55        public static bool operator ==(FalseRuleFilter left, FalseRuleFilter right)
 56        {
 057            if (ReferenceEquals(left, right))
 58            {
 059                return true;
 60            }
 61
 062            if (ReferenceEquals(left, null) || ReferenceEquals(right, null))
 63            {
 064                return false;
 65            }
 66
 067            return left.Equals(right);
 68        }
 69
 70        /// <summary>
 71        ///
 72        /// </summary>
 73        /// <param name="left"></param>
 74        /// <param name="right"></param>
 75        /// <returns></returns>
 76        public static bool operator !=(FalseRuleFilter left, FalseRuleFilter right)
 77        {
 078            return !(left == right);
 79        }
 80    }
 81}