< Summary

Class:Microsoft.Azure.ServiceBus.TrueFilter
Assembly:Microsoft.Azure.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Microsoft.Azure.ServiceBus\src\Filters\TrueFilter.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:65
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
.cctor()-0%100%
.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\TrueFilter.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 all the messages arriving to be selected for the subscription.
 8    /// </summary>
 9    public sealed class TrueFilter : SqlFilter
 10    {
 011        internal static readonly TrueFilter Default = new TrueFilter();
 12
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="TrueFilter" /> class.
 15        /// </summary>
 16        public TrueFilter()
 017            : base("1=1")
 18        {
 019        }
 20
 21        /// <summary>
 22        /// Converts the value of the current instance to its equivalent string representation.
 23        /// </summary>
 24        /// <returns>A string representation of the current instance.</returns>
 25        public override string ToString()
 26        {
 027            return "TrueFilter";
 28        }
 29
 30        public override int GetHashCode()
 31        {
 032            return base.GetHashCode();
 33        }
 34
 35        public override bool Equals(object obj)
 36        {
 037            return obj is TrueFilter;
 38        }
 39
 40        public override bool Equals(Filter other)
 41        {
 042            return other is TrueFilter;
 43        }
 44
 45        public static bool operator ==(TrueFilter o1, TrueFilter o2)
 46        {
 047            if (ReferenceEquals(o1, o2))
 48            {
 049                return true;
 50            }
 51
 052            if (ReferenceEquals(o1, null) || ReferenceEquals(o2, null))
 53            {
 054                return false;
 55            }
 56
 057            return o1.Equals(o2);
 58        }
 59
 60        public static bool operator !=(TrueFilter o1, TrueFilter o2)
 61        {
 062            return !(o1 == o2);
 63        }
 64    }
 65}