More styleguide
This commit is contained in:
parent
03c55d11c4
commit
437c10ff55
@ -11,7 +11,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
{
|
{
|
||||||
internal static TimeSpan Measure(Action action)
|
internal static TimeSpan Measure(Action action)
|
||||||
{
|
{
|
||||||
Stopwatch sw = new Stopwatch();
|
var sw = new Stopwatch();
|
||||||
sw.Start();
|
sw.Start();
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -62,7 +62,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
{
|
{
|
||||||
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
|
var trimmer = new XCIFileTrimmer(filename, log);
|
||||||
return trimmer.CanBeTrimmed;
|
return trimmer.CanBeTrimmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
{
|
{
|
||||||
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
|
var trimmer = new XCIFileTrimmer(filename, log);
|
||||||
return trimmer.CanBeUntrimmed;
|
return trimmer.CanBeUntrimmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
{
|
{
|
||||||
long maxReads = readSizeB / XCIFileTrimmer.BufferSize;
|
long maxReads = readSizeB / XCIFileTrimmer.BufferSize;
|
||||||
long read = 0;
|
long read = 0;
|
||||||
byte[] buffer = new byte[BufferSize];
|
var buffer = new byte[BufferSize];
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -269,7 +269,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
FileInfo info = new FileInfo(Filename);
|
var info = new FileInfo(Filename);
|
||||||
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -290,7 +290,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
return OperationOutcome.FileSizeChanged;
|
return OperationOutcome.FileSizeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileStream outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
|
var outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -326,7 +326,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
{
|
{
|
||||||
Log?.Write(LogType.Info, "Untrimming...");
|
Log?.Write(LogType.Info, "Untrimming...");
|
||||||
|
|
||||||
FileInfo info = new FileInfo(Filename);
|
var info = new FileInfo(Filename);
|
||||||
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -347,7 +347,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
return OperationOutcome.FileSizeChanged;
|
return OperationOutcome.FileSizeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileStream outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
|
var outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
|
||||||
long bytesToWriteB = UntrimmedFileSizeB - FileSizeB;
|
long bytesToWriteB = UntrimmedFileSizeB - FileSizeB;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -385,7 +385,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[BufferSize];
|
var buffer = new byte[BufferSize];
|
||||||
Array.Fill<byte>(buffer, XCIFileTrimmer.PaddingByte);
|
Array.Fill<byte>(buffer, XCIFileTrimmer.PaddingByte);
|
||||||
|
|
||||||
while (bytesLeftToWriteB > 0)
|
while (bytesLeftToWriteB > 0)
|
||||||
|
@ -3,7 +3,7 @@ using System;
|
|||||||
|
|
||||||
namespace Ryujinx.UI
|
namespace Ryujinx.UI
|
||||||
{
|
{
|
||||||
public class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
internal class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||||
{
|
{
|
||||||
private readonly MainWindow _mainWindow;
|
private readonly MainWindow _mainWindow;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ using Ryujinx.Ava.UI.ViewModels;
|
|||||||
|
|
||||||
namespace Ryujinx.Ava.Common
|
namespace Ryujinx.Ava.Common
|
||||||
{
|
{
|
||||||
class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
internal class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||||
{
|
{
|
||||||
private readonly MainWindowViewModel _viewModel;
|
private readonly MainWindowViewModel _viewModel;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user