// Token: 0x060005F8 RID: 1528 RVA: 0x00021AE4 File Offset: 0x0001FCE4 private void OnPostAuthorizeRequest(object sender, EventArgs e) { HttpApplication httpApplication = (HttpApplication)sender; HttpContext httpContext = httpApplication.Context; CheckpointTracker.GetOrCreate(httpContext.Items).Add(FrontEndHttpProxyCheckpoints.ProxyModulePostAuthorizeRequest); Diagnostics.SendWatsonReportOnUnhandledException(delegate() { if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1)) { ExTraceGlobals.VerboseTracer.TraceDebug((long)this.GetHashCode(), "[ProxyModule::OnPostAuthorizeRequest]: Method {0}; Url {1}; Username {2}; Context {3};", new object[] { httpContext.Request.HttpMethod, httpContext.Request.Url, (httpContext.User == null) ? string.Empty : IIdentityExtensions.GetSafeName(httpContext.User.Identity, true), httpContext.GetTraceContext() }); } this.OnPostAuthorizeInternal(httpApplication); LatencyTracker latencyTracker = LatencyTracker.FromHttpContext(httpContext); RequestDetailsLoggerBase <RequestDetailsLogger> .SafeSetLogger(RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(httpContext), 6, latencyTracker.GetCurrentLatency(LatencyTrackerKey.ProxyModuleLatency)); long currentLatency = latencyTracker.GetCurrentLatency(LatencyTrackerKey.AuthenticationLatency); PerfCounters.UpdateMovingAveragePerformanceCounter(PerfCounters.HttpProxyCountersInstance.MovingAverageAuthenticationLatency, currentLatency); latencyTracker.StartTracking(LatencyTrackerKey.ModuleToHandlerSwitchingLatency, false); }, new Diagnostics.LastChanceExceptionHandler(RequestDetailsLogger.LastChanceExceptionHandler)); }
void OnTriggerEnter(Collider other) { GameObject car = other.transform.root.gameObject; CheckpointTracker tracker = car.GetComponent <CheckpointTracker>(); if (tracker == null || !tracker.isNextCheckPoint(this)) { return; } tracker.SetNextCheckPoint(NextCheckpoint); LapCounter counter = car.GetComponent <LapCounter>(); if (counter != null && isGoal) { counter.AddLap(); Debug.Log($"{car.name} - Lap!"); } if (car.tag != "Player") { return; } SetCheckpoint(false); NextCheckpoint?.ActivateCheckpoint(); }
void Update() { if (checkpointTracker == null) { checkpointTracker = GetComponent <CheckpointTracker>(); } // Debug.Log("Lap: " + checkpointTracker.lap + "\nCheckpoint: " + checkpointTracker.checkpoint); lapCPText.text = "Lap: " + checkpointTracker.lap + "\nCheckpoint: " + checkpointTracker.checkpoint; }
protected virtual void Start() { echoColliders = new List <Collider2D>(); attributes = player.GetComponent <PlayerAttributes>(); echo = helperChar.GetComponent <HelperCharacter>(); checkpointTracker = this.GetComponent <CheckpointTracker>(); objectiveDisplay = textMesh.GetComponent <TextMeshProUGUI>(); resetLevel(); }
// Token: 0x06000478 RID: 1144 RVA: 0x000192C4 File Offset: 0x000174C4 static FrontEndHttpProxyCheckpoints() { List <CheckpointBase> list = new List <CheckpointBase> { FrontEndHttpProxyCheckpoints.ProxyModuleBeginRequest, FrontEndHttpProxyCheckpoints.ProxyModuleAuthenticateRequest, FrontEndHttpProxyCheckpoints.ProxyModulePostAuthorizeRequest, FrontEndHttpProxyCheckpoints.ProxyModulePreSendRequestHeaders, FrontEndHttpProxyCheckpoints.ProxyModuleEndRequest }; CheckpointTracker.Register(typeof(FrontEndHttpProxyCheckpoints), list); }
public void Initialize() { try { _xConnectProvider = new XConnectProvider(_config); _kinesisProducer = new KinesisProducer(_config, _logger); _checkpointTracker = new CheckpointTracker(_config); } catch (Exception ex) { _logger.LogError(ex); throw; } }
// Token: 0x060005F7 RID: 1527 RVA: 0x00021A78 File Offset: 0x0001FC78 private void OnBeginRequest(object sender, EventArgs e) { HttpApplication httpApplication = (HttpApplication)sender; HttpContext httpContext = httpApplication.Context; CheckpointTracker.GetOrCreate(httpContext.Items).Add(FrontEndHttpProxyCheckpoints.ProxyModuleBeginRequest); Diagnostics.SendWatsonReportOnUnhandledException(delegate() { LatencyTracker latencyTracker = new LatencyTracker(); latencyTracker.StartTracking(LatencyTrackerKey.ProxyModuleLatency, false); AspNetHelper.AddTimestampHeaderIfNecessary(httpContext.Request.Headers, "X-FrontEnd-Begin"); if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1)) { ExTraceGlobals.VerboseTracer.TraceDebug <string, Uri, int>((long)this.GetHashCode(), "[ProxyModule::OnBeginRequest]: Method {0}; Url {1}; Context {2};", httpContext.Request.HttpMethod, httpContext.Request.Url, httpContext.GetHashCode()); } if (HealthCheckResponder.Instance.IsHealthCheckRequest(httpContext)) { HealthCheckResponder.Instance.CheckHealthStateAndRespond(httpContext); return; } RequestDetailsLogger requestDetailsLogger = RequestDetailsLoggerBase <RequestDetailsLogger> .InitializeRequestLogger(); requestDetailsLogger.LogCurrentTime("BeginRequest"); httpContext.Items[Constants.TraceContextKey] = httpContext.GetHashCode(); httpContext.Items[Constants.LatencyTrackerContextKeyName] = latencyTracker; requestDetailsLogger.ActivityScope.UpdateFromMessage(httpContext.Request); requestDetailsLogger.ActivityScope.SerializeTo(httpContext.Response); RequestDetailsLoggerBase <RequestDetailsLogger> .SetCurrent(httpContext, requestDetailsLogger); httpContext.Items[typeof(ActivityScope)] = requestDetailsLogger.ActivityScope; httpContext.Items[Constants.RequestIdHttpContextKeyName] = requestDetailsLogger.ActivityScope.ActivityId; RequestDetailsLoggerBase <RequestDetailsLogger> .SafeSetLogger(requestDetailsLogger, 6, HttpProxyGlobals.ProtocolType); requestDetailsLogger.SafeLogUriData(httpContext.Request.Url); RequestDetailsLoggerBase <RequestDetailsLogger> .SafeSetLogger(requestDetailsLogger, 6, httpContext.Request.HttpMethod); string requestCorrelationId = AspNetHelper.GetRequestCorrelationId(httpContext); RequestDetailsLoggerBase <RequestDetailsLogger> .SafeAppendGenericInfo(requestDetailsLogger, "CorrelationID", requestCorrelationId); httpContext.Response.AppendToLog(Constants.CorrelationIdKeyForIISLogs + requestCorrelationId + ";"); UrlUtilities.SaveOriginalRequestHostSchemePortToContext(SharedHttpContextWrapper.GetWrapper(httpContext)); try { this.OnBeginRequestInternal(httpApplication); } catch (Exception ex) { RequestDetailsLoggerBase <RequestDetailsLogger> .SafeAppendGenericError(requestDetailsLogger, "OnBeginRequestInternal", ex.ToString()); requestDetailsLogger.AsyncCommit(false, false); throw; } }, new Diagnostics.LastChanceExceptionHandler(RequestDetailsLogger.LastChanceExceptionHandler)); }
// Token: 0x060005FA RID: 1530 RVA: 0x00021B74 File Offset: 0x0001FD74 private void OnPreSendRequestHeaders(object sender, EventArgs e) { HttpApplication httpApplication = (HttpApplication)sender; HttpContext httpContext = httpApplication.Context; CheckpointTracker.GetOrCreate(httpContext.Items).Add(FrontEndHttpProxyCheckpoints.ProxyModulePreSendRequestHeaders); Diagnostics.SendWatsonReportOnUnhandledException(delegate() { if (httpContext != null && httpContext.Response != null && httpContext.Response.Headers != null) { AspNetHelper.AddTimestampHeaderIfNecessary(httpContext.Response.Headers, "X-FrontEnd-End"); RequestDetailsLogger current = RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(httpContext); if (current != null && !current.IsDisposed) { this.SetResponseHeaders(current, httpContext); } if (Extensions.IsProbeRequest(Extensions.GetHttpRequestBase(httpContext.Request)) && !RequestFailureContext.IsSetInResponse(SharedHttpContextWrapper.GetWrapper(httpContext).Response)) { RequestFailureContext requestFailureContext = null; if (httpContext.Items.Contains(RequestFailureContext.HttpContextKeyName)) { requestFailureContext = (RequestFailureContext)httpContext.Items[RequestFailureContext.HttpContextKeyName]; } else if (httpContext.Response.StatusCode >= 400 && httpContext.Response.StatusCode < 600) { LiveIdAuthResult?liveIdAuthResult = null; LiveIdAuthResult value; if (httpContext.Items.Contains("LiveIdBasicAuthResult") && Enum.TryParse <LiveIdAuthResult>((string)httpContext.Items["LiveIdBasicAuthResult"], true, out value)) { liveIdAuthResult = new LiveIdAuthResult?(value); } requestFailureContext = new RequestFailureContext(1, httpContext.Response.StatusCode, httpContext.Response.StatusDescription, string.Empty, null, null, liveIdAuthResult); } if (requestFailureContext != null) { requestFailureContext.UpdateResponse(SharedHttpContextWrapper.GetWrapper(httpContext).Response); } } ProxyRequestHandler proxyRequestHandler = httpContext.CurrentHandler as ProxyRequestHandler; if (proxyRequestHandler != null) { proxyRequestHandler.ResponseHeadersSent = true; } } }, new Diagnostics.LastChanceExceptionHandler(RequestDetailsLogger.LastChanceExceptionHandler)); }
private void ResetPlayer() { if (checkpointTracker == null) { checkpointTracker = GetComponent <CheckpointTracker>(); } print("Last checkpoint was " + checkpointTracker); GameObject.Find("Player Rig").transform.position = checkpointTracker.lastCP.transform.position; GameObject.Find("Player Rig").transform.rotation = checkpointTracker.lastCP.transform.rotation; if (playableDirector == null) { playableDirector = GameObject.Find("Main Timeline").GetComponent <PlayableDirector>(); } playableDirector.Pause(); playableDirector.time = checkpointTracker.directorTime; playableDirector.Resume(); }
// Token: 0x060005F6 RID: 1526 RVA: 0x00021A0C File Offset: 0x0001FC0C private void OnAuthenticateRequest(object sender, EventArgs e) { HttpApplication httpApplication = (HttpApplication)sender; HttpContext httpContext = httpApplication.Context; CheckpointTracker.GetOrCreate(httpContext.Items).Add(FrontEndHttpProxyCheckpoints.ProxyModuleAuthenticateRequest); Diagnostics.SendWatsonReportOnUnhandledException(delegate() { LatencyTracker.FromHttpContext(httpContext).StartTracking(LatencyTrackerKey.AuthenticationLatency, false); if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1)) { ExTraceGlobals.VerboseTracer.TraceDebug <string, Uri, object>((long)this.GetHashCode(), "[ProxyModule::OnAuthenticateRequest]: Method {0}; Url {1}; Context {2};", httpContext.Request.HttpMethod, httpContext.Request.Url, httpContext.Items[Constants.TraceContextKey]); } this.OnAuthenticateInternal(httpApplication); long currentLatency = LatencyTracker.FromHttpContext(httpContext).GetCurrentLatency(LatencyTrackerKey.ProxyModuleLatency); if (currentLatency > 100L) { RequestDetailsLoggerBase <RequestDetailsLogger> .SafeAppendGenericInfo(RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(httpContext), "OnAuthenticate", currentLatency); } }, new Diagnostics.LastChanceExceptionHandler(RequestDetailsLogger.LastChanceExceptionHandler)); }
public void TriggerCheckpoint() { CheckpointTracker.SetLatestCheckpoint(transform.position, BlackHoleNode); }
private void Start() { cpTracker = manager.GetComponent <CheckpointTracker>(); cpIndex = findCPIndex(this.GetComponent <CheckpointController>()); }
public CheckpointTracketTest() { tracker = new CheckpointTracker(GetService <ILogger <CheckpointTracker> >()); }
// Token: 0x060005FB RID: 1531 RVA: 0x00021BD8 File Offset: 0x0001FDD8 private void OnEndRequest(object sender, EventArgs e) { HttpApplication httpApplication = (HttpApplication)sender; HttpContext httpContext = httpApplication.Context; CheckpointTracker.GetOrCreate(httpContext.Items).Add(FrontEndHttpProxyCheckpoints.ProxyModuleEndRequest); Diagnostics.SendWatsonReportOnUnhandledException(delegate() { if (!HostHeaderValidator.HasValidHostHeaderStatusDescription(new HttpContextWrapper(httpContext).Response) || httpContext.Items["AutodiscoverRedirectModule"] != null) { return; } LatencyTracker latencyTracker = LatencyTracker.FromHttpContext(httpContext); RequestDetailsLogger current = RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(httpContext); RequestDetailsLoggerBase <RequestDetailsLogger> .SafeAppendGenericInfo(RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(httpContext), GuardedSharedCacheExecution.Default.Key, GuardedSharedCacheExecution.Default.Guard.GetCurrentValue()); int traceContext = httpContext.GetTraceContext(); if (httpContext.Response != null && current != null) { httpContext.Response.AppendToLog(Constants.RequestIdKeyForIISLogs + current.ActivityId.ToString() + ";"); } if (HealthCheckResponder.Instance.IsHealthCheckRequest(httpContext)) { return; } if (httpContext.Response.StatusCode == 404 && httpContext.Response.SubStatusCode == 13) { httpContext.Response.StatusCode = 507; } if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1)) { ExTraceGlobals.VerboseTracer.TraceDebug((long)this.GetHashCode(), "[ProxyModule::OnEndRequest]: Method {0}; Url {1}; Username {2}; Context {3};", new object[] { httpContext.Request.HttpMethod, httpContext.Request.Url, (httpContext.User == null) ? string.Empty : IIdentityExtensions.GetSafeName(httpContext.User.Identity, true), traceContext }); } if (latencyTracker != null) { long currentLatency = latencyTracker.GetCurrentLatency(LatencyTrackerKey.HandlerToModuleSwitchingLatency); if (currentLatency >= 0L) { RequestDetailsLoggerBase <RequestDetailsLogger> .SafeSetLogger(current, 5, currentLatency); } } ProxyRequestHandler proxyRequestHandler = httpContext.CurrentHandler as ProxyRequestHandler; if (proxyRequestHandler != null && !proxyRequestHandler.IsDisposed) { current.AppendGenericInfo("DisposeProxyRequestHandler", "ProxyModule::OnEndRequest"); proxyRequestHandler.Dispose(); } ProxyModule.InspectNativeProxyFatalError(httpContext.Response, current); string text = httpContext.Items["AnonymousRequestFilterModule"] as string; if (!string.IsNullOrEmpty(text)) { current.AppendGenericInfo("AnonymousRequestFilterModule", text); } try { this.OnEndRequestInternal(httpApplication); } finally { if (current != null && !current.IsDisposed) { IActivityScope activityScope = current.ActivityScope; if (activityScope != null) { if (!string.IsNullOrEmpty(activityScope.TenantId)) { httpContext.Items["AuthenticatedUserOrganization"] = activityScope.TenantId; } ProxyModule.FinalizeRequestLatencies(httpContext, current, activityScope, latencyTracker, traceContext); } current.LogCurrentTime("EndRequest"); RequestDetailsLoggerBase <RequestDetailsLogger> .SafeSetLogger(current, 0, DateTime.UtcNow); current.AsyncCommit(false, NativeProxyHelper.WasProxiedByNativeProxyHandler(SharedHttpContextWrapper.GetWrapper(httpContext))); } if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1)) { ExTraceGlobals.VerboseTracer.TraceDebug(0L, "[ProxyModule::OnEndRequest]: Method {0}; Url {1}; OnEndRequestLatency {2}; Context {3};", new object[] { httpContext.Request.HttpMethod, httpContext.Request.Url, (latencyTracker != null) ? latencyTracker.GetCurrentLatency(LatencyTrackerKey.ProxyModuleLatency).ToString() : "Unknown", traceContext }); } } }, new Diagnostics.LastChanceExceptionHandler(RequestDetailsLogger.LastChanceExceptionHandler)); }
public ProjectionEngine(IStoreEvents eventStore, MongoDatabase readModelDb) { Logger = NullLogger.Instance; _eventStore = eventStore; _tracker = new CheckpointTracker(readModelDb); }