mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-30 14:34:09 +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){
|
public void Write(string key){
|
||||||
writerStream.WriteLine(data);
|
writerStream.WriteLine(key);
|
||||||
writerStream.Flush();
|
writerStream.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,8 +95,8 @@ internal PipeReadEventArgs(string line){
|
|||||||
int separatorIndex = line.IndexOf(Separator, StringComparison.Ordinal);
|
int separatorIndex = line.IndexOf(Separator, StringComparison.Ordinal);
|
||||||
|
|
||||||
if (separatorIndex == -1){
|
if (separatorIndex == -1){
|
||||||
Key = string.Empty;
|
Key = line;
|
||||||
Data = line;
|
Data = string.Empty;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Key = line.Substring(0, separatorIndex);
|
Key = line.Substring(0, separatorIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user