Skip to content

Commit

Permalink
adds method to test if its a valid debug
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaLawton committed Jul 13, 2018
1 parent 8377365 commit 8ce2578
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;

namespace Google.Analytics.SDK.Core.Services.Interfaces
Expand All @@ -17,6 +18,11 @@ public DebugResult(string result)
RawResponse = result;
Response = JsonConvert.DeserializeObject<DebugResponse>(result);
}

public bool IsValid()
{
return Response?.hitParsingResult?.FirstOrDefault() != null && Response.hitParsingResult.FirstOrDefault().valid;
}
}


Expand Down

0 comments on commit 8ce2578

Please sign in to comment.