コード例 #1
0
            public override object Invoke(object proxy, System.Reflection.MethodInfo method, object[] args)
            {
                string message = DocumentedUtils.extractFormattedMessage(method, args);

                if (method.getAnnotation(typeof(ConsistencyReport_Warning)) == null)
                {
                    Errors++;
                    Report.error(message);
                }
                else
                {
                    Warnings++;
                    Report.warning(message);
                }
                return(null);
            }
コード例 #2
0
            /// <summary>
            /// Invoked when an inconsistency is encountered.
            /// </summary>
            /// <param name="args"> array of the items referenced from this record with which it is inconsistent. </param>
            public override object Invoke(object proxy, System.Reflection.MethodInfo method, object[] args)
            {
                string message = DocumentedUtils.extractMessage(method);

                if (method.getAnnotation(typeof(ConsistencyReport_Warning)) == null)
                {
                    Errors++;
                    args = GetRealRecords(args);
                    LogError(message, args);
                }
                else
                {
                    Warnings++;
                    args = GetRealRecords(args);
                    LogWarning(message, args);
                }
                Monitor.reported(Factory.type(), method.Name, message);
                InconsistencyReported();
                return(null);
            }