diff --git a/source/ChromeDevTools/CommandResponse.cs b/source/ChromeDevTools/CommandResponse.cs index 57a42deabad225bc7c8cfd4086417b0b4d57a9ca..f21da499bb63b15d72f8863abc6a2b684225b0ba 100644 --- a/source/ChromeDevTools/CommandResponse.cs +++ b/source/ChromeDevTools/CommandResponse.cs @@ -24,6 +24,15 @@ public class CommandResponse<T> : CommandResponse { + public CommandResponse() + { + } + + public CommandResponse(T result) + { + this.Result = result; + } + public T Result { get; diff --git a/source/Sample/Program.cs b/source/Sample/Program.cs index be37866cd8dc7739937ed1e1dab1111dd9b59a46..73f1e0813647df51bad1d6560ec04ec99134e34a 100644 --- a/source/Sample/Program.cs +++ b/source/Sample/Program.cs @@ -1,4 +1,4 @@ -using MasterDevs.ChromeDevTools.Protocol.Page; +using MasterDevs.ChromeDevTools.Protocol.Chrome.Page; using System; using System.Linq; @@ -31,14 +31,14 @@ namespace MasterDevs.ChromeDevTools.Sample // STEP 4 - Register for events (in this case, "Page" domain events) // send an event to tell chrome to send us all Page events // but we only subscribe to certain events in this session - var pageEnableResult = chromeSession.SendAsync<ChromeDevTools.Protocol.Page.EnableCommand>().Result; + var pageEnableResult = chromeSession.SendAsync<ChromeDevTools.Protocol.Chrome.Page.EnableCommand>().Result; Console.WriteLine("PageEnable: " + pageEnableResult.Id); - chromeSession.Subscribe<Protocol.Page.DomContentEventFiredEvent>(domContentEvent => + chromeSession.Subscribe<Protocol.Chrome.Page.DomContentEventFiredEvent>(domContentEvent => { Console.WriteLine("DomContentEvent: " + domContentEvent.Timestamp); }); // you might never see this, but that's what an event is ... right? - chromeSession.Subscribe<Protocol.Page.FrameStartedLoadingEvent>(frameStartedLoadingEvent => + chromeSession.Subscribe<Protocol.Chrome.Page.FrameStartedLoadingEvent>(frameStartedLoadingEvent => { Console.WriteLine("FrameStartedLoading: " + frameStartedLoadingEvent.FrameId); });