root / trunk / Pithos.ShellExtensions / PithosHost.cs @ 3ddbb7b8
History | View | Annotate | Download (1.9 kB)
1 |
// ----------------------------------------------------------------------- |
---|---|
2 |
// <copyright file="PithosHost.cs" company="Microsoft"> |
3 |
// TODO: Update copyright text. |
4 |
// </copyright> |
5 |
// ----------------------------------------------------------------------- |
6 |
|
7 |
using System.ServiceModel; |
8 |
using Pithos.ShellExtensions.PithosService; |
9 |
|
10 |
namespace Pithos.ShellExtensions |
11 |
{ |
12 |
/// <summary> |
13 |
/// Returns the status service clients |
14 |
/// </summary> |
15 |
public static class PithosHost |
16 |
{ |
17 |
/// <summary> |
18 |
/// Provides a client for retrieving file status from the Pithos App |
19 |
/// </summary> |
20 |
/// <returns></returns> |
21 |
public static StatusServiceClient GetStatusClient() |
22 |
{ |
23 |
var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None); |
24 |
var remoteAddress = new EndpointAddress("net.pipe://localhost/pithos/statuscache"); |
25 |
|
26 |
return new StatusServiceClient(binding, remoteAddress); |
27 |
} |
28 |
|
29 |
/// <summary> |
30 |
/// Provides a client for retrieving settings from the Pithos App |
31 |
/// </summary> |
32 |
/// <returns></returns> |
33 |
public static SettingsServiceClient GetSettingsClient() |
34 |
{ |
35 |
var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None); |
36 |
var remoteAddress = new EndpointAddress("net.pipe://localhost/pithos/settings"); |
37 |
|
38 |
return new SettingsServiceClient(binding, remoteAddress); |
39 |
} |
40 |
|
41 |
|
42 |
/// <summary> |
43 |
/// Provides a client for sending commands to the Pithos Client |
44 |
/// </summary> |
45 |
/// <returns></returns> |
46 |
public static CommandsServiceClient GetCommandsClient() |
47 |
{ |
48 |
var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None); |
49 |
var remoteAddress = new EndpointAddress("net.pipe://localhost/pithos/commands"); |
50 |
|
51 |
return new CommandsServiceClient(binding, remoteAddress); |
52 |
} |
53 |
|
54 |
|
55 |
} |
56 |
} |