Existing Extensions

How to create an extension.

  1. Create a basic Class library
  2. Add a reference to StatLight.Core.dll
  3. Copy/Paste this following sample extension implementation.

using System;
using StatLight.Client.Harness.Events;
using StatLight.Core.Events;

namespace SampleExtension
{
    public class Class1 : ITestingReportEvents
    {
        public void Handle(TestCaseResult message)
        {
            Console.WriteLine("Hello From Class1");
        }

        public void Handle(TraceClientEvent message)
        {
        }

        public void Handle(BrowserHostCommunicationTimeoutServerEvent message)
        {
        }

        public void Handle(FatalSilverlightExceptionServerEvent message)
        {
        }

        public void Handle(UnhandledExceptionClientEvent message)
        {
        }
    }
}


Done:

How to deploy.

  1. Build your project
  2. Copy only your assembly (don't include the StatLight.Core.dll) to the "Extensions" folder where StatLight.exe lives.
  3. Your extension should now work.

Last edited Jul 14, 2011 at 10:15 PM by staxmanade, version 2

Comments

No comments yet.