diff --git a/SnakeEyes/SnakeEyes.sln b/SnakeEyes/SnakeEyes.sln
index a98d77b..af553d1 100644
--- a/SnakeEyes/SnakeEyes.sln
+++ b/SnakeEyes/SnakeEyes.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26228.9
+VisualStudioVersion = 15.0.27004.2005
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Probe", "Probe\Probe.csproj", "{7AE76F93-A62C-4A9F-9B69-BC0F3453DB50}"
EndProject
@@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileProbe", "FileProbe\File
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqTraceListener", "MsmqTraceListener\MsmqTraceListener.csproj", "{7EB8483E-D24A-4D08-A2EF-9049224C1977}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WcfServiceTraceListener", "WcfServiceTraceListener\WcfServiceTraceListener.csproj", "{BE987FE7-B9FD-4834-86BE-C6749977EBF0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -87,8 +89,15 @@ Global
{7EB8483E-D24A-4D08-A2EF-9049224C1977}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EB8483E-D24A-4D08-A2EF-9049224C1977}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EB8483E-D24A-4D08-A2EF-9049224C1977}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BE987FE7-B9FD-4834-86BE-C6749977EBF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE987FE7-B9FD-4834-86BE-C6749977EBF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BE987FE7-B9FD-4834-86BE-C6749977EBF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BE987FE7-B9FD-4834-86BE-C6749977EBF0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4C2C3735-5BFB-49ED-A471-472AED1FBE5D}
+ EndGlobalSection
EndGlobal
diff --git a/SnakeEyes/SnakeEyesService/SnakeEyesService.csproj b/SnakeEyes/SnakeEyesService/SnakeEyesService.csproj
index 343edac..15ab857 100644
--- a/SnakeEyes/SnakeEyesService/SnakeEyesService.csproj
+++ b/SnakeEyes/SnakeEyesService/SnakeEyesService.csproj
@@ -135,6 +135,10 @@
{7AE76F93-A62C-4A9F-9B69-BC0F3453DB50}
Probe
+
+ {be987fe7-b9fd-4834-86be-c6749977ebf0}
+ WcfServiceTraceListener
+
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.disco b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.disco
new file mode 100644
index 0000000..5f52675
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.disco
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.wsdl b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.wsdl
new file mode 100644
index 0000000..07ba6bd
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.wsdl
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.xsd b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.xsd
new file mode 100644
index 0000000..d58e7f3
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService.xsd
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService1.xsd b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService1.xsd
new file mode 100644
index 0000000..dcf16b9
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService1.xsd
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService2.xsd b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService2.xsd
new file mode 100644
index 0000000..692b412
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService2.xsd
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService3.xsd b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService3.xsd
new file mode 100644
index 0000000..511aeac
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/MonitoringService3.xsd
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+ 8
+
+
+
+
+
+
+ 16
+
+
+
+
+
+
+ 256
+
+
+
+
+
+
+ 512
+
+
+
+
+
+
+ 1024
+
+
+
+
+
+
+ 2048
+
+
+
+
+
+
+ 4096
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/Reference.cs b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/Reference.cs
new file mode 100644
index 0000000..4d5d69f
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/Reference.cs
@@ -0,0 +1,219 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WcfServiceTraceListener.MonitoringService {
+ using System.Runtime.Serialization;
+ using System;
+
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+ [System.Runtime.Serialization.DataContractAttribute(Name="ProbeResultMessage", Namespace="http://schemas.datacontract.org/2004/07/TWP.Areas.Monitoring.Models")]
+ [System.SerializableAttribute()]
+ public partial class ProbeResultMessage : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+ [System.NonSerializedAttribute()]
+ private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private System.Diagnostics.TraceEventType EventTypeField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string MachineNameField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private System.Nullable MaxValueField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string MessageField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private System.Nullable MinValueField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private string NameField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private System.DateTime TimestampField;
+
+ [System.Runtime.Serialization.OptionalFieldAttribute()]
+ private System.Nullable ValueField;
+
+ [global::System.ComponentModel.BrowsableAttribute(false)]
+ public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+ get {
+ return this.extensionDataField;
+ }
+ set {
+ this.extensionDataField = value;
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Diagnostics.TraceEventType EventType {
+ get {
+ return this.EventTypeField;
+ }
+ set {
+ if ((this.EventTypeField.Equals(value) != true)) {
+ this.EventTypeField = value;
+ this.RaisePropertyChanged("EventType");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string MachineName {
+ get {
+ return this.MachineNameField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.MachineNameField, value) != true)) {
+ this.MachineNameField = value;
+ this.RaisePropertyChanged("MachineName");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Nullable MaxValue {
+ get {
+ return this.MaxValueField;
+ }
+ set {
+ if ((this.MaxValueField.Equals(value) != true)) {
+ this.MaxValueField = value;
+ this.RaisePropertyChanged("MaxValue");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Message {
+ get {
+ return this.MessageField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.MessageField, value) != true)) {
+ this.MessageField = value;
+ this.RaisePropertyChanged("Message");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Nullable MinValue {
+ get {
+ return this.MinValueField;
+ }
+ set {
+ if ((this.MinValueField.Equals(value) != true)) {
+ this.MinValueField = value;
+ this.RaisePropertyChanged("MinValue");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public string Name {
+ get {
+ return this.NameField;
+ }
+ set {
+ if ((object.ReferenceEquals(this.NameField, value) != true)) {
+ this.NameField = value;
+ this.RaisePropertyChanged("Name");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.DateTime Timestamp {
+ get {
+ return this.TimestampField;
+ }
+ set {
+ if ((this.TimestampField.Equals(value) != true)) {
+ this.TimestampField = value;
+ this.RaisePropertyChanged("Timestamp");
+ }
+ }
+ }
+
+ [System.Runtime.Serialization.DataMemberAttribute()]
+ public System.Nullable Value {
+ get {
+ return this.ValueField;
+ }
+ set {
+ if ((this.ValueField.Equals(value) != true)) {
+ this.ValueField = value;
+ this.RaisePropertyChanged("Value");
+ }
+ }
+ }
+
+ public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+ protected void RaisePropertyChanged(string propertyName) {
+ System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+ if ((propertyChanged != null)) {
+ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ [System.ServiceModel.ServiceContractAttribute(ConfigurationName="MonitoringService.IMonitoringService")]
+ public interface IMonitoringService {
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMonitoringService/AddProbeResult", ReplyAction="http://tempuri.org/IMonitoringService/AddProbeResultResponse")]
+ void AddProbeResult(WcfServiceTraceListener.MonitoringService.ProbeResultMessage ProbeResultMessage);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMonitoringService/AddProbeResult", ReplyAction="http://tempuri.org/IMonitoringService/AddProbeResultResponse")]
+ System.Threading.Tasks.Task AddProbeResultAsync(WcfServiceTraceListener.MonitoringService.ProbeResultMessage ProbeResultMessage);
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public interface IMonitoringServiceChannel : WcfServiceTraceListener.MonitoringService.IMonitoringService, System.ServiceModel.IClientChannel {
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class MonitoringServiceClient : System.ServiceModel.ClientBase, WcfServiceTraceListener.MonitoringService.IMonitoringService {
+
+ public MonitoringServiceClient() {
+ }
+
+ public MonitoringServiceClient(string endpointConfigurationName) :
+ base(endpointConfigurationName) {
+ }
+
+ public MonitoringServiceClient(string endpointConfigurationName, string remoteAddress) :
+ base(endpointConfigurationName, remoteAddress) {
+ }
+
+ public MonitoringServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(endpointConfigurationName, remoteAddress) {
+ }
+
+ public MonitoringServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(binding, remoteAddress) {
+ }
+
+ public void AddProbeResult(WcfServiceTraceListener.MonitoringService.ProbeResultMessage ProbeResultMessage) {
+ base.Channel.AddProbeResult(ProbeResultMessage);
+ }
+
+ public System.Threading.Tasks.Task AddProbeResultAsync(WcfServiceTraceListener.MonitoringService.ProbeResultMessage ProbeResultMessage) {
+ return base.Channel.AddProbeResultAsync(ProbeResultMessage);
+ }
+ }
+}
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/Reference.svcmap b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/Reference.svcmap
new file mode 100644
index 0000000..9b02967
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/Reference.svcmap
@@ -0,0 +1,36 @@
+
+
+
+ false
+ true
+ true
+
+ false
+ false
+ false
+
+
+ true
+ Auto
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/configuration.svcinfo b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/configuration.svcinfo
new file mode 100644
index 0000000..0423a81
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/configuration.svcinfo
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/configuration91.svcinfo b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/configuration91.svcinfo
new file mode 100644
index 0000000..166b518
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Connected Services/MonitoringService/configuration91.svcinfo
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+ BasicHttpBinding_IMonitoringService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StrongWildcard
+
+
+
+
+
+ 65536
+
+
+
+
+
+
+
+
+ System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ System.Text.UTF8Encoding
+
+
+ Buffered
+
+
+
+
+
+ Text
+
+
+ System.ServiceModel.Configuration.BasicHttpSecurityElement
+
+
+ None
+
+
+ System.ServiceModel.Configuration.HttpTransportSecurityElement
+
+
+ None
+
+
+ None
+
+
+ System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement
+
+
+ Never
+
+
+ TransportSelected
+
+
+ (Collection)
+
+
+
+
+
+ System.ServiceModel.Configuration.BasicHttpMessageSecurityElement
+
+
+ UserName
+
+
+ Default
+
+
+
+
+
+
+
+
+ http://localhost:55751/Areas/Monitoring/WcfServices/MonitoringService.svc
+
+
+
+
+
+ basicHttpBinding
+
+
+ BasicHttpBinding_IMonitoringService
+
+
+ MonitoringService.IMonitoringService
+
+
+ System.ServiceModel.Configuration.AddressHeaderCollectionElement
+
+
+ <Header />
+
+
+ System.ServiceModel.Configuration.IdentityElement
+
+
+ System.ServiceModel.Configuration.UserPrincipalNameElement
+
+
+
+
+
+ System.ServiceModel.Configuration.ServicePrincipalNameElement
+
+
+
+
+
+ System.ServiceModel.Configuration.DnsElement
+
+
+
+
+
+ System.ServiceModel.Configuration.RsaElement
+
+
+
+
+
+ System.ServiceModel.Configuration.CertificateElement
+
+
+
+
+
+ System.ServiceModel.Configuration.CertificateReferenceElement
+
+
+ My
+
+
+ LocalMachine
+
+
+ FindBySubjectDistinguishedName
+
+
+
+
+
+ False
+
+
+ BasicHttpBinding_IMonitoringService
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/Properties/AssemblyInfo.cs b/SnakeEyes/WcfServiceTraceListener/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..c072a51
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("WcfServiceTraceListener")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WcfServiceTraceListener")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("be987fe7-b9fd-4834-86be-c6749977ebf0")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/SnakeEyes/WcfServiceTraceListener/ServerExample/IMonitoringService.cs b/SnakeEyes/WcfServiceTraceListener/ServerExample/IMonitoringService.cs
new file mode 100644
index 0000000..b0f7cad
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/ServerExample/IMonitoringService.cs
@@ -0,0 +1,13 @@
+using System.ServiceModel;
+using Monitoring.Models;
+
+namespace Monitoring.WcfServices
+{
+ // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMonitoringService" in both code and config file together.
+ [ServiceContract]
+ public interface IMonitoringService
+ {
+ [OperationContract]
+ void AddProbeResult(ProbeResultMessage ProbeResultMessage);
+ }
+}
diff --git a/SnakeEyes/WcfServiceTraceListener/ServerExample/ProbeResultMessage.cs b/SnakeEyes/WcfServiceTraceListener/ServerExample/ProbeResultMessage.cs
new file mode 100644
index 0000000..46a6803
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/ServerExample/ProbeResultMessage.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Diagnostics;
+
+namespace Monitoring.Models
+{
+ public class ProbeResultMessage
+ {
+ public string MachineName { get; set; }
+ public string Name { get; set; }
+ public TraceEventType EventType { get; set; }
+ public DateTime Timestamp { get; set; }
+ public string Message { get; set; }
+ public double? Value { get; set; }
+ public double? MaxValue { get; set; }
+ public double? MinValue { get; set; }
+ }
+}
diff --git a/SnakeEyes/WcfServiceTraceListener/WcfServiceTraceListener.cs b/SnakeEyes/WcfServiceTraceListener/WcfServiceTraceListener.cs
new file mode 100644
index 0000000..b8fc021
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/WcfServiceTraceListener.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Text.RegularExpressions;
+using System.Xml;
+using WcfServiceTraceListener.MonitoringService;
+
+namespace SnakeEyes
+{
+ public class WcfServiceTraceListener : TraceListener
+ {
+ protected virtual void SendMessage(string message)
+ {
+ try
+ {
+ MonitoringServiceClient client = new MonitoringServiceClient();
+
+ XmlDocument xmlDoc = null;
+ xmlDoc = new XmlDocument();
+ xmlDoc.LoadXml(message);
+ XmlNode n = xmlDoc.SelectSingleNode("/TraceEvent");
+ Enum.TryParse(n.SelectSingleNode("EventType").InnerText, out TraceEventType type);
+
+ ProbeResultMessage p = new ProbeResultMessage
+ {
+ MachineName = n.SelectSingleNode("MachineName").InnerText,
+ Name = n.SelectSingleNode("Source").InnerText,
+ Timestamp = DateTime.Parse(n.SelectSingleNode("Timestamp").InnerText),
+ EventType = type,
+ Message = n.SelectSingleNode("Message").InnerText
+ };
+
+ if (n.SelectSingleNode("Value") != null && n.SelectSingleNode("Value").InnerText.Trim() != "")
+ {
+ p.Value = Double.Parse(n.SelectSingleNode("Value").InnerText);
+ }
+ if (n.SelectSingleNode("MaxValue") != null && n.SelectSingleNode("MaxValue").InnerText.Trim() != "")
+ {
+ p.MaxValue = Double.Parse(n.SelectSingleNode("MaxValue").InnerText);
+ }
+ if (n.SelectSingleNode("MinValue") != null && n.SelectSingleNode("MinValue").InnerText.Trim() != "")
+ {
+ p.MinValue = Double.Parse(n.SelectSingleNode("MinValue").InnerText);
+ }
+
+ client.AddProbeResult(p);
+ }
+ catch (Exception ex)
+ {
+ System.Diagnostics.Trace.TraceError(Name + " " + ex.Message);
+ System.Diagnostics.Trace.WriteLine(Name + " failed to send message");
+ System.Diagnostics.Trace.WriteLine(Name + " " + message);
+ System.Diagnostics.Trace.WriteLine(Name + " " + ex.ToString());
+ }
+ }
+
+ public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
+ {
+ if (Filter != null && !Filter.ShouldTrace(eventCache, source, eventType, id, message, null, null, null))
+ return;
+
+ SendMessage(message);
+ }
+
+ public override void Write(string message)
+ {
+ }
+
+ public override void WriteLine(string message)
+ {
+ }
+
+ protected override string[] GetSupportedAttributes()
+ {
+ return new string[] {};
+ }
+ }
+}
diff --git a/SnakeEyes/WcfServiceTraceListener/WcfServiceTraceListener.csproj b/SnakeEyes/WcfServiceTraceListener/WcfServiceTraceListener.csproj
new file mode 100644
index 0000000..15268cf
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/WcfServiceTraceListener.csproj
@@ -0,0 +1,94 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {BE987FE7-B9FD-4834-86BE-C6749977EBF0}
+ Library
+ Properties
+ WcfServiceTraceListener
+ WcfServiceTraceListener
+ v4.5
+ 512
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Reference.svcmap
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WCF Proxy Generator
+ Reference.cs
+
+
+
+
\ No newline at end of file
diff --git a/SnakeEyes/WcfServiceTraceListener/app.config b/SnakeEyes/WcfServiceTraceListener/app.config
new file mode 100644
index 0000000..529c407
--- /dev/null
+++ b/SnakeEyes/WcfServiceTraceListener/app.config
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+