Mindscape.Raygun4Net.RaygunClient.FlagAsSent C# (CSharp) Method

FlagAsSent() protected method

protected FlagAsSent ( Exception exception ) : void
exception System.Exception
return void
    protected void FlagAsSent(Exception exception)
    {
      if (exception != null && exception.Data != null)
      {
        try
        {
          Type[] genericTypes = exception.Data.GetType().GetTypeInfo().GenericTypeArguments;
          if (genericTypes.Length == 0 || genericTypes[0].IsAssignableFrom(typeof(string)))
          {
            exception.Data[SentKey] = true;
          }
        }
        catch (Exception ex)
        {
          Debug.WriteLine(String.Format("Failed to flag exception as sent: {0}", ex.Message));
        }
      }
    }