├── .gitignore ├── .vscode ├── c_cpp_properties.json ├── launch.json ├── settings.json └── tasks.json ├── LICENSE ├── Makefile ├── README.md ├── appmenu ├── Program.cs └── appmenu.csproj ├── corlib ├── Properties │ └── AssemblyInfo.cs ├── Psp │ ├── BasicGraphics.cs │ ├── BasicGraphics2.cs │ ├── Color.cs │ ├── Controls.cs │ ├── Debug.cs │ ├── Display.cs │ ├── Kernel.cs │ ├── Rect.cs │ └── State.cs ├── System.Collections.Generic │ ├── Comparer.cs │ ├── Dictionary.cs │ ├── EqualityComparer.cs │ ├── GenericEqualityComparer.cs │ ├── HashSet.cs │ ├── ICollection.cs │ ├── IComparer.cs │ ├── IDictionary.cs │ ├── IEnumerable.cs │ ├── IEnumerator.cs │ ├── IEqualityComparer.cs │ ├── IList.cs │ ├── KeyNotFoundException.cs │ ├── KeyValuePair.cs │ └── List.cs ├── System.Collections │ ├── ArrayList.cs │ ├── DictionaryEntry.cs │ ├── ICollection.cs │ ├── IComparer.cs │ ├── IDictionary.cs │ ├── IDictionaryEnumerator.cs │ ├── IEnumerable.cs │ ├── IEnumerator.cs │ ├── IEqualityComparer.cs │ └── IList.cs ├── System.ComponentModel.DataAnnotations │ ├── DisplayNameAttribute.cs │ ├── RequiredAttribute.cs │ ├── StringLengthAttribute.cs │ └── ValidationAttribute.cs ├── System.Diagnostics │ └── Debugger.cs ├── System.Globalization │ ├── Calendar.cs │ ├── CalendarWeekRule.cs │ ├── CalendricalCalculations.cs │ ├── CultureInfo.cs │ ├── CultureTypes.cs │ ├── DateTimeFormatInfo.cs │ ├── DigitShapes.cs │ ├── GregorianCalendar.cs │ ├── GregorianCalendarTypes.cs │ ├── NumberFormatInfo.cs │ ├── NumberStyles.cs │ ├── TextInfo.cs │ └── UnicodeCategory.cs ├── System.IO │ ├── CheckArgument.cs │ ├── Directory.cs │ ├── DirectoryInfo.cs │ ├── DirectoryNotFoundException.cs │ ├── File.cs │ ├── FileAccess.cs │ ├── FileAttributes.cs │ ├── FileInfo.cs │ ├── FileInternal.cs │ ├── FileMode.cs │ ├── FileNotFoundException.cs │ ├── FileShare.cs │ ├── FileStream.cs │ ├── FileSystemInfo.cs │ ├── IOException.cs │ ├── Path.cs │ ├── SearchPattern.cs │ ├── SeekOrigin.cs │ ├── Stream.cs │ ├── StreamReader.cs │ ├── StringReader.cs │ └── TextReader.cs ├── System.Linq │ ├── Enumerable.cs │ ├── Grouping.cs │ ├── IGrouping.cs │ ├── ILookup.cs │ ├── IOrderedEnumerable.cs │ ├── Lookup.cs │ └── OrderedEnumerable.cs ├── System.Net.Http │ ├── HttpClient.cs │ ├── HttpContent.cs │ ├── HttpMethod.cs │ ├── HttpRequestMessage.cs │ ├── HttpResponseMessage.cs │ ├── HttpStatusCode.cs │ └── StringContent.cs ├── System.Reflection │ ├── Assembly.cs │ ├── AssemblyName.cs │ ├── Attributes.cs │ ├── CustomAttributeExtensions.cs │ ├── DefaultMemberAttribute.cs │ ├── IntrospectionExtensions.cs │ ├── MemberInfo.cs │ ├── MethodInfo.cs │ ├── PropertyInfo.cs │ ├── RuntimeReflectionExtensions.cs │ └── TypeInfo.cs ├── System.Runtime.CompilerServices │ ├── AsyncMethodBuilderCore.cs │ ├── AsyncMethodTaskCacheOfTResult.cs │ ├── AsyncServices.cs │ ├── AsyncTaskMethodBuilder.cs │ ├── AsyncTaskMethodBuilderOfTResult.cs │ ├── AsyncVoidMethodBuilder.cs │ ├── ExtensionAttribute.cs │ ├── IAsyncMethodBuilder.cs │ ├── IAsyncStateMachine.cs │ ├── ICriticalNotifyCompletion.cs │ ├── INotifyCompletion.cs │ ├── IndexerNameAttribute.cs │ ├── MethodImplAttribute.cs │ ├── MethodImplOptions.cs │ ├── RuntimeHelpers.cs │ ├── TaskAwaiter.cs │ └── VoidTaskResult.cs ├── System.Runtime.InteropServices │ ├── CallingConvention.cs │ ├── CharSet.cs │ ├── DllImportAttribute.cs │ ├── ExternalException.cs │ ├── GCHandle.cs │ ├── InAttribute.cs │ ├── Json │ │ └── Json.cs │ └── OutAttribute.cs ├── System.Runtime.Versioning │ └── TargetFrameworkAttribute.cs ├── System.Text │ ├── Decoder.cs │ ├── Encoding.cs │ ├── StringBuilder.cs │ ├── UTF8Encoding.cs │ └── UnicodeEncoding.cs ├── System.Threading │ ├── Interlocked.cs │ ├── Monitor.cs │ ├── ParameterizedThreadStart.cs │ ├── Tasks │ │ ├── Task.cs │ │ └── TaskCompletionSource.cs │ ├── Thread.cs │ ├── ThreadStart.cs │ ├── ThreadState.cs │ └── WaitHandle.cs ├── System │ ├── Action.cs │ ├── Activator.cs │ ├── AggregateException.cs │ ├── ArgumentException.cs │ ├── ArgumentNullException.cs │ ├── ArgumentOutOfRangeException.cs │ ├── ArithmeticException.cs │ ├── Array.cs │ ├── ArrayTypeMismatchException.cs │ ├── AsyncCallback.cs │ ├── Attribute.cs │ ├── AttributeTargets.cs │ ├── AttributeUsageAttribute.cs │ ├── BitConverter.cs │ ├── Boolean.cs │ ├── Byte.cs │ ├── Char.cs │ ├── CharEnumerator.cs │ ├── Console.cs │ ├── ConsoleKey.cs │ ├── ConsoleKeyInfo.cs │ ├── ConsoleModifiers.cs │ ├── Converter.cs │ ├── DateTime.cs │ ├── DateTimeKind.cs │ ├── DateTimeOffset.cs │ ├── DayOfWeek.cs │ ├── Decimal.cs │ ├── Delegate.cs │ ├── Double.cs │ ├── Enum.cs │ ├── Environment.cs │ ├── Exception.cs │ ├── FlagsAttribute.cs │ ├── FormatException.cs │ ├── Func.cs │ ├── GC.cs │ ├── IAsyncResult.cs │ ├── ICloneable.cs │ ├── IComparable.cs │ ├── ICustomFormatter.cs │ ├── IDisposable.cs │ ├── IEquatable.cs │ ├── IFormatProvider.cs │ ├── IFormattable.cs │ ├── IndexOutOfRangeException.cs │ ├── Int16.cs │ ├── Int32.cs │ ├── Int64.cs │ ├── IntPtr.cs │ ├── InvalidCastException.cs │ ├── InvalidOperationException.cs │ ├── MarshalByRefObject.cs │ ├── Math.cs │ ├── MulticastDelegate.cs │ ├── MulticastNotSupportedException.cs │ ├── NotImplementedException.cs │ ├── NotSupportedException.cs │ ├── NullReferenceException.cs │ ├── Nullable.cs │ ├── NumberFormatter.cs │ ├── Object.cs │ ├── ObjectDisposedException.cs │ ├── OperatingSystem.cs │ ├── OperationCanceledException.cs │ ├── OverflowException.cs │ ├── ParamArrayAttribute.cs │ ├── ParseHelper.cs │ ├── PlatformID.cs │ ├── Predicate.cs │ ├── Random.cs │ ├── RuntimeFieldHandle.cs │ ├── RuntimeMethodHandle.cs │ ├── RuntimeType.cs │ ├── RuntimeTypeHandle.cs │ ├── SByte.cs │ ├── Single.cs │ ├── String.cs │ ├── StringComparison.cs │ ├── StringHelper.cs │ ├── SystemException.cs │ ├── TimeSpan.cs │ ├── Type.cs │ ├── UInt16.cs │ ├── UInt32.cs │ ├── UInt64.cs │ ├── UIntPtr.cs │ ├── ValueType.cs │ ├── Version.cs │ ├── Void.cs │ └── WeakReference.cs └── corlib.csproj ├── dna-net.sln ├── flappy ├── Program.cs ├── flappy.csproj └── res │ ├── background.bmp │ ├── background.pxm │ ├── bird-0.bmp │ ├── bird-1.bmp │ ├── bird-2.bmp │ ├── bird-3.bmp │ └── pillar.bmp ├── global.json ├── native ├── .vscode │ ├── c_cpp_properties.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── Bugs.txt ├── CIL_OpCodes.h ├── CLIFile.c ├── CLIFile.h ├── ChangeLog.txt ├── Compat.h ├── Config.h ├── Delegate.c ├── Delegate.h ├── EvalStack.h ├── Finalizer.c ├── Finalizer.h ├── Fonts │ ├── arial.ttf │ ├── tahoma.ttf │ └── verdana.ttf ├── Generics.c ├── Generics.h ├── Heap.c ├── Heap.h ├── InternalCall.c ├── InternalCall.h ├── JIT.c ├── JIT.h ├── JIT_Execute.c ├── JIT_OpCodes.h ├── Makefile ├── MetaData.c ├── MetaData.h ├── MetaDataTables.h ├── MetaData_Fill.c ├── MetaData_Search.c ├── MethodState.c ├── MethodState.h ├── Psp.BasicGraphics.c ├── Psp.BasicGraphics.h ├── Psp.BasicGraphics2.c ├── Psp.Controls.c ├── Psp.Controls.h ├── Psp.Debug.c ├── Psp.Debug.h ├── Psp.Display.c ├── Psp.Display.h ├── Psp.Kernel.c ├── Psp.Kernel.h ├── README.md ├── RVA.c ├── RVA.h ├── Reflection.c ├── Reflection.h ├── Sys.c ├── Sys.h ├── System.Array.c ├── System.Array.h ├── System.Attribute.h ├── System.Char.CaseConversion.h ├── System.Char.UC_IndexRuns.h ├── System.Char.c ├── System.Char.h ├── System.Console.c ├── System.Console.h ├── System.DateTime.c ├── System.DateTime.h ├── System.Diagnostics.Debugger.c ├── System.Diagnostics.Debugger.h ├── System.Enum.c ├── System.Enum.h ├── System.Environment.c ├── System.Environment.h ├── System.GC.c ├── System.GC.h ├── System.IO.FileInternal.c ├── System.IO.FileInternal.h ├── System.Math.c ├── System.Math.h ├── System.Net.Dns.c ├── System.Net.Dns.h ├── System.Net.Sockets.Socket.c ├── System.Net.Sockets.Socket.h ├── System.Object.c ├── System.Object.h ├── System.Reflection.MemberInfo.h ├── System.Reflection.MethodBase.h ├── System.Reflection.MethodInfo.h ├── System.Reflection.PropertyInfo.h ├── System.Runtime.CompilerServices.RuntimeHelpers.c ├── System.Runtime.CompilerServices.RuntimeHelpers.h ├── System.RuntimeType.c ├── System.RuntimeType.h ├── System.String.c ├── System.String.h ├── System.Threading.Interlocked.c ├── System.Threading.Interlocked.h ├── System.Threading.Monitor.c ├── System.Threading.Monitor.h ├── System.Threading.Thread.c ├── System.Threading.Thread.h ├── System.Type.c ├── System.Type.h ├── System.ValueType.c ├── System.ValueType.h ├── System.WeakReference.c ├── System.WeakReference.h ├── Thread.c ├── Thread.h ├── Type.c ├── Type.h ├── Types.h ├── callback.c ├── callback.h ├── controls.c ├── controls.h ├── diet-fnmatch.c ├── diet-fnmatch.h ├── diet-glob.c ├── diet-glob.h ├── dietfeatures.h ├── dna.c ├── dna.vcproj ├── dna.vcxproj ├── dna.vcxproj.filters ├── dummypspkeys.h ├── graph.c ├── graph.h ├── graph_sdl.c ├── icon0.png └── incompatible │ ├── PInvoke.c │ ├── PInvoke.h │ ├── PInvoke_CaseCode.h │ ├── PInvoke_TypeDef.h │ ├── System.Console.c │ └── System.Console.h ├── pspbuild.mak ├── rockbound2 ├── ImageResources.cs ├── Program.cs ├── res │ ├── ICON0.png │ ├── PIC1.png │ ├── SND0.at3 │ ├── pickup.raw │ ├── select.raw │ ├── tada.raw │ └── wall.raw └── rockbound2.csproj ├── testSimple ├── Nuget.config ├── Program.cs ├── res │ └── test.bmp └── testSimple.csproj └── tet ├── Tet.cs └── tet.csproj /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "psp-mac", 5 | "includePath": [ 6 | "${workspaceFolder}/**", 7 | "/usr/local/pspdev/psp/include", 8 | "/usr/local/pspdev/psp/sdk/include", 9 | "/usr/local/pspdev/x86_64-apple-darwin19.6.0/psp/include", 10 | "/usr/local/pspdev/lib/gcc/psp/9.3.0/include" 11 | ], 12 | "defines": [ 13 | "_DEBUG", 14 | "UNICODE", 15 | "_UNICODE", 16 | "__PSP__" 17 | ], 18 | "compilerPath": "/usr/local/pspdev/bin/psp-gcc", 19 | "cStandard": "c11", 20 | "cppStandard": "c++14", 21 | "intelliSenseMode": "gcc-x64", 22 | "configurationProvider": "ms-vscode.makefile-tools" 23 | }, 24 | { 25 | "name": "psp-win10", 26 | "includePath": [ 27 | "${workspaceFolder}/**", 28 | "C:/pspsdk/psp/include", 29 | "C:/pspsdk/psp/sdk/include", 30 | "C:/pspsdk/i686-pc-mingw32/psp/include", 31 | "C:/pspsdk/lib/gcc/psp/8.2.0/include" 32 | ], 33 | "defines": [ 34 | "_DEBUG", 35 | "UNICODE", 36 | "_UNICODE", 37 | "__PSP__" 38 | ], 39 | "compilerPath": "C:/pspsdk/bin/psp-gcc.exe", 40 | "cStandard": "c11", 41 | "cppStandard": "c++14", 42 | "intelliSenseMode": "gcc-x64", 43 | "configurationProvider": "ms-vscode.makefile-tools" 44 | } 45 | ], 46 | "version": 4 47 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "(lldb) Launch", 9 | "type": "cppdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/host/dna", 12 | "args": [], 13 | "stopAtEntry": false, 14 | "cwd": "${workspaceFolder}/host", 15 | "environment": [], 16 | "externalConsole": false, 17 | "MIMode": "lldb" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "dotnet.defaultSolution": "dna-net.sln", 3 | "files.associations": { 4 | "stat.h": "c", 5 | "glob.h": "c", 6 | "controls.h": "c", 7 | "sdl.h": "c", 8 | "sdl_main.h": "c", 9 | "sdl_stdinc.h": "c", 10 | "sdl_config.h": "c", 11 | "sdl_ttf.h": "c", 12 | "pspkernel.h": "c", 13 | "pspctrl.h": "c" 14 | } 15 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "type": "cppbuild", 5 | "label": "C/C++: psp-gcc build active file", 6 | "command": "/usr/local/pspdev/bin/psp-gcc", 7 | "args": [ 8 | "-g", 9 | "${file}", 10 | "-o", 11 | "${fileDirname}/${fileBasenameNoExtension}" 12 | ], 13 | "options": { 14 | "cwd": "${fileDirname}" 15 | }, 16 | "problemMatcher": [ 17 | "$gcc" 18 | ], 19 | "group": { 20 | "kind": "build", 21 | "isDefault": true 22 | }, 23 | "detail": "Task generated by Debugger." 24 | } 25 | ], 26 | "version": "2.0.0" 27 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2021, Matt Emson 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /appmenu/appmenu.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Library 5 | netstandard2.0 6 | Dna.AppMenu 7 | true 8 | true 9 | false 10 | true 11 | 0 12 | 13 | 14 | ..\build 15 | false 16 | 17 | 18 | ..\build 19 | false 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /corlib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /*using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("corlib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("corlib")] 13 | [assembly: AssemblyCopyright("Copyright © 2007")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("32d5f5f8-8b09-424d-ad44-4ed1da918a19")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("2.0.0.0")] 35 | [assembly: AssemblyFileVersion("2.0.0.0")] 36 | */ -------------------------------------------------------------------------------- /corlib/Psp/BasicGraphics.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace Psp 4 | { 5 | // If you are using the app menu, you really can't mix 6 | // graphics libs... you must use BasicGraphics2... 7 | public static class BasicGraphics 8 | { 9 | [MethodImpl(MethodImplOptions.InternalCall)] 10 | extern public static void Init(); 11 | 12 | [MethodImpl(MethodImplOptions.InternalCall)] 13 | extern static void NativeClear(uint color); 14 | 15 | public static void Clear(Color color) 16 | { 17 | NativeClear(color.ToNative()); 18 | } 19 | 20 | [MethodImpl(MethodImplOptions.InternalCall)] 21 | extern public static void SwapBuffers(); 22 | 23 | [MethodImpl(MethodImplOptions.InternalCall)] 24 | extern static void NativeDrawRect(int x, int y, int w, int h, uint color); 25 | 26 | public static void DrawRect(int x, int y, int w, int h, Color color) 27 | { 28 | NativeDrawRect(x, y, w, h, color.ToNative()); 29 | } 30 | 31 | public static void DrawRect(Rect rect, Color color) 32 | { 33 | DrawRect(rect.X, rect.Y, rect.Width, rect.Height, color); 34 | } 35 | 36 | [MethodImpl(MethodImplOptions.InternalCall)] 37 | public extern static void DrawImage(int x, int y, int w, int h, uint[] pixels); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /corlib/Psp/Debug.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Psp 5 | { 6 | public static class Debug 7 | { 8 | [MethodImpl(MethodImplOptions.InternalCall)] 9 | extern static void NativeScreenPrintf(string s); 10 | 11 | [MethodImpl(MethodImplOptions.InternalCall)] 12 | extern public static void ScreenClear(); 13 | 14 | public static void ScreenPrintf(string s, params object[] p) 15 | { 16 | NativeScreenPrintf(string.Format(s, p)); 17 | } 18 | 19 | public static void ScreenPrintfLine(string s, params object[] p) 20 | { 21 | NativeScreenPrintf(string.Format($"{s}\n", p)); 22 | } 23 | 24 | [MethodImpl(MethodImplOptions.InternalCall)] 25 | extern public static void ScreenSetXY(int x, int y); 26 | 27 | [MethodImpl(MethodImplOptions.InternalCall)] 28 | extern public static void ScreenPrintf(int x, int y, string s); 29 | 30 | [MethodImpl(MethodImplOptions.InternalCall)] 31 | extern static void NativeWrite(string s); 32 | 33 | public static void Write(string s, params object[] p) 34 | { 35 | NativeWrite(string.Format(s, p)); 36 | } 37 | 38 | public static void WriteLine(string s, params object[] p) 39 | { 40 | NativeWrite(string.Format($"{s}\n", p)); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /corlib/Psp/Display.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace Psp 4 | { 5 | public static class Display 6 | { 7 | [MethodImpl(MethodImplOptions.InternalCall)] 8 | extern public static int WaitVblankStart(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /corlib/Psp/Kernel.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace Psp 4 | { 5 | public static class Kernel 6 | { 7 | [MethodImpl(MethodImplOptions.InternalCall)] 8 | extern public static void ExitGame(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /corlib/Psp/Rect.cs: -------------------------------------------------------------------------------- 1 | namespace Psp 2 | { 3 | public struct Rect 4 | { 5 | public int X; 6 | public int Y; 7 | public int Width; 8 | public int Height; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /corlib/Psp/State.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Psp 5 | { 6 | public static class State 7 | { 8 | [MethodImpl(MethodImplOptions.InternalCall)] 9 | extern static int NativeIsRunning(); 10 | 11 | public static bool IsRunning() 12 | { 13 | return (NativeIsRunning() == 1); 14 | } 15 | 16 | // this is a hack, but if we set this we will 17 | // be able to chain in the next app when the 18 | // last app starts. 19 | [MethodImpl(MethodImplOptions.InternalCall)] 20 | public extern static void SetAppName(string appname); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/GenericEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Text; 24 | 25 | namespace System.Collections.Generic { 26 | class GenericEqualityComparer : EqualityComparer where T : IEquatable { 27 | 28 | public override bool Equals(T x, T y) { 29 | if (x == null) { 30 | return y == null; 31 | } 32 | return x.Equals(y); 33 | } 34 | 35 | public override int GetHashCode(T obj) { 36 | if (obj == null) { 37 | return 0; 38 | } 39 | return obj.GetHashCode(); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/IComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Collections.Generic { 24 | 25 | public interface IComparer { 26 | 27 | int Compare(T x, T y); 28 | 29 | } 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/IDictionary.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections.Generic { 26 | public interface IDictionary : ICollection> { 27 | 28 | void Add(TKey key, TValue value); 29 | bool ContainsKey(TKey key); 30 | bool Remove(TKey key); 31 | bool TryGetValue(TKey key, out TValue value); 32 | TValue this[TKey key] { get; set; } 33 | ICollection Keys { get; } 34 | ICollection Values { get; } 35 | 36 | } 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/IEnumerable.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | using System.Collections; 25 | 26 | namespace System.Collections.Generic { 27 | 28 | public interface IEnumerable : IEnumerable { 29 | 30 | new IEnumerator GetEnumerator(); 31 | 32 | } 33 | 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/IEnumerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections.Generic { 26 | 27 | public interface IEnumerator : IDisposable, IEnumerator { 28 | 29 | new T Current { 30 | get; 31 | } 32 | 33 | } 34 | 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/IEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | using System.Collections.Generic; 25 | using System.Text; 26 | 27 | namespace System.Collections.Generic { 28 | 29 | public interface IEqualityComparer { 30 | 31 | bool Equals(T x, T y); 32 | int GetHashCode(T obj); 33 | 34 | } 35 | 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/IList.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections.Generic { 26 | 27 | public interface IList : ICollection { 28 | 29 | // DO NOT change the order of these method definitions. 30 | // The auto-generated IList interface on Array relies on the order. 31 | 32 | int IndexOf(T item); 33 | 34 | void Insert(int index, T item); 35 | 36 | void RemoveAt(int index); 37 | 38 | T this[int index] { 39 | get; 40 | set; 41 | } 42 | 43 | } 44 | 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /corlib/System.Collections.Generic/KeyNotFoundException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections.Generic { 26 | public class KeyNotFoundException : SystemException { 27 | 28 | public KeyNotFoundException() : base("The given key was not present in the dictionary.") { } 29 | 30 | public KeyNotFoundException(string message) : base(message) { } 31 | 32 | public KeyNotFoundException(string message, Exception inner) : base(message, inner) { } 33 | 34 | } 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /corlib/System.Collections/ICollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections { 26 | public interface ICollection : IEnumerable { 27 | 28 | int Count { get; } 29 | 30 | bool IsSynchronized { get; } 31 | 32 | object SyncRoot { get; } 33 | 34 | void CopyTo(Array array, int index); 35 | 36 | } 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /corlib/System.Collections/IComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Collections { 24 | public interface IComparer { 25 | 26 | int Compare(object x, object y); 27 | 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System.Collections/IDictionary.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections { 26 | public interface IDictionary : ICollection { 27 | 28 | bool IsFixedSize { get; } 29 | bool IsReadOnly { get; } 30 | object this[object key] { get; set; } 31 | ICollection Keys { get; } 32 | ICollection Values { get; } 33 | void Add(object key, object value); 34 | void Clear(); 35 | bool Contains(object key); 36 | new IDictionaryEnumerator GetEnumerator(); 37 | void Remove(object key); 38 | 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /corlib/System.Collections/IDictionaryEnumerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Collections { 26 | public interface IDictionaryEnumerator : IEnumerator { 27 | 28 | DictionaryEntry Entry { get; } 29 | object Key { get; } 30 | object Value { get; } 31 | 32 | } 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System.Collections/IEnumerable.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | namespace System.Collections { 23 | 24 | public interface IEnumerable { 25 | 26 | IEnumerator GetEnumerator(); 27 | 28 | } 29 | 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System.Collections/IEnumerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | namespace System.Collections { 23 | 24 | public interface IEnumerator { 25 | object Current { get;} 26 | bool MoveNext(); 27 | void Reset(); 28 | } 29 | 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System.Collections/IEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | using System.Collections.Generic; 25 | using System.Text; 26 | 27 | namespace System.Collections { 28 | 29 | public interface IEqualityComparer { 30 | 31 | bool Equals(object x, object y); 32 | int GetHashCode(object obj); 33 | 34 | } 35 | 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /corlib/System.ComponentModel.DataAnnotations/DisplayNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.ComponentModel 6 | { 7 | public class DisplayNameAttribute : Attribute 8 | { 9 | private readonly string _displayName; 10 | 11 | public DisplayNameAttribute() : this(null) 12 | { 13 | } 14 | 15 | public DisplayNameAttribute(string displayName) 16 | { 17 | _displayName = displayName; 18 | } 19 | 20 | public string DisplayName => _displayName; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /corlib/System.ComponentModel.DataAnnotations/RequiredAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.ComponentModel.DataAnnotations 6 | { 7 | public class RequiredAttribute : ValidationAttribute 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /corlib/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.ComponentModel.DataAnnotations 6 | { 7 | public class StringLengthAttribute : ValidationAttribute 8 | { 9 | private readonly int _maximumLength; 10 | 11 | public StringLengthAttribute(int maximumLength) 12 | { 13 | _maximumLength = maximumLength; 14 | } 15 | 16 | public int MinimumLength => 0; 17 | public int MaximumLength => _maximumLength; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /corlib/System.ComponentModel.DataAnnotations/ValidationAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace System.ComponentModel.DataAnnotations 2 | { 3 | public class ValidationAttribute : Attribute 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /corlib/System.Diagnostics/Debugger.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System.Runtime.CompilerServices; 24 | namespace System.Diagnostics { 25 | public sealed class Debugger { 26 | 27 | [MethodImpl(MethodImplOptions.InternalCall)] 28 | extern public static void Break(); 29 | 30 | [MethodImpl(MethodImplOptions.InternalCall)] 31 | extern private static void Internal_BreakPoint(int method, int offset); 32 | 33 | } 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /corlib/System.Globalization/Calendar.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System.Globalization { 8 | public abstract class Calendar { 9 | 10 | internal static Calendar CreateByName(string name) { 11 | switch (name) { 12 | case "GregorianCalendar:Localized": 13 | return new GregorianCalendar(); 14 | default: 15 | Console.WriteLine("Calendar: {0}", name); 16 | return null; 17 | //throw new NotSupportedException(string.Format("Calendar name '{0}' not known", name)); 18 | } 19 | } 20 | 21 | public const int CurrentEra = 0; 22 | 23 | public abstract int[] Eras { get;} 24 | public abstract int GetEra(DateTime dt); 25 | public abstract int GetDayOfMonth(DateTime time); 26 | public abstract DayOfWeek GetDayOfWeek(DateTime time); 27 | public abstract int GetMonth(DateTime time); 28 | public abstract int GetYear(DateTime time); 29 | 30 | internal string[] eraNames; 31 | internal string[] eraAbbrNames; 32 | 33 | public bool IsReadOnly { 34 | get { 35 | // Only support read-only calendars for now. 36 | return true; 37 | } 38 | } 39 | 40 | public virtual DateTime MaxSupportedDateTime { 41 | get { 42 | return DateTime.MaxValue; 43 | } 44 | } 45 | 46 | public virtual DateTime MinSupportedDateTime { 47 | get { 48 | return DateTime.MinValue; 49 | } 50 | } 51 | 52 | public virtual int TwoDigitYearMax { 53 | get { 54 | return 2029; 55 | } 56 | } 57 | 58 | } 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /corlib/System.Globalization/CalendarWeekRule.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System.Globalization { 8 | public enum CalendarWeekRule { 9 | FirstDay = 0, 10 | FirstFullWeek = 1, 11 | FirstFourDayWeek = 2 12 | } 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /corlib/System.Globalization/CultureTypes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Globalization { 4 | [Flags] 5 | public enum CultureTypes { 6 | NeutralCultures = 1, 7 | SpecificCultures = 2, 8 | InstalledWin32Cultures = 4, 9 | AllCultures = 7, 10 | UserCustomCulture = 8, 11 | ReplacementCultures = 16, 12 | WindowsOnlyCultures = 32, 13 | FrameworkCultures = 64, 14 | } 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /corlib/System.Globalization/DigitShapes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Globalization { 4 | public enum DigitShapes { 5 | Context = 0, 6 | None = 1, 7 | NativeNational = 2 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /corlib/System.Globalization/GregorianCalendar.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System.Globalization { 8 | public class GregorianCalendar : Calendar { 9 | 10 | public const int ADEra = 1; 11 | 12 | private GregorianCalendarTypes type; 13 | 14 | public GregorianCalendar() : this(GregorianCalendarTypes.Localized) { } 15 | 16 | public GregorianCalendar(GregorianCalendarTypes type) { 17 | base.eraNames = new string[] { "A.D." }; 18 | base.eraAbbrNames = new string[] { "AD" }; 19 | this.type = type; 20 | } 21 | 22 | public override int[] Eras { 23 | get { 24 | return new int[] { ADEra }; 25 | } 26 | } 27 | 28 | public override int GetEra(DateTime dt) { 29 | return ADEra; 30 | } 31 | 32 | public override DayOfWeek GetDayOfWeek(DateTime time) { 33 | int rd = CCFixed.FromDateTime(time); 34 | return (DayOfWeek)CCFixed.day_of_week(rd); 35 | } 36 | 37 | public override int GetDayOfMonth(DateTime time) { 38 | return CCGregorianCalendar.GetDayOfMonth(time); 39 | } 40 | 41 | public override int GetMonth(DateTime time) { 42 | return CCGregorianCalendar.GetMonth(time); 43 | } 44 | 45 | public override int GetYear(DateTime time) { 46 | return CCGregorianCalendar.GetYear(time); 47 | } 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /corlib/System.Globalization/GregorianCalendarTypes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System.Globalization { 8 | public enum GregorianCalendarTypes { 9 | Localized = 1, 10 | USEnglish = 2, 11 | MiddleEastFrench = 9, 12 | Arabic = 10, 13 | TransliteratedEnglish = 11, 14 | TransliteratedFrench = 12, 15 | } 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /corlib/System.Globalization/NumberStyles.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Globalization { 4 | public enum NumberStyles { 5 | None = 0x00000000, 6 | AllowLeadingWhite = 0x00000001, 7 | AllowTrailingWhite = 0x00000002, 8 | AllowLeadingSign = 0x00000004, 9 | AllowTrailingSign = 0x00000008, 10 | AllowParentheses = 0x00000010, 11 | AllowDecimalPoint = 0x00000020, 12 | AllowThousands = 0x00000040, 13 | AllowExponent = 0x00000080, 14 | AllowCurrencySymbol = 0x00000100, 15 | AllowHexSpecifier = 0x00000200, 16 | 17 | Integer = (AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign), 18 | HexNumber = (AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier), 19 | Number = (AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | 20 | AllowTrailingSign | AllowDecimalPoint | AllowThousands), 21 | Float = (AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | 22 | AllowDecimalPoint | AllowExponent), 23 | Currency = (AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | 24 | AllowTrailingSign | AllowParentheses | AllowDecimalPoint | 25 | AllowThousands | AllowCurrencySymbol), 26 | Any = (AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | 27 | AllowTrailingSign | AllowParentheses | AllowDecimalPoint | 28 | AllowThousands | AllowExponent | AllowCurrencySymbol), 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System.Globalization/UnicodeCategory.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Globalization { 4 | public enum UnicodeCategory { 5 | UppercaseLetter = 0, 6 | LowercaseLetter = 1, 7 | TitlecaseLetter = 2, 8 | ModifierLetter = 3, 9 | OtherLetter = 4, 10 | NonSpacingMark = 5, 11 | SpacingCombiningMark = 6, 12 | EnclosingMark = 7, 13 | DecimalDigitNumber = 8, 14 | LetterNumber = 9, 15 | OtherNumber = 10, 16 | SpaceSeparator = 11, 17 | LineSeparator = 12, 18 | ParagraphSeparator = 13, 19 | Control = 14, 20 | Format = 15, 21 | Surrogate = 16, 22 | PrivateUse = 17, 23 | ConnectorPunctuation = 18, 24 | DashPunctuation = 19, 25 | OpenPunctuation = 20, 26 | ClosePunctuation = 21, 27 | InitialQuotePunctuation = 22, 28 | FinalQuotePunctuation = 23, 29 | OtherPunctuation = 24, 30 | MathSymbol = 25, 31 | CurrencySymbol = 26, 32 | ModifierSymbol = 27, 33 | OtherSymbol = 28, 34 | OtherNotAssigned = 29, 35 | } 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /corlib/System.IO/DirectoryNotFoundException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public class DirectoryNotFoundException : SystemException { 5 | 6 | public DirectoryNotFoundException() : base("Directory not found.") { } 7 | public DirectoryNotFoundException(string msg) : base(msg) { } 8 | 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /corlib/System.IO/File.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public static class File { 5 | 6 | public static FileStream OpenRead(string path) { 7 | return new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); 8 | } 9 | 10 | public static StreamReader OpenText(string path) { 11 | return new StreamReader(path); 12 | } 13 | 14 | public static bool Exists(string path) { 15 | if (string.IsNullOrEmpty(path)) { 16 | return false; 17 | } 18 | int error; 19 | return FileInternal.ExistsFile(path, out error); 20 | } 21 | 22 | } 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /corlib/System.IO/FileAccess.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileAccess : int { 5 | Read = 1, 6 | Write = 2, 7 | ReadWrite = Read | Write, 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /corlib/System.IO/FileAttributes.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileAttributes { 5 | Archive = 0x00020, 6 | Compressed = 0x00800, 7 | Device = 0x00040, // Reserved for future use (NOT the w32 value). 8 | Directory = 0x00010, 9 | Encrypted = 0x04000, // NOT the w32 value 10 | Hidden = 0x00002, 11 | Normal = 0x00080, 12 | NotContentIndexed = 0x02000, 13 | Offline = 0x01000, 14 | ReadOnly = 0x00001, 15 | ReparsePoint = 0x00400, 16 | SparseFile = 0x00200, 17 | System = 0x00004, 18 | Temporary = 0x00100 19 | } 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /corlib/System.IO/FileInfo.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public sealed class FileInfo : FileSystemInfo { 5 | 6 | #pragma warning disable 0169 7 | private bool exists; 8 | #pragma warning restore 0169 9 | 10 | public FileInfo(string path) { 11 | CheckPath(path); 12 | 13 | base.originalPath = path; 14 | base.fullPath = Path.GetFullPath(path); 15 | } 16 | 17 | public override bool Exists { 18 | get { throw new Exception("The method or operation is not implemented."); } 19 | } 20 | 21 | public override string Name { 22 | get { 23 | return Path.GetFileName(base.fullPath); 24 | } 25 | } 26 | 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /corlib/System.IO/FileMode.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileMode : int { 5 | CreateNew = 1, 6 | Create = 2, 7 | Open = 3, 8 | OpenOrCreate = 4, 9 | Truncate = 5, 10 | Append = 6, 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /corlib/System.IO/FileNotFoundException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public class FileNotFoundException : IOException { 5 | 6 | public FileNotFoundException(string msg) : base(msg) { } 7 | 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /corlib/System.IO/FileShare.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum FileShare : int { 5 | None = 0, 6 | Read = 1, 7 | Write = 2, 8 | ReadWrite = 3, 9 | Delete = 4, 10 | Inheritable = 16, 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /corlib/System.IO/FileSystemInfo.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public abstract class FileSystemInfo : MarshalByRefObject { 5 | 6 | protected string fullPath = null; 7 | protected string originalPath = null; 8 | 9 | internal void CheckPath(string path) { 10 | if (path == null) 11 | throw new ArgumentNullException("path"); 12 | 13 | if (path.Length == 0) 14 | throw new ArgumentException("path", "Empty path."); 15 | 16 | if (path.IndexOfAny(Path.InvalidPathChars) != -1) 17 | throw new ArgumentException("path", "Invalid characters in path."); 18 | } 19 | 20 | public abstract bool Exists { get; } 21 | 22 | public abstract string Name { get; } 23 | 24 | public virtual string FullName { 25 | get { 26 | return this.fullPath; 27 | } 28 | } 29 | 30 | public string Extension { 31 | get { 32 | return Path.GetExtension(Name); 33 | } 34 | } 35 | 36 | } 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /corlib/System.IO/IOException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public class IOException : SystemException { 5 | 6 | public IOException() : base("I/O Error") { } 7 | public IOException(string message) : base(message) { } 8 | 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /corlib/System.IO/SearchPattern.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | internal class SearchPattern { 5 | 6 | internal static readonly char[] WildcardChars = { '*', '?' }; 7 | internal static readonly char[] InvalidChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; 8 | 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /corlib/System.IO/SeekOrigin.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.IO { 4 | public enum SeekOrigin : int { 5 | Begin = 0, 6 | Current = 1, 7 | End = 2, 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /corlib/System.Linq/IGrouping.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | using System.Collections; 26 | 27 | namespace System.Linq { 28 | public interface IGrouping : IEnumerable, IEnumerable { 29 | 30 | TKey Key { get; } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /corlib/System.Linq/ILookup.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | using System.Collections; 26 | 27 | namespace System.Linq { 28 | public interface ILookup : IEnumerable>, IEnumerable { 29 | 30 | bool Contains(TKey key); 31 | int Count { get; } 32 | IEnumerable this[TKey key] { get; } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /corlib/System.Linq/IOrderedEnumerable.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | 26 | namespace System.Linq { 27 | 28 | public interface IOrderedEnumerable : IEnumerable { 29 | 30 | IOrderedEnumerable CreateOrderedEnumerable( 31 | Func selector, IComparer comparer, bool descending); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /corlib/System.Net.Http/HttpContent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace System.Net.Http 5 | { 6 | public class HttpContent 7 | { 8 | protected IDictionary dictionary; 9 | 10 | public HttpContent(IDictionary dictionary) 11 | { 12 | this.dictionary = dictionary; 13 | } 14 | 15 | public Task ReadAsStringAsync() 16 | { 17 | var tcs = new TaskCompletionSource(); 18 | tcs.TrySetResult((string)dictionary["bodyText"]); 19 | return tcs.Task; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /corlib/System.Net.Http/HttpRequestMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Net.Http 6 | { 7 | public class HttpRequestMessage 8 | { 9 | private IDictionary dictionary; 10 | 11 | public HttpRequestMessage(HttpMethod method, string requestUri) 12 | { 13 | Method = method; 14 | Url = requestUri; 15 | } 16 | 17 | public HttpRequestMessage(IDictionary dictionary) 18 | { 19 | this.dictionary = dictionary; 20 | Content = new HttpContent(dictionary); 21 | StatusCode = (HttpStatusCode)((int)dictionary["statusCode"]); 22 | } 23 | 24 | public HttpContent Content { get; set; } 25 | 26 | public HttpStatusCode StatusCode { get; } 27 | 28 | public HttpMethod Method { get; set; } 29 | 30 | public string Url { get; set; } 31 | 32 | 33 | //public HttpResponseMessage EnsureSuccessStatusCode() 34 | //{ 35 | // if ((int)StatusCode >= 300) 36 | // { 37 | // throw new Exception($"Status Code {StatusCode}"); 38 | // } 39 | 40 | // return this; 41 | //} 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /corlib/System.Net.Http/HttpResponseMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Net.Http 6 | { 7 | public class HttpResponseMessage 8 | { 9 | private IDictionary dictionary; 10 | 11 | public HttpResponseMessage(IDictionary dictionary) 12 | { 13 | this.dictionary = dictionary; 14 | Content = new HttpContent(dictionary); 15 | StatusCode = (HttpStatusCode)((int)dictionary["statusCode"]); 16 | } 17 | 18 | public HttpContent Content { get; } 19 | 20 | public HttpStatusCode StatusCode { get; } 21 | 22 | public HttpResponseMessage EnsureSuccessStatusCode() 23 | { 24 | if ((int)StatusCode >= 300) 25 | { 26 | throw new Exception($"Status Code {StatusCode}"); 27 | } 28 | 29 | return this; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /corlib/System.Net.Http/StringContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Net.Http 6 | { 7 | public class StringContent : HttpContent 8 | { 9 | public StringContent(string content) 10 | : base(new Dictionary()) 11 | { 12 | dictionary["bodyText"] = content; 13 | dictionary["mediaType"] = "application/json"; 14 | } 15 | 16 | public string Content { get { return (string)dictionary["bodyText"]; } } 17 | 18 | public string MediaType { get { return (string)dictionary["mediaType"]; } } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /corlib/System.Reflection/Assembly.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace System.Reflection 4 | { 5 | public class Assembly 6 | { 7 | 8 | public static Assembly Load(AssemblyName assemblyRef) 9 | { 10 | if (string.IsNullOrEmpty(assemblyRef.Name)) 11 | { 12 | throw new ArgumentException("Assembly name cannot be null or empty"); 13 | } 14 | 15 | // For now, this is just a way of ensuring the referenced assembly exists and is loaded. 16 | // Returning null because there's not currently any need to implement all the 17 | // reflection functionality that would be required to have useful behaviour 18 | // on Assembly instances. 19 | 20 | Type.EnsureAssemblyLoaded(assemblyRef.Name); 21 | return null; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /corlib/System.Reflection/AssemblyName.cs: -------------------------------------------------------------------------------- 1 | namespace System.Reflection 2 | { 3 | public sealed class AssemblyName 4 | { 5 | public AssemblyName() {} 6 | 7 | public AssemblyName(string assemblyName) : this() 8 | { 9 | Name = assemblyName; 10 | } 11 | 12 | public string Name { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /corlib/System.Reflection/CustomAttributeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace System.Reflection 5 | { 6 | public static class CustomAttributeExtensions 7 | { 8 | public static IEnumerable GetCustomAttributes(this MemberInfo element) 9 | { 10 | var customAttributeInfos = element.GetCustomAttributes(); 11 | var result = new Attribute[customAttributeInfos.Length]; 12 | for (var i = 0; i < customAttributeInfos.Length; i++) 13 | { 14 | var uninitializedInstance = customAttributeInfos[i].UninitializedInstance; 15 | result[i] = uninitializedInstance; 16 | 17 | // Call the constructor 18 | customAttributeInfos[i].ConstructorMethodBase.Invoke( 19 | uninitializedInstance, 20 | customAttributeInfos[i].ConstructorParams); 21 | } 22 | return result; 23 | } 24 | } 25 | 26 | internal struct InternalCustomAttributeInfo 27 | { 28 | #pragma warning disable 0649 29 | public Attribute UninitializedInstance; 30 | public MethodBase ConstructorMethodBase; 31 | public object[] ConstructorParams; 32 | #pragma warning restore 0649 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /corlib/System.Reflection/DefaultMemberAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Reflection { 26 | 27 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] 28 | public sealed class DefaultMemberAttribute : Attribute { 29 | 30 | private string memberName; 31 | 32 | public DefaultMemberAttribute(string memberName) { 33 | this.memberName = memberName; 34 | } 35 | 36 | public string MemberName { 37 | get { 38 | return this.memberName; 39 | } 40 | } 41 | } 42 | } 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /corlib/System.Reflection/IntrospectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Reflection 6 | { 7 | public static class IntrospectionExtensions 8 | { 9 | public static TypeInfo GetTypeInfo(this Type type) 10 | { 11 | return new TypeInfo(type); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /corlib/System.Reflection/MethodInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace System.Reflection 4 | { 5 | public abstract class MethodInfo : MethodBase 6 | { 7 | } 8 | 9 | public abstract class MethodBase : MemberInfo 10 | { 11 | #pragma warning disable 0169, 0649 12 | private readonly IntPtr _methodDef; 13 | #pragma warning restore 0169, 0649 14 | 15 | public object Invoke(object target, object[] parameters) 16 | { 17 | // This is not invoked at runtime, because the JITter specifically replaces calls 18 | // to MethodBase.Invoke with its own special opcode 19 | throw new NotImplementedException(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /corlib/System.Reflection/PropertyInfo.cs: -------------------------------------------------------------------------------- 1 | namespace System.Reflection 2 | { 3 | public abstract class PropertyInfo : MemberInfo 4 | { 5 | #pragma warning disable 0649 6 | private readonly Type _propertyType; 7 | #pragma warning restore 0649 8 | 9 | public Type PropertyType => _propertyType; 10 | 11 | public MethodInfo GetGetMethod() 12 | { 13 | return _ownerType.GetMethod("get_" + _name); 14 | } 15 | 16 | public MethodInfo GetSetMethod() 17 | { 18 | return _ownerType.GetMethod("set_" + _name); 19 | } 20 | 21 | public MethodInfo GetMethod => GetGetMethod(); 22 | public MethodInfo SetMethod => GetSetMethod(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /corlib/System.Reflection/RuntimeReflectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Reflection 6 | { 7 | public static class RuntimeReflectionExtensions 8 | { 9 | public static IEnumerable GetRuntimeProperties(this Type type) 10 | { 11 | return type.GetProperties(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /corlib/System.Reflection/TypeInfo.cs: -------------------------------------------------------------------------------- 1 | namespace System.Reflection 2 | { 3 | public class TypeInfo : MemberInfo 4 | { 5 | private readonly Type _type; 6 | 7 | internal TypeInfo(Type type) : base(type, type.Name) 8 | { 9 | _type = type; 10 | } 11 | 12 | public bool IsValueType => _type.IsValueType; 13 | } 14 | } -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/AsyncServices.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | using System.Threading; 5 | 6 | namespace System.Runtime.CompilerServices 7 | { 8 | internal static class AsyncServices 9 | { 10 | internal static void ThrowAsync(Exception exception, object targetContext) 11 | { 12 | new Thread(() => 13 | { 14 | throw exception; 15 | }).Start(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/ExtensionAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | 26 | namespace System.Runtime.CompilerServices { 27 | 28 | [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] 29 | public sealed class ExtensionAttribute : Attribute { 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/IAsyncMethodBuilder.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | internal interface IAsyncMethodBuilder 7 | { 8 | void PreBoxInitialization(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// 7 | /// Represents state machines generated for asynchronous methods. 8 | /// This type is intended for compiler use only. 9 | /// 10 | public interface IAsyncStateMachine 11 | { 12 | /// Moves the state machine to its next state. 13 | void MoveNext(); 14 | /// Configures the state machine with a heap-allocated replica. 15 | /// The heap-allocated replica. 16 | void SetStateMachine(IAsyncStateMachine stateMachine); 17 | } 18 | } -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/ICriticalNotifyCompletion.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// 7 | /// Represents an awaiter used to schedule continuations when an await operation completes. 8 | /// 9 | public interface ICriticalNotifyCompletion : INotifyCompletion 10 | { 11 | /// Schedules the continuation action to be invoked when the instance completes. 12 | /// The action to invoke when the operation completes. 13 | /// The argument is null (Nothing in Visual Basic). 14 | /// Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. 15 | void UnsafeOnCompleted(Action continuation); 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/INotifyCompletion.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// 7 | /// Represents an operation that will schedule continuations when the operation completes. 8 | /// 9 | public interface INotifyCompletion 10 | { 11 | /// Schedules the continuation action to be invoked when the instance completes. 12 | /// The action to invoke when the operation completes. 13 | /// The argument is null (Nothing in Visual Basic). 14 | void OnCompleted(Action continuation); 15 | } 16 | } -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/IndexerNameAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Runtime.CompilerServices { 26 | 27 | [AttributeUsage(AttributeTargets.Property, Inherited = true)] 28 | public sealed class IndexerNameAttribute : Attribute { 29 | 30 | public IndexerNameAttribute(string indexName) { 31 | } 32 | 33 | } 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/MethodImplOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Runtime.CompilerServices { 26 | [Flags] 27 | public enum MethodImplOptions { 28 | Unmanaged = 0x0004, 29 | ForwardRef = 0x0010, 30 | InternalCall = 0x1000, 31 | Synchronized = 0x0020, 32 | NoInlining = 0x0008, 33 | PreserveSig = 0x0080, 34 | } 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Runtime.CompilerServices { 26 | public static class RuntimeHelpers { 27 | 28 | [MethodImplAttribute(MethodImplOptions.InternalCall)] 29 | extern public static void InitializeArray(Array array, RuntimeFieldHandle fldHandle); 30 | 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/TaskAwaiter.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace System.Runtime.CompilerServices 4 | { 5 | public struct TaskAwaiter : INotifyCompletion, ICriticalNotifyCompletion 6 | { 7 | private readonly Task _owner; 8 | 9 | internal TaskAwaiter(Task owner) 10 | { 11 | _owner = owner; 12 | } 13 | 14 | public void OnCompleted(Action continuation) 15 | { 16 | _owner.ContinueWith(_ => continuation()); 17 | } 18 | 19 | public void UnsafeOnCompleted(Action continuation) 20 | { 21 | OnCompleted(continuation); 22 | } 23 | 24 | public bool IsCompleted => _owner.IsCompleted; 25 | 26 | public void GetResult() 27 | { 28 | var evaluated = _owner.Result; 29 | } 30 | } 31 | 32 | public struct TaskAwaiter : INotifyCompletion, ICriticalNotifyCompletion 33 | { 34 | private readonly Task _owner; 35 | 36 | internal TaskAwaiter(Task owner) 37 | { 38 | _owner = owner; 39 | } 40 | 41 | public void OnCompleted(Action continuation) 42 | { 43 | _owner.ContinueWith(_ => continuation()); 44 | } 45 | 46 | public void UnsafeOnCompleted(Action continuation) 47 | { 48 | OnCompleted(continuation); 49 | } 50 | 51 | public bool IsCompleted => _owner.IsCompleted; 52 | 53 | public T GetResult() 54 | { 55 | return _owner.Result; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /corlib/System.Runtime.CompilerServices/VoidTaskResult.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// Used with Task(of void) 7 | internal struct VoidTaskResult { 8 | } 9 | } -------------------------------------------------------------------------------- /corlib/System.Runtime.InteropServices/CallingConvention.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Runtime.InteropServices { 24 | public enum CallingConvention { 25 | Winapi = 1, 26 | Cdecl = 2, 27 | StdCall = 3, 28 | ThisCall = 4, 29 | FastCall = 5, 30 | } 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /corlib/System.Runtime.InteropServices/CharSet.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Runtime.InteropServices { 24 | public enum CharSet { 25 | None = 1, 26 | Ansi = 2, 27 | Unicode = 3, 28 | Auto = 4, 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System.Runtime.InteropServices/InAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Runtime.InteropServices { 24 | 25 | [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] 26 | public sealed class InAttribute : Attribute { 27 | public InAttribute() { } 28 | } 29 | 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System.Runtime.InteropServices/OutAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Runtime.InteropServices { 26 | 27 | [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] 28 | public sealed class OutAttribute : Attribute { 29 | public OutAttribute() { } 30 | } 31 | 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs: -------------------------------------------------------------------------------- 1 | // From https://github.com/Microsoft/referencesource 2 | // See copyright and license details in that repo 3 | 4 | namespace System.Runtime.Versioning 5 | { 6 | public sealed class TargetFrameworkAttribute : Attribute 7 | { 8 | public TargetFrameworkAttribute(string frameworkName) 9 | { 10 | FrameworkName = frameworkName; 11 | } 12 | public string FrameworkDisplayName { get; set; } 13 | public string FrameworkName { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /corlib/System.Text/UnicodeEncoding.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System.Text { 4 | public class UnicodeEncoding : Encoding { 5 | 6 | private class UnicodeDecoder : Decoder { 7 | 8 | private bool bigEndian; 9 | 10 | public UnicodeDecoder(bool bigEndian) { 11 | this.bigEndian = bigEndian; 12 | } 13 | 14 | protected override int GetCharsSafe(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush) { 15 | throw new Exception("The method or operation is not implemented."); 16 | } 17 | } 18 | 19 | private bool bigEndian; 20 | private bool byteOrderMark; 21 | private bool throwOnInvalidBytes; 22 | 23 | public UnicodeEncoding() : this(false, true, false) { } 24 | 25 | public UnicodeEncoding(bool bigEndian, bool byteOrderMark) : this(bigEndian, byteOrderMark, false) { } 26 | 27 | public UnicodeEncoding(bool bigEndian, bool byteOrderMark, bool throwOnInvalidBytes) { 28 | this.bigEndian = bigEndian; 29 | this.byteOrderMark = byteOrderMark; 30 | this.throwOnInvalidBytes = throwOnInvalidBytes; 31 | } 32 | 33 | public override byte[] GetPreamble() { 34 | if (byteOrderMark) { 35 | byte[] preamble = new byte[2] { 0xff, 0xfe }; 36 | if (bigEndian) { 37 | Array.Reverse(preamble); 38 | } 39 | return preamble; 40 | } else { 41 | return new byte[0]; 42 | } 43 | } 44 | 45 | public override int GetMaxCharCount(int byteCount) { 46 | if (byteCount < 0) { 47 | throw new ArgumentOutOfRangeException("byteCount"); 48 | } 49 | return byteCount / 2; 50 | } 51 | 52 | public override Decoder GetDecoder() { 53 | return new UnicodeDecoder(this.bigEndian); 54 | } 55 | 56 | } 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /corlib/System.Threading/ParameterizedThreadStart.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Threading { 24 | public delegate void ParameterizedThreadStart(object obj); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /corlib/System.Threading/Tasks/TaskCompletionSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Threading.Tasks 6 | { 7 | public class TaskCompletionSource 8 | { 9 | private Task _task = new Task(); 10 | 11 | public Task Task => _task; 12 | 13 | void SetResult(T result) 14 | { 15 | _task.MarkCompleted(result); 16 | } 17 | 18 | void SetException(Exception ex) 19 | { 20 | _task.MarkFailed(ex); 21 | } 22 | 23 | public Task FromResult(T i) 24 | { 25 | return Task; 26 | } 27 | 28 | // Note: Don't add a generic param here (e.g., TrySetResult) because it triggers 29 | // some bug in the DNA runtime leading to crashes at the start of any method that contains 30 | // a call to this. 31 | internal bool TrySetResult(object result) 32 | { 33 | if (_task.IsCompleted) 34 | { 35 | return false; 36 | } 37 | else 38 | { 39 | _task.MarkCompleted(result); 40 | return true; 41 | } 42 | } 43 | 44 | internal bool TrySetCanceled() 45 | { 46 | throw new NotImplementedException("Task cancellation"); 47 | } 48 | 49 | internal bool TrySetException(Exception exception) 50 | { 51 | if (_task.IsCompleted) 52 | { 53 | return false; 54 | } 55 | else 56 | { 57 | _task.MarkFailed(exception); 58 | return true; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /corlib/System.Threading/ThreadStart.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Threading { 24 | public delegate void ThreadStart(); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /corlib/System.Threading/ThreadState.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System.Threading { 24 | 25 | [Flags] 26 | public enum ThreadState { 27 | Running = 0x00000000, 28 | StopRequested = 0x00000001, 29 | SuspendRequested = 0x00000002, 30 | Background = 0x00000004, 31 | Unstarted = 0x00000008, 32 | Stopped = 0x00000010, 33 | WaitSleepJoin = 0x00000020, 34 | Suspended = 0x00000040, 35 | AbortRequested = 0x00000080, 36 | Aborted = 0x00000100, 37 | } 38 | 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /corlib/System.Threading/WaitHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System.Threading { 26 | public abstract class WaitHandle : MarshalByRefObject, IDisposable { 27 | 28 | public void Dispose() { 29 | } 30 | 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System/Action.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public delegate void Action(); 25 | public delegate void Action (T1 arg1); 26 | public delegate void Action(T1 arg1, T2 arg2); 27 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3); 28 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4); 29 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System/Activator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Runtime.CompilerServices; 24 | using System.Text; 25 | 26 | namespace System { 27 | 28 | public static class Activator { 29 | [MethodImpl(MethodImplOptions.InternalCall)] 30 | public extern static object CreateInstance(Type type); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /corlib/System/AggregateException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System 6 | { 7 | public class AggregateException : Exception 8 | { 9 | public AggregateException(Exception exception) : base("Error occurred: " + exception.Message, exception) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /corlib/System/ArgumentOutOfRangeException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class ArgumentOutOfRangeException : ArgumentException { 25 | 26 | public ArgumentOutOfRangeException() : base("Argument is out of range.") { } 27 | 28 | public ArgumentOutOfRangeException(string paramName) : base("Argument is out of range.", paramName) { } 29 | 30 | public ArgumentOutOfRangeException(string paramName, string msg) : base(msg, paramName) { } 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System/ArithmeticException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class ArithmeticException : SystemException { 25 | 26 | public ArithmeticException() : base("Overflow or underflow in the arithmetic operation.") { } 27 | public ArithmeticException(string msg) : base(msg) { } 28 | 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System/ArrayTypeMismatchException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class ArrayTypeMismatchException : SystemException { 25 | 26 | public ArrayTypeMismatchException() : base("Source array type cannot be assigned to destination array type.") { } 27 | public ArrayTypeMismatchException(string msg) : base(msg) { } 28 | 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System/AsyncCallback.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | 25 | public delegate void AsyncCallback(IAsyncResult ar); 26 | 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /corlib/System/Attribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public abstract class Attribute { 25 | } 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /corlib/System/BitConverter.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Runtime.CompilerServices; 4 | namespace System { 5 | public static class BitConverter { 6 | 7 | public static readonly bool IsLittleEndian = AmILittleEndian(); 8 | 9 | private unsafe static bool AmILittleEndian() { 10 | int i = 1; 11 | byte b = *((byte*)&i); 12 | return (b == 1); 13 | } 14 | 15 | public unsafe static long DoubleToInt64Bits(double value) { 16 | return *((long*)&value); 17 | } 18 | 19 | } 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /corlib/System/CharEnumerator.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Collections.Generic; 4 | using System.Collections; 5 | 6 | namespace System { 7 | public sealed class CharEnumerator : ICloneable, IEnumerator, IEnumerator { 8 | 9 | private string str; 10 | private int index; 11 | private int length; 12 | 13 | internal CharEnumerator(string s) { 14 | this.str = s; 15 | this.index = -1; 16 | this.length = s.Length; 17 | } 18 | 19 | #region IClonable Members 20 | 21 | public object Clone() { 22 | return object.Clone(this); 23 | } 24 | 25 | #endregion 26 | 27 | #region IEnumerator Members 28 | 29 | object IEnumerator.Current { 30 | get { 31 | return Current; 32 | } 33 | } 34 | 35 | public bool MoveNext() { 36 | this.index++; 37 | return (this.index < this.length); 38 | } 39 | 40 | public void Reset() { 41 | this.index = -1; 42 | } 43 | 44 | #endregion 45 | 46 | #region IEnumerator Members 47 | 48 | public char Current { 49 | get { 50 | if (index == -1 || index >= length) { 51 | throw new InvalidOperationException("The position is not valid."); 52 | } 53 | return str[index]; 54 | } 55 | } 56 | 57 | #endregion 58 | 59 | #region IDisposable Members 60 | 61 | public void Dispose() { 62 | // Nothing needed 63 | } 64 | 65 | #endregion 66 | } 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /corlib/System/ConsoleModifiers.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | [Flags] 5 | public enum ConsoleModifiers { 6 | Alt = 1, 7 | Shift = 2, 8 | Control = 4 9 | } 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /corlib/System/Converter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public delegate TOutput Converter(TInput input); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /corlib/System/DateTimeKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public enum DateTimeKind { 25 | Unspecified, 26 | Utc, 27 | Local 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System/DateTimeOffset.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Runtime.CompilerServices; 4 | using System.Globalization; 5 | using System.Text; 6 | namespace System { 7 | public struct DateTimeOffset { 8 | 9 | 10 | } 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /corlib/System/DayOfWeek.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public enum DayOfWeek { 5 | Sunday, 6 | Monday, 7 | Tuesday, 8 | Wednesday, 9 | Thursday, 10 | Friday, 11 | Saturday 12 | } 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /corlib/System/Decimal.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public struct Decimal { 25 | 26 | // internal representation of decimal 27 | #pragma warning disable 0169, 0649 28 | private uint flags; 29 | private uint hi; 30 | private uint lo; 31 | private uint mid; 32 | #pragma warning restore 0169, 0649 33 | 34 | public static int[] GetBits(Decimal d) { 35 | return new int[] { 0, 0, 0, 0 }; 36 | } 37 | 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /corlib/System/Delegate.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public abstract class Delegate { 5 | 6 | // These must be the same as defined in the interpreter 7 | // If/when reflection is implemented, this IntPtr may change to MethodInfo 8 | private object targetObj = null; 9 | private IntPtr targetMethod = IntPtr.Zero; 10 | protected Delegate pNext = null; 11 | 12 | public override bool Equals(object obj) { 13 | Delegate d = obj as Delegate; 14 | if (d == null) { 15 | return false; 16 | } 17 | return d.targetObj == this.targetObj && d.targetMethod.Equals(this.targetMethod); 18 | } 19 | 20 | public override int GetHashCode() { 21 | int ret = targetMethod.GetHashCode(); 22 | if (targetObj != null) { 23 | ret ^= targetObj.GetHashCode(); 24 | } 25 | return ret; 26 | } 27 | 28 | public static Delegate Combine(Delegate a, Delegate b) { 29 | if (a == null) { 30 | return b; 31 | } else if (b == null) { 32 | return a; 33 | } 34 | 35 | if (a.GetType() != b.GetType()) { 36 | throw new ArgumentException("Incompatible delegate types"); 37 | } 38 | 39 | return a.CombineImpl(b); 40 | } 41 | 42 | protected virtual Delegate CombineImpl(Delegate d) { 43 | throw new MulticastNotSupportedException(); 44 | } 45 | 46 | public static Delegate Remove(Delegate source, Delegate value) { 47 | if (source == null) { 48 | return null; 49 | } 50 | return source.RemoveImpl(value); 51 | } 52 | 53 | protected virtual Delegate RemoveImpl(Delegate d) { 54 | if (d.Equals(this)) { 55 | return null; 56 | } 57 | return this; 58 | } 59 | } 60 | } 61 | 62 | #endif -------------------------------------------------------------------------------- /corlib/System/Exception.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public class Exception { 5 | 6 | private Exception innerException; 7 | private string message; 8 | private int hresult = unchecked((int)0x80004005); 9 | 10 | public Exception() { } 11 | 12 | public Exception(string message) { 13 | this.message = message; 14 | } 15 | 16 | public Exception(string message, Exception innerException) { 17 | this.innerException = innerException; 18 | this.message = message; 19 | } 20 | 21 | public virtual string Message { 22 | get { 23 | return message; 24 | } 25 | } 26 | 27 | public Exception InnerException { 28 | get { 29 | return innerException; 30 | } 31 | } 32 | 33 | protected int HResult { 34 | get { return hresult; } 35 | set { hresult = value; } 36 | } 37 | 38 | public override string ToString() { 39 | return Message ?? string.Empty; 40 | } 41 | } 42 | } 43 | 44 | #endif -------------------------------------------------------------------------------- /corlib/System/FlagsAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | 25 | [AttributeUsage(AttributeTargets.Enum, Inherited=false)] 26 | public sealed class FlagsAttribute : Attribute { 27 | } 28 | 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System/FormatException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public class FormatException : SystemException { 5 | public FormatException() : base("Invalid Format.") { } 6 | public FormatException(string msg) : base(msg) { } 7 | } 8 | } 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /corlib/System/Func.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System 6 | { 7 | public delegate TRes Func(); 8 | public delegate TRes Func(T1 arg1); 9 | public delegate TRes Func(T1 arg1, T2 arg2); 10 | public delegate TRes Func(T1 arg1, T2 arg2, T3 arg3); 11 | public delegate TRes Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4); 12 | public delegate TRes Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); 13 | } 14 | -------------------------------------------------------------------------------- /corlib/System/IAsyncResult.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System.Threading; 4 | 5 | namespace System { 6 | public interface IAsyncResult { 7 | 8 | object AsyncState { get;} 9 | WaitHandle AsyncWaitHandle { get; } 10 | bool CompletedSynchronously { get; } 11 | bool IsCompleted { get; } 12 | 13 | } 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /corlib/System/ICloneable.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public interface ICloneable { 25 | 26 | object Clone(); 27 | 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System/IComparable.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | 5 | public interface IComparable { 6 | int CompareTo(object obj); 7 | } 8 | 9 | public interface IComparable { 10 | int CompareTo(T x); 11 | } 12 | 13 | } 14 | 15 | #endif -------------------------------------------------------------------------------- /corlib/System/ICustomFormatter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public interface ICustomFormatter { 25 | 26 | string Format(string format, object arg, IFormatProvider formatProvider); 27 | 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System/IDisposable.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public interface IDisposable { 5 | void Dispose(); 6 | } 7 | } 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /corlib/System/IEquatable.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | 25 | public interface IEquatable { 26 | bool Equals(T x); 27 | } 28 | 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System/IFormatProvider.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace System { 8 | public interface IFormatProvider { 9 | object GetFormat(Type formatType); 10 | } 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /corlib/System/IFormattable.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public interface IFormattable { 25 | 26 | string ToString(string format, IFormatProvider formatProvider); 27 | 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /corlib/System/IndexOutOfRangeException.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public class IndexOutOfRangeException : SystemException { 5 | 6 | public IndexOutOfRangeException() : base("Array index is out of range.") { } 7 | 8 | public IndexOutOfRangeException(string message) : base(message) { } 9 | 10 | public IndexOutOfRangeException(string message, Exception innerException) 11 | : base(message, innerException) { 12 | } 13 | 14 | } 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /corlib/System/IntPtr.cs: -------------------------------------------------------------------------------- 1 | #if !LOCALTEST 2 | 3 | namespace System { 4 | public unsafe struct IntPtr { 5 | 6 | public static readonly IntPtr Zero = new IntPtr(0); 7 | 8 | private void* value; 9 | 10 | public IntPtr(int value) { 11 | this.value = (void*)value; 12 | } 13 | 14 | public IntPtr(long value) { 15 | this.value = (void*)value; 16 | } 17 | 18 | public IntPtr(void* value) { 19 | this.value = value; 20 | } 21 | 22 | public static int Size { 23 | get { 24 | return sizeof(void*); 25 | } 26 | } 27 | 28 | public int ToInt32() { 29 | return (int)this.value; 30 | } 31 | 32 | public long ToInt64() { 33 | return (long)this.value; 34 | } 35 | 36 | public override bool Equals(object obj) { 37 | return (obj is IntPtr && ((IntPtr)obj).value == this.value); 38 | } 39 | 40 | public override int GetHashCode() { 41 | return (int)this.value; 42 | } 43 | 44 | public static bool operator ==(IntPtr a, IntPtr b) { 45 | return a.value == b.value; 46 | } 47 | 48 | public static bool operator !=(IntPtr a, IntPtr b) { 49 | return a.value != b.value; 50 | } 51 | 52 | public override string ToString() { 53 | if (Size == 4) { 54 | return string.Format("0x{0:x4}", (int)this.value); 55 | } else { 56 | return string.Format("0x{0:x8}", (long)this.value); 57 | } 58 | } 59 | } 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /corlib/System/InvalidCastException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | namespace System { 22 | public class InvalidCastException : SystemException { 23 | 24 | public InvalidCastException() : base("An invalid cast has occured") { } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /corlib/System/InvalidOperationException.cs: -------------------------------------------------------------------------------- 1 | namespace System { 2 | public class InvalidOperationException : SystemException { 3 | 4 | public InvalidOperationException() 5 | : base("Operation is not valid due to the current state of the object") { } 6 | 7 | public InvalidOperationException(string message) : base(message) { } 8 | 9 | public InvalidOperationException(string message, Exception innerException) 10 | : base(message, innerException) { } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /corlib/System/MarshalByRefObject.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public abstract class MarshalByRefObject { 25 | } 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /corlib/System/MulticastNotSupportedException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Text; 24 | 25 | namespace System { 26 | public class MulticastNotSupportedException : SystemException { 27 | public MulticastNotSupportedException() 28 | : base("This operation cannot be performed with the specified delagates.") { 29 | } 30 | 31 | public MulticastNotSupportedException(string msg) : base(msg) { } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /corlib/System/NotImplementedException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class NotImplementedException : SystemException { 25 | public NotImplementedException() : base("The requested feature is not implemented.") { } 26 | 27 | public NotImplementedException(string message) : base(message) { } 28 | 29 | public NotImplementedException(string message, Exception inner) : base(message, inner) { } 30 | } 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /corlib/System/NotSupportedException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class NotSupportedException : SystemException { 25 | 26 | public NotSupportedException() : base("Operation is not supported.") { } 27 | 28 | public NotSupportedException(string message) : base(message) { } 29 | 30 | public NotSupportedException(string message, Exception innerException) : base(message, innerException) { } 31 | 32 | } 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /corlib/System/NullReferenceException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class NullReferenceException : SystemException { 25 | 26 | public NullReferenceException(string msg) : base(msg) { } 27 | 28 | public NullReferenceException() 29 | : base("A null value was found where an object instance was required.") { 30 | } 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System/OperationCanceledException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System 6 | { 7 | public class OperationCanceledException : Exception 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /corlib/System/OverflowException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class OverflowException : ArithmeticException { 25 | 26 | public OverflowException() : base("Number overflow.") { } 27 | public OverflowException(string msg) : base(msg) { } 28 | 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /corlib/System/ParamArrayAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | using System; 24 | 25 | namespace System { 26 | public sealed class ParamArrayAttribute : Attribute { 27 | 28 | public ParamArrayAttribute() { 29 | } 30 | 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System/PlatformID.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public enum PlatformID { 25 | Win32S = 0, 26 | Win32Windows = 1, 27 | Win32NT = 2, 28 | WinCE = 3, 29 | Unix = 4 30 | } 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /corlib/System/Predicate.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public delegate bool Predicate(T obj); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /corlib/System/RuntimeFieldHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public struct RuntimeFieldHandle { 25 | 26 | private IntPtr value; 27 | 28 | internal RuntimeFieldHandle(IntPtr v) { 29 | value = v; 30 | } 31 | 32 | public IntPtr Value { 33 | get { 34 | return value; 35 | } 36 | } 37 | } 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /corlib/System/RuntimeMethodHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public struct RuntimeMethodHandle { 25 | 26 | IntPtr value; 27 | 28 | internal RuntimeMethodHandle(IntPtr v) { 29 | value = v; 30 | } 31 | 32 | public IntPtr Value { 33 | get { 34 | return value; 35 | } 36 | } 37 | 38 | } 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /corlib/System/RuntimeTypeHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public struct RuntimeTypeHandle { 25 | 26 | private IntPtr value; 27 | 28 | internal RuntimeTypeHandle(IntPtr v) { 29 | value = v; 30 | } 31 | 32 | public IntPtr Value { 33 | get { 34 | return value; 35 | } 36 | } 37 | } 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /corlib/System/StringComparison.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public enum StringComparison { 25 | CurrentCulture, 26 | CurrentCultureIgnoreCase, 27 | InvariantCulture, 28 | InvariantCultureIgnoreCase, 29 | Ordinal, 30 | OrdinalIgnoreCase 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /corlib/System/SystemException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public class SystemException : Exception { 25 | 26 | public SystemException() : base("A SystemException has occured.") { } 27 | 28 | public SystemException(string message) : base(message) { } 29 | 30 | public SystemException(string message, Exception innerException) : base(message, innerException) { } 31 | 32 | } 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /corlib/System/Void.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !LOCALTEST 22 | 23 | namespace System { 24 | public struct Void { 25 | } 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /corlib/corlib.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Library 5 | netstandard2.0 6 | corlib 7 | corlib 8 | true 9 | true 10 | false 11 | true 12 | 0 13 | 14 | 15 | 16 | ..\build 17 | false 18 | 19 | 20 | ..\build 21 | false 22 | 23 | -------------------------------------------------------------------------------- /flappy/flappy.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Exe 4 | net40 5 | app 6 | true 7 | 8 | 9 | ..\build 10 | false 11 | 12 | 13 | ..\builld 14 | false 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Always 28 | 29 | 30 | Always 31 | 32 | 33 | Always 34 | 35 | 36 | Always 37 | 38 | 39 | Always 40 | 41 | 42 | Always 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /flappy/res/background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/background.bmp -------------------------------------------------------------------------------- /flappy/res/background.pxm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/background.pxm -------------------------------------------------------------------------------- /flappy/res/bird-0.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/bird-0.bmp -------------------------------------------------------------------------------- /flappy/res/bird-1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/bird-1.bmp -------------------------------------------------------------------------------- /flappy/res/bird-2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/bird-2.bmp -------------------------------------------------------------------------------- /flappy/res/bird-3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/bird-3.bmp -------------------------------------------------------------------------------- /flappy/res/pillar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/flappy/res/pillar.bmp -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "6.0.*" 4 | } 5 | } -------------------------------------------------------------------------------- /native/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "psp-mac", 5 | "includePath": [ 6 | "${workspaceFolder}/**", 7 | "/usr/local/pspdev/psp/include", 8 | "/usr/local/pspdev/psp/sdk/include", 9 | "/usr/local/pspdev/x86_64-apple-darwin19.6.0/psp/include", 10 | "/usr/local/pspdev/lib/gcc/psp/9.3.0/include" 11 | ], 12 | "defines": [ 13 | "_DEBUG", 14 | "UNICODE", 15 | "_UNICODE", 16 | "__PSP__" 17 | ], 18 | "compilerPath": "/usr/local/pspdev/bin/psp-gcc", 19 | "cStandard": "c11", 20 | "cppStandard": "c++14", 21 | "intelliSenseMode": "gcc-x64" 22 | }, 23 | { 24 | "name": "psp-win10", 25 | "includePath": [ 26 | "${workspaceFolder}/**", 27 | "C:/pspsdk/psp/include", 28 | "C:/pspsdk/psp/sdk/include", 29 | "C:/pspsdk/i686-pc-mingw32/psp/include", 30 | "C:/pspsdk/lib/gcc/psp/8.2.0/include" 31 | ], 32 | "defines": [ 33 | "_DEBUG", 34 | "UNICODE", 35 | "_UNICODE", 36 | "__PSP__" 37 | ], 38 | "compilerPath": "C:/pspsdk/bin/psp-gcc.exe", 39 | "cStandard": "c11", 40 | "cppStandard": "c++14", 41 | "intelliSenseMode": "gcc-x64" 42 | } 43 | ], 44 | "version": 4 45 | } -------------------------------------------------------------------------------- /native/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "lldb", 9 | "request": "launch", 10 | "name": "launch dna", 11 | "program": "${workspaceFolder}/dna" 12 | }, 13 | { 14 | "name": "(lldb) Launch", 15 | "type": "cppdbg", 16 | "request": "launch", 17 | "program": "${workspaceFolder}/dna", 18 | "args": [], 19 | "stopAtEntry": true, 20 | "cwd": "${workspaceFolder}", 21 | "environment": [], 22 | "externalConsole": false, 23 | "MIMode": "lldb" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /native/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "stat.h": "c", 4 | "glob.h": "c", 5 | "controls.h": "c", 6 | "sdl.h": "c", 7 | "sdl_main.h": "c", 8 | "sdl_stdinc.h": "c", 9 | "sdl_config.h": "c", 10 | "sdl_ttf.h": "c" 11 | } 12 | } -------------------------------------------------------------------------------- /native/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "type": "cppbuild", 5 | "label": "C/C++: psp-gcc build active file", 6 | "command": "/usr/local/pspdev/bin/psp-gcc", 7 | "args": [ 8 | "-g", 9 | "${file}", 10 | "-o", 11 | "${fileDirname}/${fileBasenameNoExtension}" 12 | ], 13 | "options": { 14 | "cwd": "${fileDirname}" 15 | }, 16 | "problemMatcher": [ 17 | "$gcc" 18 | ], 19 | "group": { 20 | "kind": "build", 21 | "isDefault": true 22 | }, 23 | "detail": "Task generated by Debugger." 24 | } 25 | ], 26 | "version": "2.0.0" 27 | } -------------------------------------------------------------------------------- /native/Bugs.txt: -------------------------------------------------------------------------------- 1 | Known Bugs that haven't yet been fixed 2 | -------------------------------------- 3 | 4 | There is a memory leak somewhere. Haven't looked into it much yet. 5 | 6 | There is a problem with calling a generic method within a generic interface, when the 7 | call-point is within a generic method itself. 8 | This bug may have large implications for how the generic system works, so may be quite 9 | a lot of work to fix. 10 | This bug means that the LINQ .ThenBy() operator cannot work. 11 | 12 | If a field in a nested class references the containing class then the memory/stack size of the type 13 | is not yet known, so function calls on the type fail, because the parameters size has been 14 | calculated incorrectly. 15 | 16 | Finalization currently happens in any thread, when objects are allocated. 17 | Should probably change this to have a proper finalizer thread, like in the real .NET 18 | -------------------------------------------------------------------------------- /native/Delegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined (__DELEGATE_H) 22 | #define __DELEGATE_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | fnInternalCall Map_Delegate(tMD_MethodDef *pMethod); 28 | 29 | tMD_MethodDef* Delegate_GetMethod(void *pThis_); 30 | tMD_MethodDef* Delegate_GetMethodAndStore(void *pThis_, HEAP_PTR *pTargetObj, void **ppNextDelegate); 31 | 32 | tAsyncCall* System_Delegate_GetMethodNameImpl(PTR pThis_, PTR pParams, PTR pReturnValue); 33 | tAsyncCall* System_Delegate_GetParameterCountImpl(PTR pThis_, PTR pParams, PTR pReturnValue); 34 | 35 | #endif -------------------------------------------------------------------------------- /native/EvalStack.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined (__EVALSTACK_H) 22 | #define __EVALSTACK_H 23 | 24 | #define EVALSTACK_INT64 0 25 | #define EVALSTACK_INT32 1 26 | #define EVALSTACK_INTNATIVE 2 27 | //#define EVALSTACK_F 3 28 | #define EVALSTACK_F64 3 29 | #define EVALSTACK_PTR 4 30 | #define EVALSTACK_O 5 31 | //#define EVALSTACK_TRANSPTR 6 32 | #define EVALSTACK_F32 6 33 | #define EVALSTACK_VALUETYPE 7 34 | 35 | 36 | // dummy value used for methods that return nothing (void) 37 | #define EVALSTACK_VOID 0xff 38 | 39 | #endif -------------------------------------------------------------------------------- /native/Finalizer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined (__FINALIZER_H) 22 | #define __FINALIZER_H 23 | 24 | void Finalizer_Init(); 25 | 26 | void AddFinalizer(PTR ptr); 27 | HEAP_PTR GetNextFinalizer(); 28 | 29 | #endif -------------------------------------------------------------------------------- /native/Fonts/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/native/Fonts/arial.ttf -------------------------------------------------------------------------------- /native/Fonts/tahoma.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/native/Fonts/tahoma.ttf -------------------------------------------------------------------------------- /native/Fonts/verdana.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/native/Fonts/verdana.ttf -------------------------------------------------------------------------------- /native/InternalCall.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__INTERNALCALL_H) 22 | #define __INTERNALCALL_H 23 | 24 | #include "Types.h" 25 | #include "MetaData.h" 26 | 27 | fnInternalCall InternalCall_Map(tMD_MethodDef *pMethod); 28 | 29 | #endif -------------------------------------------------------------------------------- /native/Psp.BasicGraphics.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PSP_BASICGRAPHICS_H) 2 | #define __PSP_BASICGRAPHICS_H 3 | 4 | #include "Types.h" 5 | 6 | tAsyncCall *Psp_BasicGraphics_nativeInit(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | tAsyncCall *Psp_BasicGraphics_nativeClear(PTR pThis_, PTR pParams, PTR pReturnValue); 8 | tAsyncCall *Psp_BasicGraphics_nativeSwapBuffers(PTR pThis_, PTR pParams, PTR pReturnValue); 9 | tAsyncCall *Psp_BasicGraphics_nativeDrawRect(PTR pThis_, PTR pParams, PTR pReturnValue); 10 | tAsyncCall *Psp_BasicGraphics_nativeDrawImage(PTR pThis_, PTR pParams, PTR pReturnValue); 11 | 12 | tAsyncCall *Psp_BasicGraphics_nativeInit2(PTR pThis_, PTR pParams, PTR pReturnValue); 13 | tAsyncCall *Psp_BasicGraphics_nativeClear2(PTR pThis_, PTR pParams, PTR pReturnValue); 14 | tAsyncCall *Psp_BasicGraphics_nativeSwapBuffers2(PTR pThis_, PTR pParams, PTR pReturnValue); 15 | tAsyncCall *Psp_BasicGraphics_nativeDrawRect2(PTR pThis_, PTR pParams, PTR pReturnValue); 16 | tAsyncCall *Psp_BasicGraphics_nativeDrawText2(PTR pThis_, PTR pParams, PTR pReturnValue); 17 | tAsyncCall *Psp_BasicGraphics_nativeLoadSurface2(PTR pThis_, PTR pParams, PTR pReturnValue); 18 | tAsyncCall *Psp_BasicGraphics_nativeCreateTexture2(PTR pThis_, PTR pParams, PTR pReturnValue); 19 | tAsyncCall *Psp_BasicGraphics_nativeSetColorKey2(PTR pThis_, PTR pParams, PTR pReturnValue); 20 | tAsyncCall *Psp_BasicGraphics_nativeDrawTexture2(PTR pThis_, PTR pParams, PTR pReturnValue); 21 | 22 | #endif -------------------------------------------------------------------------------- /native/Psp.Controls.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PSP_CONTROLS_H) 2 | #define __PSP_CONTROLS_H 3 | 4 | #include "Types.h" 5 | 6 | tAsyncCall* Psp_Controls_nativeJoystickX(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | tAsyncCall* Psp_Controls_nativeJoystickY(PTR pThis_, PTR pParams, PTR pReturnValue); 8 | 9 | tAsyncCall* Psp_Controls_nativePollPad(PTR pThis_, PTR pParams, PTR pReturnValue); 10 | tAsyncCall* Psp_Controls_nativePollLatch(PTR pThis_, PTR pParams, PTR pReturnValue); 11 | 12 | tAsyncCall* Psp_Controls_nativeIsKeyHold(PTR pThis_, PTR pParams, PTR pReturnValue); 13 | tAsyncCall* Psp_Controls_nativeIsKeyDown(PTR pThis_, PTR pParams, PTR pReturnValue); 14 | tAsyncCall* Psp_Controls_nativeIsKeyUp(PTR pThis_, PTR pParams, PTR pReturnValue); 15 | 16 | tAsyncCall* Psp_State_nativeIsRunning(PTR pThis_, PTR pParams, PTR pReturnValue); 17 | tAsyncCall* Psp_State_setAppName(PTR pThis_, PTR pParams, PTR pReturnValue); 18 | 19 | #endif -------------------------------------------------------------------------------- /native/Psp.Debug.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PSP_DEBUG_H) 2 | #define __PSP_DEBUG_H 3 | 4 | #include "Types.h" 5 | 6 | tAsyncCall *Psp_Debug_nativeScreenPrintf(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | tAsyncCall *Psp_Debug_nativeScreenClear(PTR pThis_, PTR pParams, PTR pReturnValue); 8 | tAsyncCall *Psp_Debug_nativeScreenSetXY(PTR pThis_, PTR pParams, PTR pReturnValue); 9 | tAsyncCall *Psp_Debug_nativeScreenPrintfXY(PTR pThis_, PTR pParams, PTR pReturnValue); 10 | tAsyncCall *Psp_Debug_nativeWrite(PTR pThis_, PTR pParams, PTR pReturnValue); 11 | #endif -------------------------------------------------------------------------------- /native/Psp.Display.c: -------------------------------------------------------------------------------- 1 | #include "Compat.h" 2 | #include "Sys.h" 3 | 4 | #include "MetaData.h" 5 | #include "Types.h" 6 | #include "Type.h" 7 | 8 | #include "Psp.Display.h" 9 | 10 | #if defined(__PSP__) 11 | #include 12 | #endif 13 | 14 | tAsyncCall *Psp_Display_nativeWaitVblankStart(PTR pThis_, PTR pParams, PTR pReturnValue) 15 | { 16 | 17 | #if defined(__PSP__) 18 | *(int *)pReturnValue = sceDisplayWaitVblankStart(); 19 | #else 20 | printf("VBlank called\n"); 21 | #endif 22 | 23 | return NULL; 24 | } 25 | -------------------------------------------------------------------------------- /native/Psp.Display.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PSP_DISPLAY_H) 2 | #define __PSP_DISPLAY_H 3 | 4 | #include "Types.h" 5 | 6 | tAsyncCall* Psp_Display_nativeWaitVblankStart(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | 8 | #endif -------------------------------------------------------------------------------- /native/Psp.Kernel.c: -------------------------------------------------------------------------------- 1 | #if defined(__PSP__) 2 | #include 3 | #else 4 | #include 5 | #endif 6 | 7 | #include "Psp.Debug.h" 8 | 9 | tAsyncCall *Psp_Kernel_nativeExitGame(PTR pThis_, PTR pParams, PTR pReturnValue) 10 | { 11 | #if defined(__PSP__) 12 | sceKernelExitGame(); 13 | #else 14 | exit(1); 15 | #endif 16 | } -------------------------------------------------------------------------------- /native/Psp.Kernel.h: -------------------------------------------------------------------------------- 1 | 2 | #if !defined(__PSP_KERNEL_H) 3 | #define __PSP_KERNEL_H 4 | 5 | #include "Types.h" 6 | 7 | tAsyncCall* Psp_Kernel_nativeExitGame(PTR pThis_, PTR pParams, PTR pReturnValue); 8 | 9 | #endif -------------------------------------------------------------------------------- /native/README.md: -------------------------------------------------------------------------------- 1 | # DNA 2 | The DNA project is originally at https://github.com/chrisdunelm/DotNetAnywhere, though 3 | has not recently been maintained (~ 5 years). See the 'src' directory for license info. 4 | 5 | This code is a merge of the original code changes from other DNA repos, plus the extensions made by Steve Sanderson's Blazor project. https://github.com/SteveSanderson/Blazor 6 | 7 | In this copy of the DNA code, various changes have been made, e.g.: 8 | - To fix some bugs 9 | - To support loading .NET Core-style assemblies 10 | 11 | It differs from Blazor because there is no support for JavaScript (sorry, not interested in that), and so we have excluded all of the changes related to JavaScript integration that Blazor added. The main issue with this version is that the P/Invoke interface is a bit broken, due to the changes in Blazor. I'm going to look at reverting to the original mechanism, but I didn't have time yet to look at why Steve hard coded the interface for .Net Core. 12 | 13 | I took the Blazor changes to allow Core support, as this makes compiling code on any platform a lot easier. 14 | 15 | Likewise, the corlib.csproj project has been extended to support extra APIs. 16 | -------------------------------------------------------------------------------- /native/RVA.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined (__RVA_H) 22 | #define __RVA_H 23 | 24 | typedef struct tRVA_Item_ tRVA_Item; 25 | struct tRVA_Item_ { 26 | unsigned int baseAddress; 27 | unsigned int size; 28 | void *pData; 29 | 30 | tRVA_Item *pNext; 31 | }; 32 | 33 | typedef struct tRVA_ tRVA; 34 | struct tRVA_ { 35 | tRVA_Item *pFirstRVA; 36 | }; 37 | 38 | tRVA* RVA(); 39 | tRVA_Item* RVA_Create(tRVA *pThis, void *pFile, void *pSectionHeader); 40 | void* RVA_FindData(tRVA *pThis, unsigned int rva); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /native/Reflection.h: -------------------------------------------------------------------------------- 1 | #if !defined(__REFLECTION_H) 2 | #define __REFLECTION 3 | 4 | #include "Types.h" 5 | 6 | tAsyncCall* Reflection_MemberInfo_GetCustomAttributes(PTR pThis_, PTR pParams, PTR pReturnValue); 7 | 8 | #endif -------------------------------------------------------------------------------- /native/System.Attribute.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_ATTRIBUTE_H) 2 | #define __SYSTEM_ATTRIBUTE_H 3 | 4 | typedef struct tSystemAttribute_ tSystemAttribute; 5 | struct tSystemAttribute_ { 6 | int fake; 7 | }; 8 | 9 | typedef struct tInternalCustomAttributeInfo_ tInternalCustomAttributeInfo; 10 | struct tInternalCustomAttributeInfo_ { 11 | // Keep in sync with InternalCustomAttributeInfo struct in corlib C# code 12 | HEAP_PTR pUninitializedInstance; 13 | HEAP_PTR pConstructorMethodBase; 14 | HEAP_PTR pConstructorParams; 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /native/System.Char.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_CHAR_H) 22 | #define __SYSTEM_CHAR_H 23 | 24 | #include "Types.h" 25 | 26 | tAsyncCall* System_Char_GetUnicodeCategory(PTR pThis_, PTR pParams, PTR pReturnValue); 27 | tAsyncCall* System_Char_ToLowerInvariant(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_Char_ToUpperInvariant(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /native/System.Console.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_CONSOLE_H) 22 | #define __SYSTEM_CONSOLE_H 23 | 24 | #include "Types.h" 25 | 26 | tAsyncCall* System_Console_Write(PTR pThis_, PTR pParams, PTR pReturnValue); 27 | //tAsyncCall* System_Console_Internal_ReadKey(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | //tAsyncCall* System_Console_Internal_KeyAvailable(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /native/System.DateTime.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_DATETIME_H) 22 | #define __SYSTEM_DATETIME_H 23 | 24 | tAsyncCall* System_DateTime_InternalUtcNow(PTR pThis_, PTR pParams, PTR pReturnValue); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /native/System.Diagnostics.Debugger.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_DIAGNOSTICS_DEBUGGER_H) 22 | #define __SYSTEM_DIAGNOSTICS_DEBUGGER_H 23 | 24 | #include "Types.h" 25 | 26 | tAsyncCall* System_Diagnostics_Debugger_Break(PTR pThis_, PTR pParams, PTR pReturnValue); 27 | int CheckIfSequencePointIsBreakpoint(tMethodState* pMethodState, I32 spOffset); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /native/System.Enum.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_ENUM_H) 22 | #define __SYSTEM_ENUM_H 23 | 24 | #include "Types.h" 25 | 26 | tAsyncCall* System_Enum_Internal_GetValue(PTR pThis_, PTR pParams, PTR pReturnValue); 27 | tAsyncCall* System_Enum_Internal_GetInfo(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /native/System.Environment.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_ENVIRONMENT_H) 22 | #define __SYSTEM_ENVIRONMENT_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | tAsyncCall* System_Environment_get_TickCount(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_Environment_GetOSVersionString(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | tAsyncCall* System_Environment_get_Platform(PTR pThis_, PTR pParams, PTR pReturnValue); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /native/System.GC.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_GC_H) 22 | #define __SYSTEM_GC_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | tAsyncCall* System_GC_Collect(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_GC_Internal_CollectionCount(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | tAsyncCall* System_GC_GetTotalMemory(PTR pThis_, PTR pParams, PTR pReturnValue); 30 | tAsyncCall* System_GC_SuppressFinalize(PTR pThis_, PTR pParams, PTR pReturnValue); 31 | 32 | #endif -------------------------------------------------------------------------------- /native/System.Math.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_MATH_H) 22 | #define __SYSTEM_MATH_H 23 | 24 | #include "Types.h" 25 | 26 | tAsyncCall* System_Math_Sin(PTR pThis_, PTR pParams, PTR pReturnValue); 27 | tAsyncCall* System_Math_Cos(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_Math_Tan(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | tAsyncCall* System_Math_Pow(PTR pThis_, PTR pParams, PTR pReturnValue); 30 | tAsyncCall* System_Math_Log(PTR pThis_, PTR pParams, PTR pReturnValue); 31 | tAsyncCall* System_Math_Sqrt(PTR pThis_, PTR pParams, PTR pReturnValue); 32 | 33 | #endif -------------------------------------------------------------------------------- /native/System.Net.Dns.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #ifndef __SYSTEM_NET_DNS 22 | #define __SYSTEM_NET_DNS 23 | 24 | tAsyncCall* System_Net_Dns_Internal_GetHostEnt(PTR pThis_, PTR pParams, PTR pReturnValue); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /native/System.Object.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_OBJECT_H) 22 | #define __SYSTEM_OBJECT_H 23 | 24 | #include "Types.h" 25 | #include "MetaData.h" 26 | 27 | tAsyncCall* System_Object_Equals(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_Object_Clone(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | tAsyncCall* System_Object_GetHashCode(PTR pThis_, PTR pParams, PTR pReturnValue); 30 | tAsyncCall* System_Object_GetType(PTR pThis_, PTR pParams, PTR pReturnValue); 31 | 32 | #endif -------------------------------------------------------------------------------- /native/System.Reflection.MemberInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_MEMBERINFO_H) 2 | #define __SYSTEM_REFLECTION_MEMBERINFO_H 3 | 4 | 5 | typedef struct tMemberInfo_ tMemberInfo; 6 | struct tMemberInfo_ { 7 | // Keep in sync with System.Reflection.MemberInfo.cs 8 | HEAP_PTR ownerType; 9 | HEAP_PTR name; 10 | }; 11 | 12 | #endif -------------------------------------------------------------------------------- /native/System.Reflection.MethodBase.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_METHODBASE_H) 2 | #define __SYSTEM_REFLECTION_METHODBASE_H 3 | 4 | typedef struct tMethodBase_ tMethodBase; 5 | struct tMethodBase_ { 6 | // Keep in sync with MethodBase class in .NET corlib code 7 | HEAP_PTR ownerType; 8 | HEAP_PTR name; 9 | tMD_MethodDef *methodDef; // Not accessed from .NET code 10 | }; 11 | 12 | #endif -------------------------------------------------------------------------------- /native/System.Reflection.MethodInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_METHODINFO_H) 2 | #define __SYSTEM_REFLECTION_METHODINFO_H 3 | 4 | #include "System.Reflection.MethodBase.h" 5 | 6 | typedef struct tMethodInfo_ tMethodInfo; 7 | struct tMethodInfo_ { 8 | tMethodBase methodBase; 9 | }; 10 | 11 | #endif -------------------------------------------------------------------------------- /native/System.Reflection.PropertyInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SYSTEM_REFLECTION_PROPERTYINFO_H) 2 | #define __SYSTEM_REFLECTION_PROPERTYINFO_H 3 | 4 | typedef struct tPropertyInfo_ tPropertyInfo; 5 | struct tPropertyInfo_ { 6 | // Keep in sync with System.Reflection.PropertyInfo.cs 7 | HEAP_PTR ownerType; 8 | HEAP_PTR name; 9 | HEAP_PTR propertyType; 10 | 11 | tMD_Property* pMetaData; 12 | IDX_TABLE index; 13 | }; 14 | 15 | #endif -------------------------------------------------------------------------------- /native/System.Runtime.CompilerServices.RuntimeHelpers.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_RUNTIME_COMPILERSERVICES_RUNTIMEHELPERS_H) 22 | #define __SYSTEM_RUNTIME_COMPILERSERVICES_RUNTIMEHELPERS_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | tAsyncCall* System_Runtime_CompilerServices_InitializeArray(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /native/System.Threading.Monitor.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_THREADING_MONITOR_H) 22 | #define __SYSTEM_THREADING_MONITOR_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | tAsyncCall* System_Threading_Monitor_Internal_TryEnter(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_Threading_Monitor_Internal_Exit(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | 30 | #endif -------------------------------------------------------------------------------- /native/System.ValueType.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_VALUETYPE_H) 22 | #define __SYSTEM_VALUETYPE_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | tAsyncCall* System_ValueType_GetFields(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | 29 | #endif -------------------------------------------------------------------------------- /native/System.WeakReference.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_WEAKREFERENCE_H) 22 | #define __SYSTEM_WEAKREFERENCE_H 23 | 24 | #include "MetaData.h" 25 | #include "Types.h" 26 | 27 | tAsyncCall* System_WeakReference_get_Target(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_WeakReference_set_Target(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | 30 | void SystemWeakReference_TargetGone(HEAP_PTR *ppWeakRef_, U32 removeLongRefs); 31 | 32 | #endif -------------------------------------------------------------------------------- /native/callback.c: -------------------------------------------------------------------------------- 1 | #if defined(__PSP__) 2 | 3 | #include 4 | 5 | #else 6 | 7 | #define SceSize int 8 | 9 | #endif 10 | 11 | static int exitRequest = 0; 12 | 13 | int isRunning() 14 | { 15 | return !exitRequest; 16 | } 17 | 18 | int exitCallback(int arg1, int arg2, void *common) 19 | { 20 | exitRequest = 1; 21 | return 0; 22 | } 23 | 24 | int callbackThread(SceSize args, void *argp) 25 | { 26 | #if defined(__PSP__) 27 | int cbid = sceKernelCreateCallback("Exit Callback", exitCallback, NULL); 28 | sceKernelRegisterExitCallback(cbid); 29 | 30 | sceKernelSleepThreadCB(); 31 | #endif 32 | 33 | return 0; 34 | } 35 | 36 | int setupExitCallback() 37 | { 38 | #if defined(__PSP__) 39 | int threadId = sceKernelCreateThread("update_thread", callbackThread, 0x11, 0xFA0, THREAD_ATTR_USER, 0); 40 | 41 | if (threadId >= 0) 42 | { 43 | sceKernelStartThread(threadId, 0, NULL); 44 | } 45 | 46 | return threadId; 47 | #else 48 | return 0; 49 | #endif 50 | } 51 | -------------------------------------------------------------------------------- /native/callback.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_CALLBACK_H 2 | #define COMMON_CALLBACK_H 3 | 4 | int isRunning(); 5 | int setupExitCallback(); 6 | 7 | #endif -------------------------------------------------------------------------------- /native/controls.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_CONTROLS_H 2 | #define COMMON_CONTROLS_H 3 | 4 | int getJX(); 5 | int getJY(); 6 | 7 | void pollPad(); 8 | void pollLatch(); 9 | 10 | int isKeyHold(int key); // returns 1(true) if key is down 11 | int isKeyDown(int key); 12 | int isKeyUp(int key); 13 | 14 | #endif -------------------------------------------------------------------------------- /native/diet-fnmatch.h: -------------------------------------------------------------------------------- 1 | #ifndef _FNMATCH_H 2 | #define _FNMATCH_H 3 | 4 | #include 5 | 6 | __BEGIN_DECLS 7 | 8 | int fnmatch(const char *pattern, const char *string, int flags) __THROW; 9 | 10 | #define FNM_NOESCAPE 1 11 | #define FNM_PATHNAME 2 12 | #define FNM_FILE_NAME 2 13 | #define FNM_PERIOD 4 14 | #define FNM_LEADING_DIR 8 15 | #define FNM_CASEFOLD 16 16 | 17 | #define FNM_NOMATCH 1 18 | 19 | __END_DECLS 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /native/graph.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_GRAPH_H 2 | #define COMMON_GRAPH_H 3 | 4 | #include 5 | 6 | #define color_t uint32_t 7 | 8 | void initGraf(); 9 | void clearGraf(uint32_t color); 10 | void swapBufferdGraf(); 11 | void drawRectGraf(int x, int y, int w, int h, color_t color); 12 | void drawImageGraf(int x, int y, int w, int h, uint32_t* image); 13 | 14 | #endif -------------------------------------------------------------------------------- /native/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/native/icon0.png -------------------------------------------------------------------------------- /native/incompatible/PInvoke.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined (__PINVOKE_H) 22 | #define __PINVOKE_H 23 | 24 | #include "MetaData.h" 25 | #include "JIT.h" 26 | #include "String.h" 27 | 28 | typedef void* fnPInvoke; 29 | 30 | 31 | fnPInvoke PInvoke_GetFunction(tMetaData *pMetaData, tMD_ImplMap *pImplMap); 32 | U32 PInvoke_Call(tJITCallPInvoke *pCall, PTR pParams, PTR pReturnValue, tThread *pCallingThread); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /native/incompatible/System.Console.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 DotNetAnywhere 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | #if !defined(__SYSTEM_CONSOLE_H) 22 | #define __SYSTEM_CONSOLE_H 23 | 24 | #include "Types.h" 25 | 26 | tAsyncCall* System_Console_Write(PTR pThis_, PTR pParams, PTR pReturnValue); 27 | tAsyncCall* System_Console_Internal_ReadKey(PTR pThis_, PTR pParams, PTR pReturnValue); 28 | tAsyncCall* System_Console_Internal_KeyAvailable(PTR pThis_, PTR pParams, PTR pReturnValue); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /rockbound2/res/ICON0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/ICON0.png -------------------------------------------------------------------------------- /rockbound2/res/PIC1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/PIC1.png -------------------------------------------------------------------------------- /rockbound2/res/SND0.at3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/SND0.at3 -------------------------------------------------------------------------------- /rockbound2/res/pickup.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/pickup.raw -------------------------------------------------------------------------------- /rockbound2/res/select.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/select.raw -------------------------------------------------------------------------------- /rockbound2/res/tada.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/tada.raw -------------------------------------------------------------------------------- /rockbound2/res/wall.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/rockbound2/res/wall.raw -------------------------------------------------------------------------------- /rockbound2/rockbound2.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Library 4 | netstandard2.0 5 | simple 6 | true 7 | true 8 | false 9 | true 10 | 0 11 | 12 | 13 | ..\build\apps 14 | false 15 | 16 | 17 | ..\build\apps 18 | false 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /testSimple/Nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /testSimple/res/test.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memsom/PSPDNA/df7cbbbefd3fc2cac876f4cb5a893bb46b104185/testSimple/res/test.bmp -------------------------------------------------------------------------------- /testSimple/testSimple.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Library 4 | netstandard2.0 5 | simple 6 | true 7 | true 8 | false 9 | true 10 | 0 11 | 12 | 13 | ..\build\apps 14 | false 15 | 16 | 17 | ..\build\apps 18 | false 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tet/tet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Library 4 | netstandard2.0 5 | tet 6 | true 7 | true 8 | false 9 | true 10 | 0 11 | 12 | 13 | ..\build\apps 14 | false 15 | 16 | 17 | ..\build\apps 18 | false 19 | 20 | 21 | 22 | 23 | 24 | --------------------------------------------------------------------------------