Remove some unused extensions, Remove Extensions.cs and move methods into better named files with their own namespaces
This commit is contained in:
parent
6269e957e6
commit
1c0eca190e
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Common.IOExtensions;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
<Compile Include="Buffer.cs" />
|
||||
<Compile Include="Colors.cs" />
|
||||
<Compile Include="CustomCollections.cs" />
|
||||
<Compile Include="Extensions\BufferExtensions.cs" />
|
||||
<Compile Include="Extensions\CollectionExtensions.cs" />
|
||||
<Compile Include="Extensions\Extensions.cs" />
|
||||
<Compile Include="Extensions\IOExtensions.cs" />
|
||||
<Compile Include="Extensions\NumberExtensions.cs" />
|
||||
<Compile Include="Extensions\ReflectionExtensions.cs" />
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace BizHawk.Common
|
||||
namespace BizHawk.Common.BufferExtensions
|
||||
{
|
||||
public static class Extensions
|
||||
public static class BufferExtensions
|
||||
{
|
||||
public static string GetDirectory(this Assembly asm)
|
||||
{
|
||||
var codeBase = asm.CodeBase;
|
||||
var uri = new UriBuilder(codeBase);
|
||||
var path = Uri.UnescapeDataString(uri.Path);
|
||||
|
||||
return Path.GetDirectoryName(path);
|
||||
}
|
||||
|
||||
public static void SaveAsHex(this byte[] buffer, TextWriter writer)
|
||||
{
|
||||
foreach (var b in buffer)
|
||||
|
@ -90,7 +78,7 @@ namespace BizHawk.Common
|
|||
|
||||
public static void ReadFromHex(this byte[] buffer, string hex)
|
||||
{
|
||||
if (hex.Length%2 != 0)
|
||||
if (hex.Length % 2 != 0)
|
||||
{
|
||||
throw new Exception("Hex value string does not appear to be properly formatted.");
|
||||
}
|
||||
|
@ -186,4 +174,4 @@ namespace BizHawk.Common
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace BizHawk.Common.ReflectionExtensions
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SNES;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Nintendo.N64.NativeApi;
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BizHawk.Emulation.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
using BizHawk.Common;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
||||
{
|
||||
[CoreAttributes(
|
||||
|
|
|
@ -16,6 +16,7 @@ using System.Collections.Generic;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.IO;
|
|||
using System.Globalization;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Common.IOExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Common.Components;
|
||||
using BizHawk.Emulation.Cores.Components.M68000;
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.IO;
|
|||
using System.ComponentModel;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.DiscSystem;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
|
Loading…
Reference in New Issue