Exemple #1
0
            public void VisitConstant(Constant constant)
            {
                Debug.Assert(!_isTarget);
                if (constant.ConstantValue == null)
                {
                    throw new ArgumentException();
                }
                Flow flow = new ValueFlow(constant.ConstantValue, _target);

                _flows.Add(flow);
            }
Exemple #2
0
        /// <summary>
        /// Returns <c>true</c> if <paramref name="obj"/> is a <c>ValueFlow</c> with same constant and same target.
        /// </summary>
        public override bool Equals(object obj)
        {
            ValueFlow other = obj as ValueFlow;

            if (other == null)
            {
                return(false);
            }
            return(Target.Equals(other.Target) &&
                   Value.Equals(other.Value));
        }