forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from UiPath/fix/schannel_config
select schannel ssl backend if configured in .gitconfig globally
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#nullable enable | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
|
||
internal sealed class ConfigurationFileReader | ||
{ | ||
private readonly string _path; | ||
|
||
[DllImport("kernel32", CharSet = CharSet.Unicode)] | ||
private static extern int GetPrivateProfileString(string section, string key, string defaultValue, StringBuilder result, int size, string filePath); | ||
|
||
public ConfigurationFileReader(string path) | ||
{ | ||
_path = path; | ||
} | ||
|
||
public string Read(string section, string key) | ||
{ | ||
var result = new StringBuilder(255); | ||
GetPrivateProfileString(section, key, "", result, 255, _path); | ||
return result.ToString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters