fixed decompiler errors - project compiles

This commit is contained in:
2017-10-06 18:20:35 +02:00
parent 2d8b6914b8
commit 9cefa0e9dd
40 changed files with 420 additions and 411 deletions

View File

@@ -141,7 +141,7 @@ namespace Rei.Fs
if (count <= 0)
return;
this.pBaseStream.Close();
EventHandler finishedEventEvent = this.ChunkFinishedEventEvent;
EventHandler finishedEventEvent = this.ChunkFinishedEvent;
if (finishedEventEvent != null)
finishedEventEvent((object) this, EventArgs.Empty);
this.Write(buffer, offset, count);

View File

@@ -176,7 +176,7 @@ namespace Rei.Fs
this.pDisposed = true;
try
{
EventHandler closingEventEvent = this.ClosingEventEvent;
EventHandler closingEventEvent = this.ClosingEvent;
if (closingEventEvent != null)
closingEventEvent((object) this, EventArgs.Empty);
}
@@ -184,7 +184,7 @@ namespace Rei.Fs
{
this.pBaseStream.Close();
}
EventHandler closedEventEvent = this.ClosedEventEvent;
EventHandler closedEventEvent = this.ClosedEvent;
if (closedEventEvent == null)
return;
closedEventEvent((object) this, EventArgs.Empty);

View File

