Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
PackageBuildMonitorRemote.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Collections.Generic;
5 using System.ServiceModel;
6 using EnvDTE80;
7 using Microsoft.VisualStudio;
8 using Microsoft.VisualStudio.Shell.Interop;
9 using SiliconStudio.Assets.CompilerApp;
10 using SiliconStudio.BuildEngine;
11 using SiliconStudio.Core.Diagnostics;
13 
14 namespace SiliconStudio.Paradox.VisualStudio.BuildEngine
15 {
16  [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
18  {
19  private string logPipeUrl;
20  private IBuildMonitorCallback buildMonitorCallback;
21 
22  public PackageBuildMonitorRemote(IBuildMonitorCallback buildMonitorCallback, string logPipeUrl)
23  {
24  this.buildMonitorCallback = buildMonitorCallback;
25  this.logPipeUrl = logPipeUrl;
26 
27  // Listen to pipe with this as listener
28  var host = new ServiceHost(this);
29  host.AddServiceEndpoint(typeof(IForwardSerializableLogRemote), new NetNamedPipeBinding(NetNamedPipeSecurityMode.None) { MaxReceivedMessageSize = int.MaxValue }, this.logPipeUrl);
30  host.Open();
31  }
32 
34  {
35  buildMonitorCallback.Message(message.Type.ToString(), message.Module, message.Text);
36  }
37  }
38 }
PackageBuildMonitorRemote(IBuildMonitorCallback buildMonitorCallback, string logPipeUrl)
A class that represents a copy of a LogMessage that can be serialized.