Skip to content

Commit 86634d1

Browse files
author
T_S_V
committed
Started migration to Creator V2
1 parent bfb71c2 commit 86634d1

40 files changed

+15948
-1495
lines changed

.vscode/launch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
// Use IntelliSense to find out which attributes exist for C# debugging
3-
// Use hover for the description of the existing attributes
4-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5-
"version": "0.2.0",
6-
"configurations": [
2+
// Use IntelliSense to find out which attributes exist for C# debugging
3+
// Use hover for the description of the existing attributes
4+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5+
"version": "0.2.0",
6+
"configurations": [
77
{
88
"name": ".NET Core Launch (web)",
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.1/surveyjs-aspnet-mvc.dll",
13+
"program": "${workspaceRoot}/bin/Debug/netcoreapp3.1/surveyjs-aspnet-mvc.dll",
1414
"args": [],
1515
"cwd": "${workspaceRoot}",
1616
"stopAtEntry": false,

.vscode/tasks.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
{
2-
"version": "0.1.0",
2+
"version": "2.0.0",
33
"command": "dotnet",
4-
"isShellCommand": true,
54
"args": [],
65
"tasks": [
76
{
8-
"taskName": "build",
7+
"label": "build",
8+
"type": "shell",
9+
"command": "dotnet",
910
"args": [
11+
"build",
1012
"${workspaceRoot}/surveyjs-aspnet-mvc.csproj"
1113
],
12-
"isBuildCommand": true,
13-
"problemMatcher": "$msCompile"
14+
"problemMatcher": "$msCompile",
15+
"group": {
16+
"_id": "build",
17+
"isDefault": false
18+
}
1419
}
1520
]
1621
}

.vscode/tasks.json.old

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.1.0",
3+
"command": "dotnet",
4+
"isShellCommand": true,
5+
"args": [],
6+
"tasks": [
7+
{
8+
"taskName": "build",
9+
"args": [
10+
"${workspaceRoot}/surveyjs-aspnet-mvc.csproj"
11+
],
12+
"isBuildCommand": true,
13+
"problemMatcher": "$msCompile"
14+
}
15+
]
16+
}

Code/ResultsDefinition.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
namespace surveyjs_aspnet_mvc
6+
{
7+
[Serializable]
8+
public class SurveyResultsDefinition
9+
{
10+
public SurveyResultsDefinition()
11+
{
12+
data = new List<string>();
13+
}
14+
public string id { get; set; }
15+
public List<string> data { get; private set; }
16+
17+
public static SurveyResultsDefinition FindById(IEnumerable<SurveyResultsDefinition> collection, string id)
18+
{
19+
return collection.Where(s => s.id == id).FirstOrDefault();
20+
}
21+
22+
public static List<SurveyResultsDefinition> GetDefaultSurveyResults()
23+
{
24+
SurveyResultsDefinition surveyResults1 = new SurveyResultsDefinition { id = "1" };
25+
surveyResults1.data.AddRange(new string[] {
26+
@"{""Quality"":{""affordable"":""5"",""better then others"":""5"",""does what it claims"":""5"",""easy to use"":""5""},""satisfaction"":5,""recommend friends"":5,""suggestions"":""I am happy!"",""price to competitors"":""Not sure"",""price"":""low"",""pricelimit"":{""mostamount"":""100"",""leastamount"":""100""}}",
27+
@"{""Quality"":{""affordable"":""3"",""does what it claims"":""2"",""better then others"":""2"",""easy to use"":""3""},""satisfaction"":3,""suggestions"":""better support"",""price to competitors"":""Not sure"",""price"":""high"",""pricelimit"":{""mostamount"":""60"",""leastamount"":""10""}}"
28+
});
29+
SurveyResultsDefinition surveyResults2 = new SurveyResultsDefinition { id = "2" };
30+
surveyResults1.data.AddRange(new string[] {
31+
@"{""member_arrray_employer"":[{}],""partner_arrray_employer"":[{}],""maritalstatus_c"":""Married"",""member_receives_income_from_employment"":""0"",""partner_receives_income_from_employment"":""0""}",
32+
@"{""member_arrray_employer"":[{}],""partner_arrray_employer"":[{}],""maritalstatus_c"":""Single"",""member_receives_income_from_employment"":""1"",""member_type_of_employment"":[""Self employment""],""member_seasonal_intermittent_or_contract_work"":""0""}"
33+
});
34+
35+
List<SurveyResultsDefinition> defaultSurveyResults = new List<SurveyResultsDefinition> { surveyResults1, surveyResults2 };
36+
return defaultSurveyResults;
37+
38+
}
39+
40+
}
41+
}

0 commit comments

Comments
 (0)