Skip to content

Commit

Permalink
fix: fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-f committed Feb 28, 2024
1 parent 0e76cf4 commit f42d173
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Plana.Composition.Extensions/ISymbolExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.
// ------------------------------------------------------------------------------------------

using System.Collections.Immutable;

using Microsoft.CodeAnalysis;

namespace Plana.Composition.Extensions;

// ReSharper disable once InconsistentNaming
public static class ISymbolExtensions
{
#pragma warning disable CS8619
public static ISymbol? GetInterfaceSymbol(this ISymbol symbol)
{
if (symbol.Kind != SymbolKind.Method && symbol.Kind != SymbolKind.Property && symbol.Kind != SymbolKind.Event)
Expand All @@ -32,7 +31,9 @@ public static class ISymbolExtensions

return implementations.FirstOrDefault(w => w.Implementation?.Equals(symbol, SymbolEqualityComparer.Default) == true).Interface;
}
#pragma warning restore CS8619

/*
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ref: https://sourceroslyn.io/#Microsoft.CodeAnalysis.Workspaces/J/s/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ISymbolExtensions.cs/ISymbolExtensions.cs,88c7a12382fb60b6
Expand Down Expand Up @@ -74,4 +75,5 @@ public static ImmutableArray<ISymbol> ImplicitInterfaceImplementations(this ISym
{
return symbol.ExplicitOrImplicitInterfaceImplementations().Except(symbol.ExplicitInterfaceImplementations()).ToImmutableArray();
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ public async Task RemoveRegionAndEndregionPreprocessors()
Assert.False(await source.ContainsAsync("#endregion"));
}

[Fact(Skip = "Not Implemented Yet")]
public Task KeepIfAndEndIfPreprocessors()
{
return Task.CompletedTask;
}

[Fact]
public async Task RemovePragmaDisableAndRestorePreprocessors()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Plana/Obfuscator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task<IReadOnlyCollection<IDocument>> RunAsync(RunKind kind, IPlanaR
await instance.RunAsync(context);
await workspace.CommitAsync(context.CancellationToken);
}
catch (Exception ex)
catch
{
await workspace.RollbackAsync(ct);
}
Expand Down

0 comments on commit f42d173

Please sign in to comment.