public void OnDiagnostic(IDiagnostic d) { if (d is LoadedFromClassIndex) { Assert.Fail("Query should not be loaded from class index"); } }
public virtual void OnDiagnostic(IDiagnostic d) { if (d is DeletionFailed) { Assert.Fail("No deletion failed diagnostic message expected."); } }
public void OnDiagnostic(IDiagnostic d) { if (d is DeletionFailed) { _diagnosticListenerCalled = true; } }
public void OnDiagnostic(IDiagnostic d) { if (d is DeletionFailed) { throw new Db4oException(); } }
public void OnDiagnostic(IDiagnostic d) { if ((d is NativeQueryNotOptimized) || (d is NativeQueryOptimizerNotLoaded)) { _optimized = false; } }
public static void TraceDiagnostic([NotNull] this ITraceService trace, [NotNull] IDiagnostic diagnostic, Severity severity, bool treatWarningsAsErrors) { switch (severity) { case Severity.Error: trace.TraceError(diagnostic.Msg, diagnostic.Text, diagnostic.FileName, diagnostic.Span); break; case Severity.Warning: if (treatWarningsAsErrors) { trace.TraceError(diagnostic.Msg, diagnostic.Text, diagnostic.FileName, diagnostic.Span); } else { trace.TraceWarning(diagnostic.Msg, diagnostic.Text, diagnostic.FileName, diagnostic.Span); } break; case Severity.Information: trace.TraceInformation(diagnostic.Msg, diagnostic.Text, diagnostic.FileName, diagnostic.Span); break; default: throw new ArgumentOutOfRangeException(); } }
public void OnDiagnostic(IDiagnostic d) { if (!(d is NotTransparentActivationEnabled)) { Assert.Fail("no diagnostic message expected but was " + d); } }
public virtual void OnDiagnostic(IDiagnostic d) { if (d is DeletionFailed) { _called = true; } }
public ConvertEntities(ModelRepository parent, IDiagnostic diagnostic, FileModel fullPath) { this._referenceSchema = fullPath.Schema; this._parent = parent; this._file = fullPath; this._diagnostic = diagnostic; }
public void OnDiagnostic(IDiagnostic d) { if (d is LoadedFromClassIndex) { this._enclosing.loadedFromClassIndex = true; } }
public void OnDiagnostic(IDiagnostic d) { if (typeof(T) == d.GetType()) { _diagnostics.Add(d); } }
public void OnDiagnostic(IDiagnostic d) { if (d is MissingClass) { classesNotFound.Add(((MissingClass)d).Reason()); } }
public void OnDiagnostic(IDiagnostic d) { if (d is LoadedFromClassIndex) { this._enclosing._diagnosticsCalled = true; } }
public void OnDiagnostic(IDiagnostic d) { if ((d is NativeQueryNotOptimized) || (d is NativeQueryOptimizerNotLoaded)) { MessageBox.Show(d.GetType() + "\r\n" + d, "Info"); } }
public void OnDiagnostic(IDiagnostic d) { if (d.GetType() == typeof(NativeQueryNotOptimized)) { // _reason = ((NativeQueryNotOptimized) d).reason(); this._enclosing._failed = true; } }
public void OnDiagnostic(IDiagnostic diagnostic) { Type type = diagnostic.GetType(); if (filterFor.Contains(type)) { target.OnDiagnostic(diagnostic); } }
public void OnDiagnostic(IDiagnostic diagnostic) { if(diagnostic is NativeQueryNotOptimized){ Console.WriteLine("Query not optimized"+diagnostic); } else if(diagnostic is NativeQueryOptimizerNotLoaded){ Console.WriteLine("Missing native query optimisation assemblies" + diagnostic); } }
public void OnDiagnostic(IDiagnostic d) { if (d is DeletionFailed) { // Can't assert directly here, db4o eats the exception. :/ this._enclosing._failed = true; } }
public void OnDiagnostic(IDiagnostic diagnostic) { if (diagnostic is LoadedFromClassIndex) { Console.WriteLine("This query couldn't use field indexes " + ((LoadedFromClassIndex)diagnostic).Reason()); Console.WriteLine(diagnostic); } }
private async Task ExecuteTestAsync(DiagnosticTest test) { IDiagnostic diagnostic = test.Type switch { DiagnosticType.Paging => _serviceProvider.GetRequiredService <PagingDiagnostic>(), _ => throw new NotSupportedException($"Test type {test.Type} is not supported."), }; await diagnostic.ExecuteAsync(test).ConfigureAwait(false); }
public void OnDiagnostic(IDiagnostic diagnostic) { if (diagnostic is LoadedFromClassIndex) { Console.WriteLine("This query couldn't use field indexes " + ((LoadedFromClassIndex) diagnostic).Reason()); Console.WriteLine(diagnostic); } }
public void OnDiagnostic(IDiagnostic d) { if (d is ObjectFieldDoesNotExist) { ObjectFieldDoesNotExist message = (ObjectFieldDoesNotExist)d; Assert.AreEqual(ObjectFieldDoesNotExistTestCase.BogusFieldName, message._fieldName ); this._enclosing._diagnosticCalled = true; } }
public HomeController( IDiagnostic _trace, IEndUser _endUser, IService _service ) { trace = _trace; endUser = _endUser; service = _service; }
public void OnDiagnostic(IDiagnostic diagnostic) { if (diagnostic is NativeQueryNotOptimized) { Console.WriteLine("Query not optimized" + diagnostic); } else if (diagnostic is NativeQueryOptimizerNotLoaded) { Console.WriteLine("Missing native query optimisation assemblies" + diagnostic); } }
public void OnDiagnostic(IDiagnostic d) { LoadedFromClassIndex classIndexScan = d as LoadedFromClassIndex; if (classIndexScan == null) { return; } _classIndexScansPerSec.Increment(); }
public void OnDiagnostic(IDiagnostic diagnostic) { if (!(diagnostic is NotTransparentActivationEnabled)) { return; } NotTransparentActivationEnabled taDiagnostic = (NotTransparentActivationEnabled)diagnostic; Assert.AreEqual(CrossPlatformServices.FullyQualifiedName(typeof(TransparentActivationDiagnosticsTestCase.NotTAAwareData )), ((ClassMetadata)taDiagnostic.Reason()).GetName()); this._enclosing._registered._registeredCount++; }
public ModelRepository(string folder, IDiagnostic diagnostic) { this._loader = new Loader(this); this.SchemaManager = new SchemaManager(this); this.SchemaValidator = new SchemaValidator(this); this._loader.LoadConfig(new DirectoryInfo(folder)); this.Files = new FileRepository(folder, diagnostic, this); this.Diagnostic = diagnostic; this._definitions = new Dictionary <Type, Dictionary <string, IBase> >(); this._entities = new Dictionary <Type, TypesIndex>(); }
public void OnDiagnostic(IDiagnostic diagnostic) { if (!(diagnostic is NotTransparentActivationEnabled)) { return; } var taDiagnostic = (NotTransparentActivationEnabled)diagnostic; Assert.AreEqual(CrossPlatformServices.FullyQualifiedName(typeof(NotTAAwareData )), ((ClassMetadata)taDiagnostic.Reason()).GetName()); _enclosing._registered._registeredCount++; }
public static IDiagnostic AsTransparent(this IDiagnostic self) { switch (self.Severity) { case DiagnosticSeverity.Hint: return(HintTransparent); case DiagnosticSeverity.Warning: return(WarningTransparent); case DiagnosticSeverity.Error: return(ErrorTransparent); default: return(None); } }
public void LogDiagnostic(Uri fileUri, IDiagnostic diagnostic, ImmutableArray <int> lineStarts) { (int line, int character) = TextCoordinateConverter.GetPosition(lineStarts, diagnostic.Span.Position); // build a a code description link if the Uri is assigned var codeDescription = diagnostic.Uri == null ? string.Empty : $" [{diagnostic.Uri.AbsoluteUri}]"; var message = $"{fileUri.LocalPath}({line + 1},{character + 1}) : {diagnostic.Level} {diagnostic.Code}: {diagnostic.Message}{codeDescription}"; this.logger.Log(ToLogLevel(diagnostic.Level), message); this.HasLoggedErrors |= diagnostic.Level == DiagnosticLevel.Error; }
public virtual void OnDiagnostic(IDiagnostic d) { if (_listeners == null) { return; } IEnumerator i = _listeners.GetEnumerator(); while (i.MoveNext()) { ((IDiagnosticListener)i.Current).OnDiagnostic(d); } }
private static void ApplyFix(IDiagnostic diagnostic) { var fix = PrefabsFixes.Fixes(diagnostic).FirstOrDefault(); if (fix == null) { return; } var context = diagnostic.Context(); Debug.Log("Applying fix with description: " + fix.Describe(context)); fix.Execute(context); }
public static IEnumerable <IFix> Fixes(IDiagnostic diagnostic) { if (diagnostic == null) { return(Enumerable.Empty <IFix>()); } IFix[] fixes; if (!FixesByDiagnostic.TryGetValue(diagnostic.Id, out fixes)) { return(Enumerable.Empty <IFix>()); } return(fixes); }
private static object ToMonacoDiagnostic(IDiagnostic diagnostic, IReadOnlyList <int> lineStarts) { var(startLine, startChar) = TextCoordinateConverter.GetPosition(lineStarts, diagnostic.Span.Position); var(endLine, endChar) = TextCoordinateConverter.GetPosition(lineStarts, diagnostic.GetEndPosition()); return(new { code = diagnostic.Code, message = diagnostic.Message, severity = ToMonacoSeverity(diagnostic.Level), startLineNumber = startLine + 1, startColumn = startChar + 1, endLineNumber = endLine + 1, endColumn = endChar + 1, }); }
public void OnDiagnostic(IDiagnostic d) { //Log.DebugFormat("db4o Diagnostic Event {0}", d.GetType().Name); var message = d as DiagnosticBase; if (message == null) return; Level level = DefaultLevel; if (d is DeletionFailed) level = Level.Error; else if (d is DescendIntoTranslator) level = Level.Warn; else if (d is DefragmentRecommendation || d is NativeQueryNotOptimized || d is NativeQueryOptimizerNotLoaded) level = Level.Info; Log.Log(level, message.Problem()); if (OutputReason) Log.LogFormat(level, "Reason: {0}", message.Reason()); if (OutputSolution) Log.LogFormat(level, "Solution: {0}", message.Solution()); }
/// <summary>redirects Diagnostic messages to the Console.</summary> /// <remarks>redirects Diagnostic messages to the Console.</remarks> public virtual void OnDiagnostic(IDiagnostic d) { Sharpen.Runtime.Out.WriteLine(d.ToString()); }
public void OnDiagnostic (IDiagnostic d) { Console.WriteLine("---> " + d); }
public void OnDiagnostic(IDiagnostic d) { if ( (d is NativeQueryNotOptimized) || (d is NativeQueryOptimizerNotLoaded)) { MessageBox.Show(d.GetType() + "\r\n"+ d, "Info"); } }
public virtual void OnDiagnostic(IDiagnostic d) { _diagnostics.Add(d); }
public void OnDiagnostic(IDiagnostic d) { LoadedFromClassIndex classIndexScan = d as LoadedFromClassIndex; if (classIndexScan == null) return; _classIndexScansPerSec.Increment(); }
public virtual void OnDiagnostic(IDiagnostic d) { Assert.IsFalse(d is LoadedFromClassIndex); }
public void OnDiagnostic(IDiagnostic d) { if (d is LoadedFromClassIndex) { _enclosing._diagnosticsCalled = true; } }
/// <summary>redirects Diagnostic messages to System.Diagnostics.Trace</summary> /// <remarks>redirects Diagnostic messages to the Console.</remarks> public virtual void OnDiagnostic(IDiagnostic d) { #if !SILVERLIGHT Trace.WriteLine(d.ToString()); #endif }