public void SetResponse(int statusCode, string httpBody, ElementConstant el) { HttpResponseArgs Model = new HttpResponseArgs(); Model.ResponseCode = statusCode; Model.httpBody = httpBody; Model.ELConstant = el; OnResponseHandler(Model); }
readonly ElementConstant ELConstant; //inject enum to constructor. public RequestService(string _url, HttpHandler _responseEvent, ElementConstant _elConstant) { Url = _url; responseEvent = _responseEvent; ELConstant = _elConstant; }