Skip to content

Commit aaa4c87

Browse files
feat(version, refactoring) - Migration to .Net5
1 parent 56c1a06 commit aaa4c87

35 files changed

Lines changed: 486 additions & 708 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
# User-specific files (MonoDevelop/Xamarin Studio)
1717
*.userprefs
18+
*.Production.json
1819

1920
# Build results
2021
[Dd]ebug/

.vscode/tasks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build",
8+
"command": "dotnet",
9+
"type": "shell",
10+
"args": [
11+
"build",
12+
// Ask dotnet build to generate full paths for file names.
13+
"/property:GenerateFullPaths=true",
14+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
15+
"/consoleloggerparameters:NoSummary"
16+
],
17+
"group": "build",
18+
"presentation": {
19+
"reveal": "silent"
20+
},
21+
"problemMatcher": "$msCompile"
22+
}
23+
]
24+
}

README.md

Lines changed: 74 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,84 +9,110 @@ Features
99
--------
1010
RunIt automate the process of 'Run as' Authentication with simple settings:
1111

12-
Set RunIt section in configuration file
13-
---------------------------------------
14-
15-
~~~xml
16-
<configSections>
17-
<section name="enviroment" type="RunIt.Infra.Configuration.EnviromentConfigurationSection, RunIt"/>
18-
</configSections>
19-
~~~
20-
2112
Create a enviroment
2213
-------------------
23-
~~~xml
24-
<enviroment>
25-
</enviroment>
14+
15+
~~~json
16+
"Env": {
17+
18+
}
2619
~~~
2720

2821
Set a new application in enviroment
2922
-----------------------------------
30-
~~~xml
31-
<applications>
32-
<add alias="" filename="" name=""/>
33-
</applications>
23+
~~~json
24+
"Applications": [{
25+
"Name": "Application name",
26+
"Alias": "Application alias",
27+
"Filename": "Application path with file name"
28+
}]
3429
~~~
3530

36-
- alias: this required attribute allows to RunIt run without directory and identify the application
37-
- filename: this required attribute is a full filename with directory is locate de application
38-
- name: this attribute describe the application.
31+
- Alias: this required attribute allows to RunIt run without directory and identify the application
32+
- Filename: this required attribute is a full filename with directory is locate de application
33+
- Name: this attribute describe the application.
3934

4035
Exemple Usage:
41-
~~~xml
42-
<enviroment>
43-
<applications>
44-
<add alias="sqlm" filename="%programfiles%/.../SqlManaagementStudio.exe" name="SQL Management Studio"/>
45-
</applications>
46-
</enviroment>
36+
~~~json
37+
"Env": {
38+
"Applications": [{
39+
"Name": "Visual Studio 2019",
40+
"Alias": "vs",
41+
"Filename": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\devenv.exe"
42+
}]
43+
}
4744
~~~
4845

49-
Set a new credential in enviroment
46+
Set a new domain in enviroment
5047
----------------------------------
51-
~~~xml
52-
<enviroment>
53-
<credentials>
54-
<add name="" username="" password="" domain="" />
55-
</credentials>
56-
</enviroment>
48+
~~~json
49+
"Domains" : [{
50+
"Name": "Domain name",
51+
"Username": "Username to authentication on domain",
52+
"Password": "Password to authentication on domain",
53+
"Alias": "Unique identification of domain"
54+
}],
5755
~~~
5856
- name: this required attribute identify a credential
5957
- username: this required attribute is a username to authentication on Windows 'Run as'
6058
- password: this required attribute is a password to authentication on Windows 'Run as'
6159
- domain: this required attribute is a domain to authentication on Windows 'Run as'
6260

6361
Example Usage:
64-
~~~xml
65-
<enviroment>
66-
<credentials>
67-
<add name="dev" username="augusto.mesquita" password="l4zyp4ssw0rd" domain="MyWindowsDomain" />
68-
</credentials>
69-
</enviroment>
62+
~~~json
63+
"Env": {
64+
"Domains" : [{
65+
"Name": "test",
66+
"Username": "test",
67+
"Password": "teste",
68+
"Alias": "tt"
69+
}],
70+
}
7071
~~~
7172

7273
This way we have a configuration
7374

74-
~~~xml
75-
<enviroment>
76-
<applications>
77-
<add alias="sqlm" filename="%programfiles%/.../SqlManaagementStudio.exe" name="SQL Management Studio"/>
78-
</applications>
79-
<credentials>
80-
<add name="dev" username="augusto.mesquita" password="l4zyp4ssw0rd" domain="MyWindowsDomain" />
81-
</credentials>
82-
</enviroment>
75+
~~~json
76+
{
77+
"Env": {
78+
"Domains" : [{
79+
"Name": "test",
80+
"Username": "test",
81+
"Password": "teste",
82+
"Alias": "tt"
83+
}],
84+
"Applications": [{
85+
"Name": "Visual Studio 2019",
86+
"Alias": "vs",
87+
"Filename": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\devenv.exe"
88+
},{
89+
"Name": "SQL Management",
90+
"Alias": "sql",
91+
"Filename": "C:\\Program Files (x86)\\Microsoft SQL Server Management Studio 18\\Common7\\IDE\\Ssms.exe"
92+
}]
93+
}
94+
}
8395
~~~
8496

8597
Finally, Run It!
8698
----------------
8799
Open the 'CMD' and go to RunIt assmbly folder, execute a command:
88100
~~~console
89-
bin > RunIt.exe -e sqlm dev
101+
bin > RunIt.exe -d tt -a sql
102+
~~~
103+
104+
If need see log of the app use verbose arg `-v`:
105+
~~~console
106+
bin > RunIt.exe -v -d tt -a sql
107+
trce: RunIt.Program[0]
108+
Domain St0n3.123123Zxcasqw...
109+
trce: RunIt.Program[0]
110+
Aplication Visual Studio 2019...
111+
trce: RunIt.Program[0]
112+
Authenticating the Visual Studio 2019 with NPADSTONE\augusto.mesquita...
113+
File: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe...
114+
trce: RunIt.Program[0]
115+
Executing ...C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe
90116
~~~
91117

92118

RunIt.Test/Infra/Configuration/EnviromentConfigurationSectionTest.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

RunIt.Test/Infra/Configuration/Group/ApplicationGroupElementCollectionTest.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

RunIt.Test/Infra/Configuration/Group/CredentialGroupElementCollectionTest.cs

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)