mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +00:00
Change the target framework version to 4.8, and renaming some functions
This commit is contained in:
parent
3b18896564
commit
4a33238d7e
|
@ -117,7 +117,7 @@ namespace WelsonJS.Service
|
||||||
scriptControl.AddCode(scriptText);
|
scriptControl.AddCode(scriptText);
|
||||||
|
|
||||||
// initialize
|
// initialize
|
||||||
Log(InvokeScriptMethod("initializeService", scriptName, "start"));
|
Log(DispatchServiceEvent(scriptName, "start"));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@ namespace WelsonJS.Service
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log(InvokeScriptMethod("initializeService", scriptName, "stop"));
|
Log(DispatchServiceEvent(scriptName, "stop"));
|
||||||
if (scriptControl != null)
|
if (scriptControl != null)
|
||||||
{
|
{
|
||||||
scriptControl.Reset();
|
scriptControl.Reset();
|
||||||
|
@ -163,7 +163,7 @@ namespace WelsonJS.Service
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log(InvokeScriptMethod("initializeService", scriptName, "elapsedTime"));
|
Log(DispatchServiceEvent(scriptName, "elapsedTime"));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -171,6 +171,11 @@ namespace WelsonJS.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string DispatchServiceEvent(string name, string eventType)
|
||||||
|
{
|
||||||
|
return InvokeScriptMethod("dispatchServiceEvent", name, eventType);
|
||||||
|
}
|
||||||
|
|
||||||
private string InvokeScriptMethod(string methodName, params object[] parameters)
|
private string InvokeScriptMethod(string methodName, params object[] parameters)
|
||||||
{
|
{
|
||||||
if (scriptControl != null)
|
if (scriptControl != null)
|
||||||
|
@ -185,6 +190,7 @@ namespace WelsonJS.Service
|
||||||
return "void";
|
return "void";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void Log(string message)
|
private void Log(string message)
|
||||||
{
|
{
|
||||||
using (StreamWriter writer = new StreamWriter(logFilePath, true))
|
using (StreamWriter writer = new StreamWriter(logFilePath, true))
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>WelsonJS.Service</RootNamespace>
|
<RootNamespace>WelsonJS.Service</RootNamespace>
|
||||||
<AssemblyName>WelsonJS.Service</AssemblyName>
|
<AssemblyName>WelsonJS.Service</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user