smaller stylecop fixes in Wox.Core and Wox.Infra (#5671)

* Headers
unneeded usings
files need blank line at bottom
Fixed double returns
Returns after braces

* commenting out stylecop
This commit is contained in:
Clint Rutkas
2020-08-05 14:06:42 -07:00
committed by GitHub
parent 30b65028fe
commit 92a2b83bc8
50 changed files with 308 additions and 116 deletions

View File

@@ -1,4 +1,8 @@
using System;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using System.Reflection;
using System.Runtime.Serialization;
@@ -104,6 +108,7 @@ namespace Wox.Infrastructure.Storage
break;
}
}
return ayResult;
}
@@ -125,6 +130,7 @@ namespace Wox.Infrastructure.Storage
Log.Exception($"|BinaryStorage.Save|serialize error for file <{FilePath}>", e);
}
}
_storageHelper.Close();
Log.Info($"|BinaryStorage.Save|Saving cached data| <{FilePath}>");
}

View File

@@ -1,4 +1,8 @@
using System.Collections.ObjectModel;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.ObjectModel;
using System.IO;
namespace Wox.Infrastructure.Storage

View File

@@ -1,4 +1,8 @@
using System.Collections.ObjectModel;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.ObjectModel;
using System.IO;
namespace Wox.Infrastructure.Storage

View File

@@ -1,7 +1,8 @@
using System;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Wox.Infrastructure.Storage
{

View File

@@ -1,4 +1,8 @@
namespace Wox.Infrastructure.Storage
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Wox.Infrastructure.Storage
{
/// <summary>
/// Save plugin settings/cache,

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Wox.Infrastructure.Storage
{

View File

@@ -1,4 +1,8 @@
using System;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.IO;
using Newtonsoft.Json;
@@ -63,6 +67,7 @@ namespace Wox.Infrastructure.Storage
{
LoadDefault();
}
return _data.NonNull();
}

View File

@@ -1,13 +1,12 @@
using NLog.Filters;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls.Primitives;
using Wox.Infrastructure;
using Wox.Infrastructure.Logger;
namespace Wox.Infrastructure.Storage

View File

@@ -1,4 +1,8 @@
using System.IO;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.IO;
namespace Wox.Infrastructure.Storage
{

View File

@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using System.Windows.Markup;
namespace Wox.Infrastructure.Storage
{
@@ -11,7 +12,6 @@ namespace Wox.Infrastructure.Storage
// This detail is accessed by the storage items and is used to decide if the cache must be deleted or not
public bool clearCache = false;
private String currentPowerToysVersion = String.Empty;
private String FilePath { get; set; } = String.Empty;

View File

@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Wox.Infrastructure.Storage
{
@@ -18,4 +17,4 @@ namespace Wox.Infrastructure.Storage
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
}
}
}
}