mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +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);
|
||||
|
||||
// initialize
|
||||
Log(InvokeScriptMethod("initializeService", scriptName, "start"));
|
||||
Log(DispatchServiceEvent(scriptName, "start"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ namespace WelsonJS.Service
|
|||
|
||||
try
|
||||
{
|
||||
Log(InvokeScriptMethod("initializeService", scriptName, "stop"));
|
||||
Log(DispatchServiceEvent(scriptName, "stop"));
|
||||
if (scriptControl != null)
|
||||
{
|
||||
scriptControl.Reset();
|
||||
|
@ -163,7 +163,7 @@ namespace WelsonJS.Service
|
|||
{
|
||||
try
|
||||
{
|
||||
Log(InvokeScriptMethod("initializeService", scriptName, "elapsedTime"));
|
||||
Log(DispatchServiceEvent(scriptName, "elapsedTime"));
|
||||
}
|
||||
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)
|
||||
{
|
||||
if (scriptControl != null)
|
||||
|
@ -185,6 +190,7 @@ namespace WelsonJS.Service
|
|||
return "void";
|
||||
}
|
||||
|
||||
|
||||
private void Log(string message)
|
||||
{
|
||||
using (StreamWriter writer = new StreamWriter(logFilePath, true))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>WelsonJS.Service</RootNamespace>
|
||||
<AssemblyName>WelsonJS.Service</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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