Skip to content

Commit e121f13

Browse files
committed
Add project files.
1 parent 8e92d18 commit e121f13

24 files changed

+67782
-0
lines changed

CSharpToJavaScript.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33103.184
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpToJavaScript", "CSharpToJavaScript\CSharpToJavaScript.csproj", "{FCD6CF0D-D991-41C2-ADE0-59C5B3EB5FE1}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{FCD6CF0D-D991-41C2-ADE0-59C5B3EB5FE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{FCD6CF0D-D991-41C2-ADE0-59C5B3EB5FE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{FCD6CF0D-D991-41C2-ADE0-59C5B3EB5FE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{FCD6CF0D-D991-41C2-ADE0-59C5B3EB5FE1}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {403552C7-A256-49ED-AA22-9170CA98EEDC}
24+
EndGlobalSection
25+
EndGlobal

CSharpToJavaScript/APIs/JS/Date.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using CSharpToJavaScript.Utils;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace CSharpToJavaScript.APIs.JS
9+
{
10+
[To(ToAttribute.Default)]
11+
public class Date
12+
{
13+
public Date() { }
14+
[To(ToAttribute.FirstCharToLowerCase)]
15+
public string ToISOString()
16+
{
17+
throw new System.NotImplementedException();
18+
}
19+
[To(ToAttribute.FirstCharToLowerCase)]
20+
public static string Now()
21+
{
22+
throw new System.NotImplementedException();
23+
}
24+
}
25+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using CSharpToJavaScript.Utils;
2+
using Microsoft.CodeAnalysis;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
9+
namespace CSharpToJavaScript.APIs.JS
10+
{
11+
public partial class Document
12+
{
13+
[To(ToAttribute.FirstCharToLowerCase)]
14+
public Element CreateElement(string localName, string options = "")
15+
{
16+
throw new System.NotImplementedException();
17+
}
18+
[To(ToAttribute.FirstCharToLowerCase)]
19+
public Text CreateTextNode(string data)
20+
{
21+
throw new System.NotImplementedException();
22+
}
23+
}
24+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace CSharpToJavaScript.APIs.JS
2+
{
3+
public partial class Event
4+
{
5+
public Event() { }
6+
}
7+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using CSharpToJavaScript.Utils;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace CSharpToJavaScript.APIs.JS
9+
{
10+
public partial class EventTarget
11+
{
12+
public CSharpToJavaScript.Utils.Unsupported /*undefined*/ AddEventListener(string type, Action? callback, Union1 options) { throw new System.NotImplementedException(); }
13+
public CSharpToJavaScript.Utils.Unsupported /*undefined*/ AddEventListener(string type, Action<MouseEvent>? callback, Union1 options) { throw new System.NotImplementedException(); }
14+
15+
public CSharpToJavaScript.Utils.Unsupported /*undefined*/ RemoveEventListener(string type, Action? callback, Union2 options) { throw new System.NotImplementedException(); }
16+
}
17+
}

CSharpToJavaScript/APIs/JS/GM.cs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using CSharpToJavaScript.Utils;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace CSharpToJavaScript.APIs.JS
9+
{
10+
[To(ToAttribute.Default)]
11+
public partial class GM
12+
{
13+
public GM() { }
14+
[To(ToAttribute.FirstCharToLowerCase)]
15+
public static void DeleteValue(string name)
16+
{
17+
18+
}
19+
20+
[To(ToAttribute.FirstCharToLowerCase)]
21+
public static Task<dynamic> GetValue(string name)
22+
{
23+
return new Task<dynamic>(() => { return 0; });
24+
}
25+
26+
[To(ToAttribute.FirstCharToLowerCase)]
27+
public static void SetValue(string name, dynamic value)
28+
{
29+
30+
}
31+
32+
[To(ToAttribute.FirstCharToLowerCase)]
33+
public static Task<List<dynamic>> ListValues()
34+
{
35+
return new Task<List<dynamic>>(() => { return new List<dynamic>(); });
36+
}
37+
38+
[To(ToAttribute.FirstCharToLowerCase)]
39+
public static void OpenInTab(string url, bool open_in_background = false)
40+
{
41+
42+
}
43+
44+
[To(ToAttribute.FirstCharToLowerCase)]
45+
public static class Info
46+
{
47+
[To(ToAttribute.FirstCharToLowerCase)]
48+
public static class Script
49+
{
50+
[To(ToAttribute.FirstCharToLowerCase)]
51+
public static string Version { get; set; } = string.Empty;
52+
}
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)