Пример #1
0
        public override ProblemCollection Check(Member member)
        {
            if (member.DeclaringType.DeclaringModule.ContainingAssembly.IsDataDll())
            {
                lock (_currentMemberLock)
                {
                    _currentMember = member;

                    _problemRound = false;
                    _dirty        = new DirtySafeCollection()
                    {
                        SafetyPass = true
                    };
                    _params = new HashSet <int>();

                    var meth = member as Method;
                    if (meth != null && meth.Parameters != null)
                    {
                        VisitParameters(meth.Parameters);
                    }

                    do
                    {
                        _dirty.Updated = false;
                        VisitMethodCallStatements(member);
                    } while (_dirty.Updated); //keep going until it stops marking new things safe

                    _dirty.SafetyPass = false;
                    do
                    {
                        _dirty.Updated = false;
                        VisitMethodCallStatements(member);
                    } while (_dirty.Updated); //keep going until it stops marking new things safe

                    _problemRound = true;
                    VisitMethodCallStatements(member);
                }
            }

            return(Problems);
        }
Пример #2
0
        public override ProblemCollection Check(Member member)
        {
            if (member.DeclaringType.DeclaringModule.ContainingAssembly.IsDataDll())
            {
                lock (_currentMemberLock)
                {
                    _currentMember = member;

                    _problemRound = false;
                    _dirty = new DirtySafeCollection() { SafetyPass = true };
                    _params = new HashSet<int>();

                    var meth = member as Method;
                    if (meth != null && meth.Parameters != null)
                    {
                        VisitParameters(meth.Parameters);
                    }

                    do
                    {
                        _dirty.Updated = false;
                        VisitMethodCallStatements(member);
                    } while (_dirty.Updated); //keep going until it stops marking new things safe

                    _dirty.SafetyPass = false;
                    do
                    {
                        _dirty.Updated = false;
                        VisitMethodCallStatements(member);
                    } while (_dirty.Updated); //keep going until it stops marking new things safe

                    _problemRound = true;
                    VisitMethodCallStatements(member);
                }
            }

            return Problems;
        }