< Summary

Class:Microsoft.Azure.ServiceBus.FalseFilter
Assembly:Microsoft.Azure.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Microsoft.Azure.ServiceBus\src\Filters\FalseFilter.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:63
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-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\Microsoft.Azure.ServiceBus\src\Filters\FalseFilter.cs

#LineLine coverage
 1// Copyright (c) Microsoft. All rights reserved.
 2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
 3
 4namespace Microsoft.Azure.ServiceBus
 5{
 6    /// <summary>
 7    /// Matches none the messages arriving to be selected for the subscription.
 8    /// </summary>
 9    public sealed class FalseFilter : SqlFilter
 10    {
 11        /// <summary>
 12        /// Initializes a new instance of the <see cref="FalseFilter" /> class.
 13        /// </summary>
 14        public FalseFilter()
 015            : base("1=0")
 16        {
 017        }
 18
 19        /// <summary>
 20        /// Converts the current instance to its string representation.
 21        /// </summary>
 22        /// <returns>A string representation of the current instance.</returns>
 23        public override string ToString()
 24        {
 025            return "FalseFilter";
 26        }
 27
 28        public override int GetHashCode()
 29        {
 030            return base.GetHashCode();
 31        }
 32
 33        public override bool Equals(object obj)
 34        {
 035            return obj is FalseFilter;
 36        }
 37
 38        public override bool Equals(Filter other)
 39        {
 040            return other is FalseFilter;
 41        }
 42
 43        public static bool operator ==(FalseFilter o1, FalseFilter o2)
 44        {
 045            if (ReferenceEquals(o1, o2))
 46            {
 047                return true;
 48            }
 49
 050            if (ReferenceEquals(o1, null) || ReferenceEquals(o2, null))
 51            {
 052                return false;
 53            }
 54
 055            return o1.Equals(o2);
 56        }
 57
 58        public static bool operator !=(FalseFilter o1, FalseFilter o2)
 59        {
 060            return !(o1 == o2);
 61        }
 62    }
 63}