Esempio n. 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public InProcNode(IBuildComponentHost componentHost, INodeEndpoint inProcNodeEndpoint)
        {
            _componentHost       = componentHost;
            _nodeEndpoint        = inProcNodeEndpoint;
            _receivedPackets     = new ConcurrentQueue <INodePacket>();
            _packetReceivedEvent = new AutoResetEvent(false);
            _shutdownEvent       = new AutoResetEvent(false);

            _buildRequestEngine = componentHost.GetComponent(BuildComponentType.RequestEngine) as IBuildRequestEngine;

            _engineExceptionEventHandler         = OnEngineException;
            _newConfigurationRequestEventHandler = OnNewConfigurationRequest;
            _requestBlockedEventHandler          = OnNewRequest;
            _requestCompleteEventHandler         = OnRequestComplete;
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public InProcNode(IBuildComponentHost componentHost, INodeEndpoint inProcNodeEndpoint)
        {
            _componentHost       = componentHost;
            _nodeEndpoint        = inProcNodeEndpoint;
            _receivedPackets     = new Queue <INodePacket>();
            _packetReceivedEvent = new AutoResetEvent(false);
            _shutdownEvent       = new AutoResetEvent(false);

            _configurationProjectsLoaded = new HashSet <NGen <int> >();

            _buildRequestEngine = componentHost.GetComponent(BuildComponentType.RequestEngine) as IBuildRequestEngine;

            _engineExceptionEventHandler         = new EngineExceptionDelegate(OnEngineException);
            _newConfigurationRequestEventHandler = new NewConfigurationRequestDelegate(OnNewConfigurationRequest);
            _requestBlockedEventHandler          = new RequestBlockedDelegate(OnNewRequest);
            _requestCompleteEventHandler         = new RequestCompleteDelegate(OnRequestComplete);
        }
Esempio n. 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public InProcNode(IBuildComponentHost componentHost, INodeEndpoint inProcNodeEndpoint)
        {
            _componentHost = componentHost;
            _nodeEndpoint = inProcNodeEndpoint;
            _receivedPackets = new Queue<INodePacket>();
            _packetReceivedEvent = new AutoResetEvent(false);
            _shutdownEvent = new AutoResetEvent(false);

            _configurationProjectsLoaded = new HashSet<NGen<int>>();

            _buildRequestEngine = componentHost.GetComponent(BuildComponentType.RequestEngine) as IBuildRequestEngine;

            _engineExceptionEventHandler = new EngineExceptionDelegate(OnEngineException);
            _newConfigurationRequestEventHandler = new NewConfigurationRequestDelegate(OnNewConfigurationRequest);
            _requestBlockedEventHandler = new RequestBlockedDelegate(OnNewRequest);
            _requestCompleteEventHandler = new RequestCompleteDelegate(OnRequestComplete);
        }
Esempio n. 4
0
 public void delete(RequestCompleteDelegate completeDelegate)
 {
     this.rawCall("delete", null, null, completeDelegate);
 }
Esempio n. 5
0
 public void patch(Dictionary <string, string> parameters, RequestCompleteDelegate completeDelegate)
 {
     this.rawCall("patch", null, parameters, completeDelegate);
 }
Esempio n. 6
0
 public void get(Dictionary <string, string> parameters, RequestCompleteDelegate completeDelegate)
 {
     this.rawCall("get", parameters, null, completeDelegate);
 }
Esempio n. 7
0
 public void get(RequestCompleteDelegate completeDelegate)
 {
     this.rawCall("get", null, null, completeDelegate);
 }
Esempio n. 8
0
        protected void rawCall(string verb, Dictionary <string, string> queryParameters, Dictionary <string, string> postParameters, RequestCompleteDelegate completeDelegate)
        {
            HttpWebRequest request = this.createHttpRequest(verb, queryParameters, postParameters);

            request.BeginGetResponse(asyncResult =>
            {
                completeDelegate(this.getHttpResponseForRequest(request, asyncResult));
            }, null);
        }