Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 08616eff

Přidáno uživatelem Jakub Šilhavý před asi 3 roky(ů)

re #9566 Removed IoUtils.cs since it was being used only in one place.

Zobrazit rozdíly:

ld_client/LDClient/detection/InfoFetcher.cs
1 1
using System.Diagnostics;
2
using LDClient.utils;
3 2

  
4 3
namespace LDClient.detection {
5 4

  
......
46 45

  
47 46
        private bool RetrieveDebuggerInfo(string filePath) {
48 47
            try {
49
                var fileContent = IoUtils.ReadFile(filePath);
48
                var fileContent = File.ReadAllLines(filePath).Aggregate("", (current, line) => $"{current}{line}\n");
50 49
                var (headSerialNumber, bodySerialNumber) = DebuggerInfoParser.Parse(fileContent);
51 50
                HeadSerialNumber = headSerialNumber;
52 51
                BodySerialNumber = bodySerialNumber;
ld_client/LDClient/detection/ProcessProcessDetection.cs
1 1
using System.Diagnostics;
2
using System.Text.Json;
3 2
using LDClient.network;
4 3
using LDClient.network.data;
5 4

  
......
33 32
            }
34 33
            return success;
35 34
        }
36
        
35

  
37 36
        private async Task DebuggerDisconnected() {
38 37
            if (_lastConnectedPayload is not null) {
39 38
                _lastConnectedPayload.Status = ConnectionStatus.Disconnected;
ld_client/LDClient/utils/IoUtils.cs
1
namespace LDClient.utils {
2

  
3
    public static class IoUtils {
4

  
5
        public static string ReadFile(string filename) {
6
            return File.ReadAllLines(filename).Aggregate("", (current, line) => $"{current}{line}\n");
7
        }
8
    }
9
}

Také k dispozici: Unified diff