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

Fix name violation #2219

Merged
merged 3 commits into from Sep 9, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -11,7 +11,7 @@ public static class ManagedFileDialogExtensions
{
private class ManagedSystemDialogImpl : ISystemDialogImpl
{
private async Task<string[]> Show(SystemDialog d, IWindowImpl parent)
private async Task<string[]> ShowAsync(SystemDialog d, IWindowImpl parent)
{
var model = new ManagedFileChooserViewModel((FileSystemDialog)d);

@@ -34,12 +34,12 @@ private async Task<string[]> Show(SystemDialog d, IWindowImpl parent)

public async Task<string[]> ShowFileDialogAsync(FileDialog dialog, IWindowImpl parent)
{
return await Show(dialog, parent);
return await ShowAsync(dialog, parent);
}

public async Task<string> ShowFolderDialogAsync(OpenFolderDialog dialog, IWindowImpl parent)
{
return (await Show(dialog, parent))?.FirstOrDefault();
return (await ShowAsync(dialog, parent))?.FirstOrDefault();
}
}

@@ -17,14 +17,18 @@ public enum SubSystemType : ushort
public struct ImageDosHeader
{
[FieldOffset(60)]
public uint e_lfanew;
private uint _fileAddressNew;

public uint FileAddressNew => _fileAddressNew;
}

[StructLayout(LayoutKind.Explicit)]
public struct ImageOptionalHeader
{
[FieldOffset(68)]
public ushort Subsystem;
private ushort _subsystem;

public ushort Subsystem => _subsystem;
This conversation was marked as resolved by yahiheb

This comment has been minimized.

Copy link
@nopara73

nopara73 Sep 10, 2019

Collaborator

@yahiheb note this broke the packager.

This comment has been minimized.

Copy link
@yahiheb

yahiheb Sep 10, 2019

Author Collaborator

:( sorry for that

}

/// <summary>
@@ -50,7 +54,7 @@ public PeUtility(string filePath)
var dosHeader = FromBinaryReader<ImageDosHeader>(reader);

// Seek the new PE Header and skip NtHeadersSignature (4 bytes) & IMAGE_FILE_HEADER struct (20bytes).
Stream.Seek(dosHeader.e_lfanew + 4 + 20, SeekOrigin.Begin);
Stream.Seek(dosHeader.FileAddressNew + 4 + 20, SeekOrigin.Begin);

MainHeaderOffset = Stream.Position;

@@ -6,7 +6,7 @@ namespace WalletWasabi.Exceptions
{
public class TorSocks5FailureResponseException : Exception
{
public RepField RepField;
public RepField RepField { get; }

public TorSocks5FailureResponseException(RepField rep) : base($"Tor SOCKS5 proxy responded with {rep}.")
{
@@ -12,22 +12,22 @@ internal class Penalty4 : Penalty
internal override int PenaltyCalculate(BitMatrix matrix)
{
int width = matrix.Width;
int DarkBitCount = 0;
int darkBitCount = 0;

for (int j = 0; j < width; j++)
{
for (int i = 0; i < width; i++)
{
if (matrix[i, j])
{
DarkBitCount++;
darkBitCount++;
}
}
}

int MatrixCount = width * width;
int matrixCount = width * width;

double ratio = (double)DarkBitCount / MatrixCount;
double ratio = (double)darkBitCount / matrixCount;

return System.Math.Abs((int)((ratio * 100) - 50)) / 5 * 10;
}
@@ -110,16 +110,16 @@ public void UpdateServerTipHeight(int height)
}
}

public bool TryGetHeight(uint256 hash, out int Height)
public bool TryGetHeight(uint256 hash, out int height)
{
lock (Lock)
{
Height = Chain.FirstOrDefault(x => x.Value == hash).Key;
height = Chain.FirstOrDefault(x => x.Value == hash).Key;

// Default int will be 0. We do not know if this refers to the 0th hash or it just means the hash was not found.
// So let's check if the height contains or not.
// If the given height is 0, then check if the chain has a key with 0. If it does not have, then return false. If it has, check if the hash is the same or not.
if (Height == 0 && (!Chain.ContainsKey(0) || Chain[0] != hash))
if (height == 0 && (!Chain.ContainsKey(0) || Chain[0] != hash))
{
return false;
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.