private SortedList <int, MethodInfo> FetchSortedValidationHandlers()
        {
            SortedList <int, MethodInfo> handlers = new SortedList <int, MethodInfo>();

            var methods = GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public);

            foreach (var method in methods)
            {
                var attributes = method.GetCustomAttributes(typeof(XadesTValidationHandlerAttribute), true);
                if (attributes != null && attributes.Length > 0)
                {
                    XadesTValidationHandlerAttribute valAttr = (XadesTValidationHandlerAttribute)method.GetCustomAttributes(typeof(XadesTValidationHandlerAttribute), true)[0];
                    handlers.Add(valAttr.ExecutionOrder, method);
                }
            }
            return(handlers);
        }
        public string GetErrorMessage(MethodBase methodbase)
        {
            XadesTValidationHandlerAttribute attr = (XadesTValidationHandlerAttribute)methodbase.GetCustomAttributes(typeof(XadesTValidationHandlerAttribute), true)[0];

            return(attr.Description);
        }