File tree 2 files changed +0
-16
lines changed 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change 1
1
namespace GitVersion
2
2
{
3
3
using System . IO ;
4
- using System . Linq ;
5
4
using GitVersion . VersionCalculation ;
6
- using LibGit2Sharp ;
7
5
8
6
public class GitVersionFinder
9
7
{
Original file line number Diff line number Diff line change 5
5
using System . Collections . Generic ;
6
6
using System . IO ;
7
7
using System . Linq ;
8
- using System . Reflection ;
9
-
10
8
using GitVersion . Helpers ;
11
9
12
10
using YamlDotNet . Serialization ;
13
11
14
12
public class VersionVariables : IEnumerable < KeyValuePair < string , string > >
15
13
{
16
- public static VersionVariables FromDictionary ( IEnumerable < KeyValuePair < string , string > > properties )
17
- {
18
- var type = typeof ( VersionVariables ) ;
19
- var ctor = type . GetConstructors ( ) . Single ( ) ;
20
- var ctorArgs = ctor . GetParameters ( )
21
- . Select ( p => properties . Single ( v => v . Key . ToLower ( ) == p . Name . ToLower ( ) ) . Value )
22
- . Cast < object > ( )
23
- . ToArray ( ) ;
24
- return ( VersionVariables ) Activator . CreateInstance ( type , ctorArgs ) ;
25
- }
26
-
27
14
public VersionVariables ( string major ,
28
15
string minor ,
29
16
string patch ,
@@ -135,7 +122,6 @@ IEnumerator IEnumerable.GetEnumerator()
135
122
return GetEnumerator ( ) ;
136
123
}
137
124
138
-
139
125
public static VersionVariables FromDictionary ( IEnumerable < KeyValuePair < string , string > > properties )
140
126
{
141
127
var type = typeof ( VersionVariables ) ;
You can’t perform that action at this time.
0 commit comments