@@ -192,7 +192,7 @@ namespace Rei.Fs
public void OnLogMessage(string message)
{
EventHandler<LogMessageEventArgs> logMessageEvent = this.LogMessageEvent;
EventHandler<LogMessageEventArgs> logMessageEvent = this.LogMessage;
if (logMessageEvent == null)
return;
logMessageEvent((object) this, new LogMessageEventArgs(message));

View File

@@ -36,7 +36,7 @@ namespace Rei.Fs
field.SetValue((object) this, (object) num);
}
protected override void InitializeAndValidate(Uri uri, ref UriFormatException parsingError)
protected override void InitializeAndValidate(Uri uri, out UriFormatException parsingError)
{
base.InitializeAndValidate(uri, out parsingError);
if (parsingError == null && Operators.CompareString(uri.Host, "", false) == 0)

View File

@@ -26,7 +26,7 @@ namespace Rei.Fs.IO
this.pCreationTime = DateTime.FromFileTime((long) d.ftCreationTime.dwHighDateTime << 32 | (long) d.ftCreationTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastAccessTime = DateTime.FromFileTime((long) d.ftLastAccessTime.dwHighDateTime << 32 | (long) d.ftLastAccessTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastWriteTime = DateTime.FromFileTime((long) d.ftLastWriteTime.dwHighDateTime << 32 | (long) d.ftLastWriteTime.dwLowDateTime & (long) uint.MaxValue);
this.pFileSize = checked ((ulong) d.nFileSizeHigh << 32 + (ulong) d.nFileSizeLow);
this.pFileSize = checked (((ulong) d.nFileSizeHigh << 32) + (ulong) d.nFileSizeLow);
this.pFileName = d.cFileName;
this.pAltFileName = d.cAlternateFileName;
this.pFullPath = path;
@@ -38,7 +38,7 @@ namespace Rei.Fs.IO
this.pCreationTime = DateTime.FromFileTime((long) d.ftCreationTime.dwHighDateTime << 32 | (long) d.ftCreationTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastAccessTime = DateTime.FromFileTime((long) d.ftLastAccessTime.dwHighDateTime << 32 | (long) d.ftLastAccessTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastWriteTime = DateTime.FromFileTime((long) d.ftLastWriteTime.dwHighDateTime << 32 | (long) d.ftLastWriteTime.dwLowDateTime & (long) uint.MaxValue);
this.pFileSize = checked ((ulong) d.nFileSizeHigh << 32 + (ulong) d.nFileSizeLow);
this.pFileSize = checked (((ulong) d.nFileSizeHigh << 32) + (ulong) d.nFileSizeLow);
this.pFileName = FileSystem.GetFilename(path);
this.pAltFileName = (string) null;
this.pFullPath = path;

View File

@@ -112,7 +112,7 @@ namespace Rei.Fs.IO
public static bool TryGetFileInfo(string path, ref FileInfo info)
{
string path1 = FileSystem.NormalizePath(path);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData=new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
if (!Win32Native.GetFileAttributesEx(FileSystem.NormalizePath(path), Win32Native.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, ref fileData))
{
switch (Marshal.GetLastWin32Error())
@@ -136,7 +136,7 @@ namespace Rei.Fs.IO
public static bool FileOrDirectoryExists(string path, ref bool isdirectory)
{
Win32Native.ErrorModeType uMode = Win32Native.SetErrorMode(Win32Native.ErrorModeType.SEM_FAILCRITICALERRORS);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData = new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
bool fileAttributesEx;
try
{
@@ -166,7 +166,7 @@ namespace Rei.Fs.IO
public static bool FileExists(string path)
{
Win32Native.ErrorModeType uMode = Win32Native.SetErrorMode(Win32Native.ErrorModeType.SEM_FAILCRITICALERRORS);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData = new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
bool fileAttributesEx;
try
{
@@ -193,7 +193,7 @@ namespace Rei.Fs.IO
public static bool DirectoryExists(string path)
{
Win32Native.ErrorModeType uMode = Win32Native.SetErrorMode(Win32Native.ErrorModeType.SEM_FAILCRITICALERRORS);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData = new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
bool fileAttributesEx;
try
{
@@ -237,7 +237,7 @@ namespace Rei.Fs.IO
while (num4 <= num3)
{
object structure = Marshal.PtrToStructure(ptr, typeof (Win32Native.SHARE_INFO_0));
Win32Native.SHARE_INFO_0 shareInfo0_1;
Win32Native.SHARE_INFO_0 shareInfo0_1=new Win32Native.SHARE_INFO_0();
Win32Native.SHARE_INFO_0 shareInfo0_2 = structure != null ? (Win32Native.SHARE_INFO_0) structure : shareInfo0_1;
stringList.Add(shareInfo0_2.shi0_netname);
ptr = new IntPtr(checked (ptr.ToInt32() + num1));
@@ -269,7 +269,7 @@ namespace Rei.Fs.IO
}
else
{
uint dwDesiredAccess;
uint dwDesiredAccess=0;
if (access == FileAccess.Read)
dwDesiredAccess = 2147483648U;
else if (access == FileAccess.Write)
@@ -357,7 +357,7 @@ namespace Rei.Fs.IO
public static void DeleteFile(string path, bool recursive)
{
string str1 = FileSystem.NormalizePath(path);
bool isdirectory;
bool isdirectory=false;
if (!FileSystem.FileOrDirectoryExists(str1, ref isdirectory))
throw new FileNotFoundException();
if (!isdirectory)
@@ -416,10 +416,10 @@ namespace Rei.Fs.IO
{
string str1 = FileSystem.NormalizePath(path1);
string str2 = FileSystem.NormalizePath(path2);
bool isdirectory1;
bool isdirectory1 = false;
if (!FileSystem.FileOrDirectoryExists(str1, ref isdirectory1))
throw new FileNotFoundException();
bool isdirectory2;
bool isdirectory2 = false;
if (!overwrite && FileSystem.FileOrDirectoryExists(str2, ref isdirectory2))
FileSystem.RaiseError(str2, 183);
if (!isdirectory1)

View File

@@ -166,18 +166,7 @@ label_19:
}
throw new Exception();
}
catch (Exception ex) when (
{
// ISSUE: unable to correctly present filter
ProjectData.SetProjectError(ex);
if (!(ex is InvalidServerResponseException))
{
SuccessfulFiltering;
}
else
throw;
}
)
catch (InvalidServerResponseException ex)
{
throw new InvalidServerResponseException("Cannot parse server response. index:" + index.ToString() + " arround: \"" + JsonObject.GetSubStrArround(str, index) + "\"");
}
@@ -229,18 +218,7 @@ label_19:
checked { ++index; }
}
}
catch (Exception ex) when (
{
// ISSUE: unable to correctly present filter
ProjectData.SetProjectError(ex);
if (!(ex is InvalidServerResponseException))
{
SuccessfulFiltering;
}
else
throw;
}
)
catch (InvalidServerResponseException ex)
{
throw new InvalidServerResponseException("Cannot parse server response. index:" + index.ToString() + " arround: \"" + JsonObject.GetSubStrArround(str, index) + "\"");
}

View File

@@ -36,7 +36,7 @@ namespace Rei.Fs
field.SetValue((object) this, (object) num);
}
protected override void InitializeAndValidate(Uri uri, ref UriFormatException parsingError)
protected override void InitializeAndValidate(Uri uri, out UriFormatException parsingError)
{
base.InitializeAndValidate(uri, out parsingError);
if (parsingError == null && Operators.CompareString(uri.Host, "", false) != 0)

View File

@@ -147,7 +147,7 @@ namespace Rei.Fs
this.pHasError = true;
throw;
}
long num;
long num=0;
return num;
}

View File

@@ -141,7 +141,7 @@ namespace Rei.Fs
if (str.Contains("%u") || str.Contains("%U"))
throw new ArgumentException("cannot use %u encoding uri");
List<byte> byteList = new List<byte>();
int index1;
int index1=0;
while (index1 < str.Length)
{
if ((int) str[index1] != 37)
@@ -382,10 +382,9 @@ namespace Rei.Fs
public static string CreateFormUrlencodedString(Dictionary<string, string> values)
{
List<string> stringList = new List<string>();
Dictionary<string, string>.KeyCollection.Enumerator enumerator;
Dictionary<string, string>.KeyCollection.Enumerator enumerator = values.Keys.GetEnumerator();
try
{
enumerator = values.Keys.GetEnumerator();
while (enumerator.MoveNext())
{
string current = enumerator.Current;

View File

@@ -24,10 +24,9 @@ namespace Rei.Fs
while (registeredModules.MoveNext())
authenticationModuleList.Add((IAuthenticationModule) registeredModules.Current);
AuthenticationManager.Register((IAuthenticationModule) new WebRequestCertificateValidationManager.FookAuthClient());
List<IAuthenticationModule>.Enumerator enumerator;
List<IAuthenticationModule>.Enumerator enumerator = authenticationModuleList.GetEnumerator();
try
{
enumerator = authenticationModuleList.GetEnumerator();
while (enumerator.MoveNext())
AuthenticationManager.Register(enumerator.Current);
}