Ejemplo n.º 1
0
 public PluginConfig(Plugins.Pluginer pluginer)
 {
     Requesting      = (from a in pluginer.RequestingInfos select a.Name).ToArray();
     AgentRequesting = (from a in pluginer.AgentRequestingInfos select a.Name).ToArray();
     HeaderWriting   = (from a in pluginer.HeaderWritingInfos select a.Name).ToArray();
     Requested       = (from a in pluginer.RequestedInfos select a.Name).ToArray();
     ResponseError   = (from a in pluginer.ResponseErrorInfos select a.Name).ToArray();
 }
Ejemplo n.º 2
0
        public void To(Plugins.Pluginer pluginer)
        {
            if (Requesting != null)
            {
                foreach (var item in Requesting)
                {
                    pluginer.SetRequesting(item);
                }
            }

            if (AgentRequesting != null)
            {
                foreach (var item in AgentRequesting)
                {
                    pluginer.SetAgentRequesting(item);
                }
            }

            if (HeaderWriting != null)
            {
                foreach (var item in HeaderWriting)
                {
                    pluginer.SetHeaderWriting(item);
                }
            }

            if (Requested != null)
            {
                foreach (var item in Requested)
                {
                    pluginer.SetRequested(item);
                }
            }

            if (ResponseError != null)
            {
                foreach (var item in ResponseError)
                {
                    pluginer.SetResponseError(item);
                }
            }
        }