import { AiService } from './ai.service' ; import { Guid } from './../Utilities/Guid' ; import { Injectable } from '@angular/core' ; @ Injectable ( ) export class AiTryService extends AiService { private _tryTraceStartTimes : { [ name ] : number ; } = { } ; constructor ( ) { super ( ) ; } setSessionId ( _ , __ ? ) { } startTrace ( ) { const traceKey = Guid . newTinyGuid ( ) ; this . _tryTraceStartTimes [ traceKey ] = Date . now ( ) ; return traceKey ; } stopTrace ( name , traceKey , properties ? , measurements ? ) { const eventStart = this . _tryTraceStartTimes [ traceKey ] ; if ( eventStart ) { delete this . _tryTraceStartTimes [ traceKey ] ; const duration = Date . now ( ) - eventStart ; properties = ! ! properties ? properties : { } ; properties [ 'duration' ] = duration + '' ; this . trackEvent ( name , properties , measurements ) ; } } trackDependency ( ) { } trackException ( ) { } trackTrace ( ) { } flush ( ) { } clearAuthenticatedUserContext ( ) { } downloadAndSetup ( ) { } _onerror ( ) { } }