public static bool LoadDespatchRulesPlugin(string filePath, string dllName)
        {
            filePath = Path.Combine(filePath, dllName);

            if (Path.GetFileName(filePath).ToUpper() != Path.GetFileName(Assembly.GetAssembly(typeof(DespatchBasePlugin)).CodeBase).ToUpper())
            {
                try
                {
                    var type = Assembly.LoadFrom(filePath).GetTypes()
                    .FirstOrDefault(t =>
                        t.IsClass && typeof(IDespatchRules).IsAssignableFrom(t));
                    if (type != null)
                    {
                        DespatchRuleHandler = Activator.CreateInstance(type) as IDespatchRules;
                    }
                }
                catch
                {
                    return false;
                }

            }

            return DespatchRuleHandler != null;
        }
        public static bool LoadDespatchRulesPlugin(string filePath, string dllName)
        {
            filePath = Path.Combine(filePath, dllName);

            if (Path.GetFileName(filePath).ToUpper() != Path.GetFileName(Assembly.GetAssembly(typeof(DespatchBasePlugin)).CodeBase).ToUpper())
            {
                var type = Assembly.LoadFrom(filePath).GetTypes()
                           .FirstOrDefault(t =>
                                           t.IsClass && typeof(IDespatchRules).IsAssignableFrom(t));

                if (type != null)
                {
                    DespatchRuleHandler = Activator.CreateInstance(type) as IDespatchRules;
                }
            }

            return(DespatchRuleHandler != null);
        }