Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Address some code smells #738

Merged
merged 1 commit into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Framework/BaseTest/SoftAssertException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Magenic.Maqs.BaseTest
/// <summary>
/// Soft assert exceptions
/// </summary>
[Serializable]
public class SoftAssertException : Exception
{
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Framework/FrameworkUnitTests/MoqMailFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class MoqMailFolder : IMailFolder
public int Count => throw new NotImplementedException();

public HashSet<ThreadingAlgorithm> ThreadingAlgorithms => throw new NotImplementedException();

#pragma warning disable 0067
public event EventHandler<EventArgs> Opened;
public event EventHandler<EventArgs> Closed;
public event EventHandler<EventArgs> Deleted;
Expand All @@ -96,6 +96,7 @@ class MoqMailFolder : IMailFolder
public event EventHandler<EventArgs> CountChanged;
public event EventHandler<EventArgs> RecentChanged;
public event EventHandler<EventArgs> UnreadChanged;
#pragma warning restore 0067

public void AddAccessRights(string name, AccessRights rights, CancellationToken cancellationToken = default)
{
Expand Down
20 changes: 20 additions & 0 deletions Framework/Utilities/Helper/MaqsConfigException.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using System.Runtime.Serialization;

namespace Magenic.Maqs.Utilities.Helper
{
/// <summary>
/// Definition of exceptions which will be thrown when there is a problem with loading elements of the MAQS app.config
/// </summary>
[Serializable]
public class MaqsConfigException : Exception
{
/// <summary>
Expand All @@ -14,5 +16,23 @@ public class MaqsConfigException : Exception
public MaqsConfigException(string message) : base(message)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MaqsConfigException" /> class
/// </summary>
/// <param name="message">The message that describes the error</param>
/// <param name="innerException">The exception that is the cause of the current exception</param>
public MaqsConfigException(string message, Exception innerException) : base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MaqsConfigException" /> class
/// </summary>
/// <param name="info">The serialization information object that holds the serialized object data about the exception being thrown</param>
/// <param name="context">The serialization streaming context</param>
protected MaqsConfigException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
20 changes: 20 additions & 0 deletions Framework/Utilities/Logging/MaqsLoggingConfigException.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using System.Runtime.Serialization;

namespace Magenic.Maqs.Utilities.Helper
{
/// <summary>
/// Definition of exceptions which will be thrown when there is a problem with loading elements of the MAQS app.config
/// </summary>
[Serializable]
public class MaqsLoggingConfigException : Exception
{
/// <summary>
Expand All @@ -14,5 +16,23 @@ public class MaqsLoggingConfigException : Exception
public MaqsLoggingConfigException(string message) : base(message)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MaqsLoggingConfigException" /> class
/// </summary>
/// <param name="message">The message that describes the error</param>
/// <param name="innerException">The exception that is the cause of the current exception</param>
public MaqsLoggingConfigException(string message, Exception innerException) : base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MaqsLoggingConfigException" /> class
/// </summary>
/// <param name="info">The serialization information object that holds the serialized object data about the exception being thrown</param>
/// <param name="context">The serialization streaming context</param>
protected MaqsLoggingConfigException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}