Skip to content

Commit c052991

Browse files
committed
Initial commit
0 parents  commit c052991

32 files changed

Lines changed: 1277 additions & 0 deletions

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# EditorConfig is awesome: http://editorconfig.org
2+
root = true
3+
4+
[*.cs]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.csproj merge=binary
26+
#*.dbproj merge=binary
27+
#*.fsproj merge=binary
28+
#*.lsproj merge=binary
29+
#*.modelproj merge=binary
30+
#*.sln merge=binary
31+
#*.sqlproj merge=binary
32+
#*.vbproj merge=binary
33+
#*.vcproj merge=binary
34+
#*.vcxproj merge=binary
35+
#*.wixproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# Behavior for image files
40+
#
41+
# Image files are treated as binary by default.
42+
###############################################################################
43+
*.gif binary
44+
*.ico binary
45+
*.jpg binary
46+
*.png binary

.gitignore

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ins.
3+
4+
# Build output
5+
[Bb]in/
6+
[Dd]ebug/
7+
[Dd]ebugPublic/
8+
[Oo]bj/
9+
[Rr]elease/
10+
[Rr]eleases/
11+
12+
# Build testing
13+
## MSTest
14+
[Tt]est[Rr]esult*/
15+
[Bb]uild[Ll]og.*
16+
## NUnit
17+
*.VisualState.xml
18+
TestResult.xml
19+
20+
# NuGet packages
21+
*.nupkg
22+
**/packages/*
23+
!**/packages/build/
24+
!**/packages/repositories.config
25+
26+
# OS-specific files
27+
.*DS_Store
28+
._*
29+
30+
# Roslyn caches
31+
*.ide/
32+
33+
# User-specific files
34+
.idea/
35+
*.sln.docstates
36+
*.suo
37+
*.user
38+
*.userosscache
39+
*.userprefs
40+
41+
# Visual C++ cache files
42+
ipch/
43+
*.aps
44+
*.ncb
45+
*.opensdf
46+
*.sdf
47+
*.cachefile
48+
49+
# Visual Studio
50+
.vs/
51+
*.psess
52+
*.vsp
53+
*.vspx
54+
55+
# Visual Studio add-ins
56+
## DotCover code coverage tool
57+
*.dotCover
58+
## JustCode add-in
59+
.JustCode
60+
## ReSharper add-in
61+
_ReSharper*/
62+
*.[Rr]e[Ss]harper
63+
*.DotSettings.user
64+
## TeamCity add-in
65+
_TeamCity*
66+
67+
# Other files
68+
.deploy
69+
70+
src/Debug.cs

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013-2020 Oxide Team and Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Oxide.Abstractions.sln

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33213.308
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oxide.Abstractions", "src\Oxide.Abstractions.csproj", "{712241DB-A156-4BE0-9473-668DD8D87BC9}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oxide.Compiler", "..\Oxide.Compiler\src\Oxide.Compiler.csproj", "{D77F201F-92AB-40D1-A2AB-71600FA137DB}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oxide.CSharp", "..\Oxide.CSharp\src\Oxide.CSharp.csproj", "{B6FAFF91-1E8E-4956-BF37-9A537813E226}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oxide.TestConsole", "Oxide.TestConsole\Oxide.TestConsole.csproj", "{2B4D9E6F-B836-4C30-830E-984834E1F36C}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{712241DB-A156-4BE0-9473-668DD8D87BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{712241DB-A156-4BE0-9473-668DD8D87BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{712241DB-A156-4BE0-9473-668DD8D87BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{712241DB-A156-4BE0-9473-668DD8D87BC9}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{D77F201F-92AB-40D1-A2AB-71600FA137DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{D77F201F-92AB-40D1-A2AB-71600FA137DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{D77F201F-92AB-40D1-A2AB-71600FA137DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{D77F201F-92AB-40D1-A2AB-71600FA137DB}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{B6FAFF91-1E8E-4956-BF37-9A537813E226}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{B6FAFF91-1E8E-4956-BF37-9A537813E226}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{B6FAFF91-1E8E-4956-BF37-9A537813E226}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{B6FAFF91-1E8E-4956-BF37-9A537813E226}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{2B4D9E6F-B836-4C30-830E-984834E1F36C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{2B4D9E6F-B836-4C30-830E-984834E1F36C}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{2B4D9E6F-B836-4C30-830E-984834E1F36C}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{2B4D9E6F-B836-4C30-830E-984834E1F36C}.Release|Any CPU.Build.0 = Release|Any CPU
36+
EndGlobalSection
37+
GlobalSection(SolutionProperties) = preSolution
38+
HideSolutionNode = FALSE
39+
EndGlobalSection
40+
GlobalSection(ExtensibilityGlobals) = postSolution
41+
SolutionGuid = {91B49C34-FD84-4B0F-92F3-D53338D021D3}
42+
EndGlobalSection
43+
EndGlobal

netfx.props

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<!-- Check and set if a .NET SDK 2.0 project targeting .NET 3.5 or .NET 4.x on Mono using 'dotnet build' -->
4+
<TargetIsMono Condition="('$(TargetFramework)' == 'net35' OR $(TargetFramework.StartsWith('net4'))) AND '$(OS)' == 'Unix'">True</TargetIsMono>
5+
6+
<!-- Look in the standard install locations -->
7+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'True' AND Exists('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
8+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'True' AND Exists('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
9+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'True' AND Exists('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
10+
11+
<!-- If we found Mono reference assemblies, then use them -->
12+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net35'">$(BaseFrameworkPathOverrideForMono)/2.0-api</FrameworkPathOverride>
13+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
14+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
15+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
16+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
17+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
18+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
19+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
20+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
21+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
22+
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">True</EnableFrameworkPathOverride>
23+
24+
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
25+
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
26+
</PropertyGroup>
27+
28+
<!-- Add reference assemblies for use when building with .NET 6.x and above -->
29+
<ItemGroup>
30+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2">
31+
<IncludeAssets>runtime;build;native;contentfiles;analyzers</IncludeAssets>
32+
<PrivateAssets>all</PrivateAssets>
33+
</PackageReference>
34+
</ItemGroup>
35+
</Project>

nuget.config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageRestore>
4+
<add key="enabled" value="True" />
5+
<add key="automatic" value="True" />
6+
</packageRestore>
7+
<activePackageSource>
8+
<add key="All" value="(Aggregate source)" />
9+
</activePackageSource>
10+
<packageSources>
11+
<add key="Oxide" value="https://www.myget.org/f/oxide/api/v3/index.json" />
12+
</packageSources>
13+
</configuration>

resources/icon.png

392 Bytes
Loading
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
3+
namespace Oxide.CompilerServices
4+
{
5+
[Flags]
6+
[Serializable]
7+
public enum CodeLanguage
8+
{
9+
/// <summary>
10+
/// CSharp Language
11+
/// </summary>
12+
CSharp = 0x00,
13+
14+
/// <summary>
15+
/// Visual Basic Language
16+
/// </summary>
17+
VisualBasic = 0x01,
18+
19+
/// <summary>
20+
/// Already compiled DLL file hot loadable
21+
/// </summary>
22+
Compiled = 0x02
23+
}
24+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
3+
namespace Oxide.CompilerServices
4+
{
5+
[Flags]
6+
public enum CompileState
7+
{
8+
Unknown = 0x00,
9+
Queued = 0x01,
10+
Started = 0x02,
11+
Stalled = 0x04,
12+
Complete = 0x08
13+
}
14+
}

0 commit comments

Comments
 (0)