[This is preliminary documentation and is subject to change.]

This class handles submitting reports to bugcollect.com.

Namespace:  bugcollect
Assembly:  bugcollect (in bugcollect.dll) Version: 1.0.0.0 (1.0)

Syntax

C#
public sealed class ReportingManager
Visual Basic (Declaration)
Public NotInheritable Class ReportingManager

Remarks

Reports are submited asynchronously. While there are still reports pending submission the WaitPendingDone event is not signaled. On application shutdown or appdomain unload the application should wait for this event to become signaled.

Examples

CopyC#
class Program
{
    static void Main(string[] args)
    {
        ReportingManager rm = new ReportingManager(
            Settings.Default.ApplicationName, 
            Settings.Default.ApplicationPassword);

        try
        {
            throw new ApplicationException("A problem was detected");
        }
        catch (Exception e)
        {
            rm.Submit("Developer notes", 
                e, null, 
                new ReportSubmissionResultHandler(CallbackReportCompleted));
        }
        rm.WaitPendingDone.WaitOne();
    }

    private static void CallbackReportCompleted(
        object sender,
        ReportSubmissionResultArgs args)
    {
        if (args.Exception != null)
        {
            Console.Error.WriteLine(args.Exception);
        }
        if (args.Result != null)
        {
            Console.WriteLine(args.Result.Status);
            using (TextReader reader = new StreamReader(args.Result.Response))
            {
                Console.WriteLine(reader.ReadToEnd());
            }
        }
    }
}
*

Inheritance Hierarchy

System..::.Object
  bugcollect..::.ReportingManager

See Also