Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed all warning from code #298

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ColumnizerLib/ColumnizerLib.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>LogExpert</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
204 changes: 0 additions & 204 deletions src/LogExpert.sln

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/LogExpert/Classes/Filter/FilterStarter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using LogExpert.Classes.ILogLineColumnizerCallback;

using NLog;

using System;
using System.Collections.Generic;
using System.Threading;
Expand All @@ -27,7 +25,6 @@ internal class FilterStarter
private readonly SortedDictionary<int, int> _lastFilterLinesDict;

private ProgressCallback _progressCallback;
private Task<Filter> _filterTask;
private int _progressLineCount;
private bool _shouldStop;

Expand Down
1 change: 0 additions & 1 deletion src/LogExpert/Classes/Log/LogfileReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public LogfileReader(string[] fileNames, EncodingOptions encodingOptions, int bu

public delegate void FinishedLoadingEventHandler(object sender, EventArgs e);

private Func<int, ILogLine> GetLogLineFxFunc;
private delegate ILogLine GetLogLineFx(int lineNum);

public delegate void LoadingStartedEventHandler(object sender, LoadFileEventArgs e);
Expand Down
10 changes: 5 additions & 5 deletions src/LogExpert/Classes/TimeSpreadCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void SetDisplayHeight(int height)

#region Private Methods

private async Task WorkerFx()
private void WorkerFx()
{
//Thread.CurrentThread.Name = "TimeSpreadCalculator Worker";
//Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;
Expand All @@ -191,11 +191,11 @@ private async Task WorkerFx()
_logger.Debug("TimeSpreadCalculator: unbusy. starting calc.");
if (TimeMode)
{
await DoCalc_via_Time();
DoCalc_via_Time();
}
else
{
await DoCalc();
DoCalc();
}
break;
}
Expand All @@ -207,7 +207,7 @@ private async Task WorkerFx()
}
}

private async Task DoCalc()
private void DoCalc()
{
OnStartCalc(EventArgs.Empty);
_logger.Debug("TimeSpreadCalculator.DoCalc() begin");
Expand Down Expand Up @@ -276,7 +276,7 @@ private async Task DoCalc()
}

//TODO Refactor this method
private async Task DoCalc_via_Time()
private void DoCalc_via_Time()
{
OnStartCalc(EventArgs.Empty);
_logger.Debug("TimeSpreadCalculator.DoCalc_via_Time() begin");
Expand Down
3 changes: 2 additions & 1 deletion src/LogExpert/Dialogs/AboutBox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Windows.Forms;

Expand Down Expand Up @@ -57,7 +58,7 @@ public string AssemblyTitle
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(_assembly.CodeBase);
return Path.GetFileNameWithoutExtension(_assembly.Location);
}
}

Expand Down
17 changes: 8 additions & 9 deletions src/LogExpert/LogExpert.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\bin\Debug\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>False</Optimize>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<OutputPath>..\..\bin\Release\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\Solution Items\Key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -77,10 +77,10 @@
<Content Include="Resources\Pro_Filter.bmp" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.63.0" />
<PackageReference Include="Google.Protobuf" Version="3.27.0" />
<PackageReference Include="Grpc.AspNetCore" Version="2.67.0" />
<PackageReference Include="Google.Protobuf" Version="3.29.2" />
<PackageReference Include="Grpc.Core" Version="2.46.6" />
<PackageReference Include="Grpc.Tools" Version="2.64.0" PrivateAssets="All" />
<PackageReference Include="Grpc.Tools" Version="2.68.1" PrivateAssets="All" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
Expand All @@ -92,9 +92,8 @@
<Compile Remove="DebugWindow.Designer.cs" />
<Compile Remove="HighlightThread.cs" />
</ItemGroup>
<PropertyGroup />
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.3.2" />
<PackageReference Include="NLog" Version="5.3.4" />
</ItemGroup>
</Project>
11 changes: 0 additions & 11 deletions src/LogExpert/Program.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
using Grpc.Core;
using Grpc.Net.Client;

using LogExpert.Classes;
using LogExpert.Config;
using LogExpert.Controls.LogTabWindow;
using LogExpert.Dialogs;

using LogexpertGRPCService.Services;

using NLog;

using System;
using System.Collections.Generic;
using System.Diagnostics;
//using System.Runtime.Remoting.Channels.Ipc;
//using System.Runtime.Remoting.Channels;
//using System.Runtime.Remoting;
using System.IO;
using System.Reflection;
using System.Security;
Expand All @@ -28,11 +21,7 @@ namespace LogExpert
internal static class Program
{
#region Fields

private static readonly ILogger _logger = LogManager.GetLogger("Program");
private static LogExpertServiceImpl _logExpertService;
private static Grpc.LogExpertService.LogExpertServiceClient _logExpertServiceClient;

#endregion

#region Private Methods
Expand Down
7 changes: 6 additions & 1 deletion src/LogexpertgRPCService/LogexpertgRPCService.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Solution Items\Key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<Protobuf Include="Protos\Logexpert.proto" GrpcServices="Both" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ColumnizerLib\ColumnizerLib.csproj" />
<ProjectReference Include="..\RegexColumnizer\RegexColumnizer.csproj" />
Expand Down
6 changes: 1 addition & 5 deletions src/WinFormsUI/Docking/DockPane.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;

namespace WeifenLuo.WinFormsUI.Docking
{
Expand Down Expand Up @@ -955,7 +952,6 @@ protected override void OnLayout(LayoutEventArgs levent)
base.OnLayout(levent);
}

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override void WndProc(ref Message m)
{
if (m.Msg == (int) Win32.Msgs.WM_MOUSEACTIVATE)
Expand Down
6 changes: 1 addition & 5 deletions src/WinFormsUI/Docking/DockPaneCaptionBase.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Windows.Forms;

namespace WeifenLuo.WinFormsUI.Docking
{
Expand Down Expand Up @@ -83,7 +80,6 @@ protected override void OnMouseDown(MouseEventArgs e)
}
}

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override void WndProc(ref Message m)
{
if (m.Msg == (int) Win32.Msgs.WM_LBUTTONDBLCLK)
Expand Down
8 changes: 3 additions & 5 deletions src/WinFormsUI/Docking/DockPaneStripBase.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.Collections.Generic;
using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

namespace WeifenLuo.WinFormsUI.Docking
{
Expand Down Expand Up @@ -121,7 +120,6 @@ protected override void OnMouseUp(MouseEventArgs e)
}
}

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override void WndProc(ref Message m)
{
if (m.Msg == (int) Win32.Msgs.WM_LBUTTONDBLCLK)
Expand Down
10 changes: 3 additions & 7 deletions src/WinFormsUI/Docking/DockPanel.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.IO;
using System.Text;
using System.Diagnostics.CodeAnalysis;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

// To simplify the process of finding the toolbox bitmap resource:
// #1 Create an internal class called "resfinder" outside of the root namespace.
Expand Down
6 changes: 1 addition & 5 deletions src/WinFormsUI/Docking/FloatWindow.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;

namespace WeifenLuo.WinFormsUI.Docking
{
Expand Down Expand Up @@ -223,7 +220,6 @@ protected override void SetBoundsCore(int x, int y, int width, int height, Bound
base.SetBoundsCore(x, y, width, height, specified);
}

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override void WndProc(ref Message m)
{
if (m.Msg == (int) Win32.Msgs.WM_NCLBUTTONDOWN)
Expand Down