From e111c33bc87acf40202f9e5423e21b087a366f07 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 7 Jan 2019 16:06:38 +0200 Subject: Added new events !!! --- .../EventLogging/DefaultEventLogger.cs | 16 ++++++---------- .../Tango.MachineStudio.Common/Html/IHtmlPresenter.cs | 14 -------------- .../Tango.MachineStudio.Common.csproj | 3 +-- 3 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Html/IHtmlPresenter.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index e634de824..8347c3144 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -82,10 +82,6 @@ namespace Tango.MachineStudio.Common.EventLogging { _db = ObservablesContext.CreateDefault(); - _db.ActionTypes.ToList(); - _db.EventTypesActions.ToList(); - _db.EventTypesCategories.ToList(); - _db.EventTypesGroups.ToList(); _db.EventTypes.ToList(); foreach (var type in _db.EventTypes) @@ -140,7 +136,7 @@ namespace Tango.MachineStudio.Common.EventLogging /// The message. private void Machine_RequestSent(object sender, IMessage message) { - Log(EventTypes.RequestSent, String.Format("Sending request '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString())); + Log(EventTypes.REQUEST_SENT, String.Format("Sending request '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString())); } /// @@ -150,7 +146,7 @@ namespace Tango.MachineStudio.Common.EventLogging /// The instance containing the event data. private void Machine_RequestFailed(object sender, RequestFailedEventArgs e) { - Log(EventTypes.RequestFailed, String.Format("Request failed '{0}'...{1}{2}{1}{3}", e.Message.GetType().Name, Environment.NewLine, e.Message.ToJsonString(), e.Exception.ToString())); + Log(EventTypes.REQUEST_FAILED, String.Format("Request failed '{0}'...{1}{2}{1}{3}", e.Message.GetType().Name, Environment.NewLine, e.Message.ToJsonString(), e.Exception.ToString())); } /// @@ -160,7 +156,7 @@ namespace Tango.MachineStudio.Common.EventLogging /// The message. private void Machine_ResponseReceived(object sender, IMessage message) { - Log(EventTypes.ResponseReceived, String.Format("Response received '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString())); + Log(EventTypes.RESPONSE_RECEIVED, String.Format("Response received '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString())); } /// @@ -271,7 +267,7 @@ namespace Tango.MachineStudio.Common.EventLogging /// The exception. public void Log(Exception exception) { - Log(EventTypes.ApplicationException, exception.ToString()); + Log(EventTypes.APPLICATION_EXCEPTION, exception.ToString()); } /// @@ -281,7 +277,7 @@ namespace Tango.MachineStudio.Common.EventLogging /// public void Log(Exception exception, string description) { - Log(EventTypes.ApplicationException, description + Environment.NewLine + exception.ToString()); + Log(EventTypes.APPLICATION_EXCEPTION, description + Environment.NewLine + exception.ToString()); } /// @@ -290,7 +286,7 @@ namespace Tango.MachineStudio.Common.EventLogging /// The message. public void Log(String message) { - Log(EventTypes.ApplicationInformation, message); + Log(EventTypes.APPLICATION_INFORMATION, message); } /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Html/IHtmlPresenter.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Html/IHtmlPresenter.cs deleted file mode 100644 index 549022050..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Html/IHtmlPresenter.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; - -namespace Tango.MachineStudio.Common.Html -{ - public interface IHtmlPresenter - { - bool DisplayHtml(HtmlPage html); - } -} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 704223d17..2d83fdec4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -101,7 +101,6 @@ - @@ -312,7 +311,7 @@ - + \ No newline at end of file -- cgit v1.3.1