mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-09 06:15:49 +02:00
Tweak DuplexPipe to set key instead of data when separator is missing
This commit is contained in:
parent
ec5d503e4d
commit
d4ecfcceec
@ -46,8 +46,8 @@ private void ReaderThread(){
|
||||
}
|
||||
}
|
||||
|
||||
public void Write(string data){
|
||||
writerStream.WriteLine(data);
|
||||
public void Write(string key){
|
||||
writerStream.WriteLine(key);
|
||||
writerStream.Flush();
|
||||
}
|
||||
|
||||
@ -95,8 +95,8 @@ internal PipeReadEventArgs(string line){
|
||||
int separatorIndex = line.IndexOf(Separator, StringComparison.Ordinal);
|
||||
|
||||
if (separatorIndex == -1){
|
||||
Key = string.Empty;
|
||||
Data = line;
|
||||
Key = line;
|
||||
Data = string.Empty;
|
||||
}
|
||||
else{
|
||||
Key = line.Substring(0, separatorIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user