コード例 #1
0
        protected ParentAbstract(ParentAbstract other)
        {
            DoSomething();  // Noncompliant
            this.DoSomething();  // Noncompliant
            other.DoSomething(); // Compliant

            var a = this;
            a.DoSomething(); // Not recognized

            var action = new Action(() => { DoSomething(); });
        }
コード例 #2
0
        protected ParentAbstract(ParentAbstract other)
        {
            DoSomething();  // Noncompliant {{Remove this call from a constructor to the overridable "DoSomething" method.}}
//          ^^^^^^^^^^^
            this.DoSomething();  // Noncompliant
            other.DoSomething(); // Compliant

            var a = this;
            a.DoSomething(); // Not recognized

            var action = new Action(() => { DoSomething(); });
        }
コード例 #3
0
        protected ParentAbstract(ParentAbstract other)
        {
            DoSomething();       // Noncompliant
            this.DoSomething();  // Noncompliant
            other.DoSomething(); // Compliant

            var a = this;

            a.DoSomething(); // Not recognized

            var action = new Action(() => { DoSomething(); });
        }
コード例 #4
0
        protected ParentAbstract(ParentAbstract other)
        {
            DoSomething();       // Noncompliant {{Remove this call from a constructor to the overridable 'DoSomething' method.}}
//          ^^^^^^^^^^^
            this.DoSomething();  // Noncompliant
            other.DoSomething(); // Compliant

            var a = this;

            a.DoSomething(); // Not recognized

            var action = new Action(() => { DoSomething(); });
        }