-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
118 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# unpack.libmonodroid_bundle_app.so | ||
Unpack *.apk\lib\{ABI}\libmonodroid_bundle_app.so | ||
Unpack *.apk\lib\\{ABI\}\libmonodroid_bundle_app.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 12 additions & 1 deletion
13
unpack.libmonodroid_bundle_app.so/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
using System.Runtime.CompilerServices; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: SuppressIldasm] | ||
|
||
[assembly: AssemblyTitle("unpack.libmonodroid_bundle_app.so " + | ||
#if NET35 | ||
".NET Framework 3.5" | ||
#elif NET40 | ||
".NET Framework 4.0" | ||
#else | ||
"" | ||
#endif | ||
)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#if NET35 | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace System.IO | ||
{ | ||
/// <summary> | ||
/// CopyTo .NET Framework 3.5 | ||
/// </summary> | ||
public static class StreamExtension | ||
{ | ||
public static void CopyTo(this Stream source, Stream destination) => CopyTo(source, destination, 81920); | ||
|
||
public static void CopyTo(this Stream source, Stream destination, int bufferSize) | ||
{ | ||
if (source == null) | ||
throw new ArgumentNullException(nameof(source)); | ||
if (destination == null) | ||
throw new ArgumentNullException(nameof(destination)); | ||
if (bufferSize <= 0) | ||
throw new ArgumentOutOfRangeException(nameof(bufferSize), "ArgumentOutOfRange_NeedPosNum"); | ||
if (!source.CanRead && !source.CanWrite) | ||
throw new ObjectDisposedException(nameof(source), "ObjectDisposed_StreamClosed"); | ||
if (!destination.CanRead && !destination.CanWrite) | ||
throw new ObjectDisposedException(nameof(destination), "ObjectDisposed_StreamClosed"); | ||
if (!source.CanRead) | ||
throw new NotSupportedException(nameof(source) + "_NotSupported_UnreadableStream"); | ||
if (!destination.CanWrite) | ||
throw new NotSupportedException(nameof(destination) + "_NotSupported_UnwritableStream"); | ||
InternalCopyTo(source, destination, bufferSize); | ||
} | ||
|
||
private static void InternalCopyTo(Stream source, Stream destination, int bufferSize) | ||
{ | ||
byte[] buffer = new byte[bufferSize]; | ||
int count; | ||
while ((count = source.Read(buffer, 0, buffer.Length)) != 0) | ||
destination.Write(buffer, 0, count); | ||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// ReSharper disable once CheckNamespace | ||
namespace System | ||
{ | ||
/// <summary> | ||
/// System.String Extension | ||
/// </summary> | ||
public static partial class StringExtension | ||
{ | ||
#if NET35 | ||
/// <summary> | ||
/// 指示指定的字符串是 <see langword="null" />、空还是仅由空白字符组成。 | ||
/// </summary> | ||
/// <param name="value">要测试的字符串。</param> | ||
/// <returns> | ||
/// 如果 <see langword="true" /> 参数为 <paramref name="value" /> 或 <see langword="null" />,或者如果 <see cref="F:System.String.Empty" /> 仅由空白字符组成,则为 <paramref name="value" />。 | ||
/// </returns> | ||
public static bool IsNullOrWhiteSpace(this string value) | ||
{ | ||
if (value == null) | ||
return true; | ||
for (int index = 0; index < value.Length; ++index) | ||
{ | ||
if (!char.IsWhiteSpace(value[index])) | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
#else | ||
|
||
/// <summary> | ||
/// 指示指定的字符串是 <see langword="null" />、空还是仅由空白字符组成。 | ||
/// </summary> | ||
/// <param name="value">要测试的字符串。</param> | ||
/// <returns> | ||
/// 如果 <see langword="true" /> 参数为 <paramref name="value" /> 或 <see langword="null" />,或者如果 <see cref="F:System.String.Empty" /> 仅由空白字符组成,则为 <paramref name="value" />。 | ||
/// </returns> | ||
public static bool IsNullOrWhiteSpace(this string value) => string.IsNullOrWhiteSpace(value); | ||
|
||
#endif | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+596 Bytes
unpack.libmonodroid_bundle_app.so/unpack.libmonodroid_bundle_app.so.snk
Binary file not shown.