Microsoft.HockeyApp.HockeyClientExtensionsWP81.Configure C# (CSharp) Method

Configure() public static method

This is the main configuration method. Call this in the Constructor of your app. This registers an error handler for unhandled errors.
public static Configure ( this @this, string appIdentifier, TelemetryConfiguration configuration = null ) : IHockeyClientConfigurable
@this this
appIdentifier string Your unique app id from HockeyApp.
configuration TelemetryConfiguration Your unique app id from HockeyApp.
return IHockeyClientConfigurable
        public static IHockeyClientConfigurable Configure(this IHockeyClient @this, string appIdentifier, TelemetryConfiguration configuration = null)
        {
            @this.AsInternal().PlatformHelper = new HockeyPlatformHelper81();
            @this.AsInternal().AppIdentifier = appIdentifier;

            Application.Current.Suspending += HandleAppSuspending;

            ServiceLocator.AddService<BaseStorageService>(new StorageService());
            ServiceLocator.AddService<IApplicationService>(new ApplicationService());
            ServiceLocator.AddService<IDeviceService>(new DeviceService());
            ServiceLocator.AddService<Services.IPlatformService>(new PlatformService());
            ServiceLocator.AddService<IHttpService>(new HttpClientTransmission());
            ServiceLocator.AddService<IUnhandledExceptionTelemetryModule>(new UnhandledExceptionTelemetryModule());
            WindowsAppInitializer.InitializeAsync(appIdentifier, configuration);
            return @this as IHockeyClientConfigurable;
        }