You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
598 B
C#
30 lines
598 B
C#
using System.ComponentModel.Composition;
|
|
using Util;
|
|
|
|
namespace Proxy
|
|
{
|
|
[Export]
|
|
public class MachineChecker
|
|
{
|
|
public INetwork Network { get; set; }
|
|
|
|
[ImportingConstructor]
|
|
public MachineChecker(INetwork network)
|
|
{
|
|
Network = network;
|
|
}
|
|
|
|
public string Check(string machine)
|
|
{
|
|
if (Network.IsLocalMachine(machine))
|
|
{
|
|
return string.Format("Local : ");
|
|
}
|
|
else
|
|
{
|
|
return string.Format("Foreign:");
|
|
}
|
|
}
|
|
}
|
|
}
|