// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Concurrent;
usingSystem.Globalization;
...
...
@@ -28,7 +30,7 @@ internal abstract class CommonMessageProvider
/// "fill-in" placeholders, those should be expressed in standard string.Format notation
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
...
...
@@ -20,9 +22,9 @@ private sealed class DiagnosticWithProgrammaticSuppression : Diagnostic
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
...
...
@@ -54,8 +56,8 @@ public abstract partial class Diagnostic : IEquatable<Diagnostic>, IFormattable
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
...
...
@@ -81,8 +83,8 @@ public sealed class DiagnosticDescriptor : IEquatable<DiagnosticDescriptor>
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Globalization;
usingMicrosoft.CodeAnalysis.Text;
...
...
@@ -18,7 +20,7 @@ public class DiagnosticFormatter
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
...
...
@@ -26,7 +28,7 @@ internal class DiagnosticInfo : IFormattable, IObjectWritable
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Diagnostics;
...
...
@@ -20,8 +22,8 @@ internal class DiagnosticWithInfo : Diagnostic
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
...
...
@@ -30,9 +32,9 @@ internal sealed class SimpleDiagnostic : Diagnostic
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingMicrosoft.CodeAnalysis.Text;
usingRoslyn.Utilities;
...
...
@@ -46,12 +48,12 @@ public override LocationKind Kind
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
namespaceMicrosoft.CodeAnalysis
...
...
@@ -15,14 +17,14 @@ private sealed class FixedLocalizableString : LocalizableString
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
namespaceMicrosoft.CodeAnalysis
...
...
@@ -14,12 +16,12 @@ public abstract partial class LocalizableString : IFormattable, IEquatable<Local
/// Fired when an exception is raised by any of the public methods of <see cref="LocalizableString"/>.
/// If the exception handler itself throws an exception, that exception is ignored.
/// </summary>
publiceventEventHandler<Exception>OnException;
publiceventEventHandler<Exception>?OnException;
/// <summary>
/// Formats the value of the current instance using the optionally specified format.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Diagnostics;
usingMicrosoft.CodeAnalysis.Symbols;
...
...
@@ -35,7 +37,7 @@ internal Location()
/// <summary>
/// The syntax tree this location is located in or <c>null</c> if not in a syntax tree.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
namespaceMicrosoft.CodeAnalysis
{
/// <summary>
...
...
@@ -19,7 +21,7 @@ public override LocationKind Kind
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingSystem.Diagnostics;
usingMicrosoft.CodeAnalysis.Text;
...
...
@@ -101,7 +103,7 @@ public override FileLinePositionSpan GetMappedLineSpan()
return_syntaxTree.GetMappedLineSpan(_span);
}
publicboolEquals(SourceLocationother)
publicboolEquals(SourceLocation?other)
{
if(ReferenceEquals(this,other))
{
...
...
@@ -111,7 +113,7 @@ public bool Equals(SourceLocation other)
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingSystem;
usingMicrosoft.CodeAnalysis.Diagnostics;
usingRoslyn.Utilities;
...
...
@@ -68,7 +70,7 @@ public sealed class SuppressionDescriptor : IEquatable<SuppressionDescriptor>
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
namespaceMicrosoft.CodeAnalysis.Diagnostics
{
/// <summary>
...
...
@@ -16,9 +18,9 @@ public sealed class SuppressionInfo
/// If the diagnostic was suppressed by an attribute, then returns that attribute.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullableenable
usingMicrosoft.CodeAnalysis.Text;
usingSystem;
usingSystem.Xml.Linq;
...
...
@@ -56,7 +58,7 @@ public override FileLinePositionSpan GetLineSpan()
return_positionSpan;
}
publicboolEquals(XmlLocationother)
publicboolEquals(XmlLocation?other)
{
if(ReferenceEquals(this,other))
{
...
...
@@ -66,7 +68,7 @@ public bool Equals(XmlLocation other)
// Get the effective severity of the diagnostic from the compilation options.
// PERF: We do not check if the diagnostic was suppressed by a source suppression, as this requires us to force complete the assembly attributes, which is very expensive.