Skip to content

Commit

Permalink
Introduce constants for the direction strings
Browse files Browse the repository at this point in the history
References #1
  • Loading branch information
andreashuber-lawo committed Oct 29, 2015
1 parent 0da80cb commit f02f852
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Lawo.GlowAnalyzerProxy.Main/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ namespace Lawo.GlowAnalyzerProxy.Main
using System.Threading.Tasks;
using System.Windows.Documents;
using System.Windows.Media;
using Lawo.ComponentModel;
using Lawo.EmberPlus.S101;
using Lawo.GlowAnalyzerProxy.Main.Properties;
using Lawo.IO;
using Lawo.Reflection;
using Lawo.Threading.Tasks;

using ComponentModel;
using EmberPlus.S101;
using Properties;
using IO;
using Reflection;
using Threading.Tasks;

internal sealed class MainWindowViewModel : NotifyPropertyChanged, IDataErrorInfo
{
const string ShortConsumerToProvider = "C to P";
const string ConsumerToProvider = "Consumer to Provider";
const string ShortProviderToConsumer = "P to C";
const string ProviderToConsumer = "Provider to Consumer";
private static readonly string KeepAliveRequestString = new KeepAliveRequest().ToString();
private static readonly string KeepAliveResponseString = new KeepAliveResponse().ToString();

Expand Down Expand Up @@ -405,13 +410,13 @@ private async Task<TcpClient> ConnectToProvider()
private Task ForwardFromConsumer(LogInfo logInfo)
{
return this.ForwardAsync(
this.ConsumerConnection, this.ProviderConnection, logInfo, "C to P", "Consumer to Provider");
this.ConsumerConnection, this.ProviderConnection, logInfo, ShortConsumerToProvider, ConsumerToProvider);
}

private Task ForwardFromProvider(LogInfo logInfo)
{
return this.ForwardAsync(
this.ProviderConnection, this.ConsumerConnection, logInfo, "P to C", "Provider to Consumer");
this.ProviderConnection, this.ConsumerConnection, logInfo, ShortProviderToConsumer, ProviderToConsumer);
}

private async Task ForwardAsync(
Expand Down

0 comments on commit f02f852

Please sign in to comment.