Exemplo n.º 1
0
        public static OutpayNotify CreateInstance(string name, NameValueCollection parameters)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }
            object[] args = new object[1]
            {
                parameters
            };
            OutpayPlugins outpayPlugins = OutpayPlugins.Instance();
            Type          plugin        = outpayPlugins.GetPlugin("OutpayRequest", name);

            if (plugin == null)
            {
                return(null);
            }
            Type pluginWithNamespace = outpayPlugins.GetPluginWithNamespace("OutpayNotify", plugin.Namespace);

            if (pluginWithNamespace == null)
            {
                return(null);
            }
            return(Activator.CreateInstance(pluginWithNamespace, args) as OutpayNotify);
        }