alielie
2026-09-10 f3889f2d36c50cf99468594854def9b7ed069fb5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Runtime.Serialization;
using DynamicExpresso.Resources;
 
namespace DynamicExpresso.Exceptions
{
    [Serializable]
    public class NoApplicableMethodException : ParseException
    {
        public NoApplicableMethodException(string methodName, string methodTypeName, int position)
            : base(string.Format(ErrorMessages.InvalidMethodCall2, methodName, methodTypeName), position)
        {
            MethodTypeName = methodTypeName;
            MethodName = methodName;
        }
 
        public string MethodTypeName { get; private set; }
        public string MethodName { get; private set; }
 
        protected NoApplicableMethodException(
            SerializationInfo info,
            StreamingContext context)
            : base(info, context)
        {
            MethodTypeName = info.GetString("MethodTypeName");
            MethodName = info.GetString("MethodName");
        }
 
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("MethodName", MethodName);
            info.AddValue("MethodTypeName", MethodTypeName);
 
            base.GetObjectData(info, context);
        }
    }
}