Skip to content

Commit

Permalink
Add missing XML comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimontana82 committed Oct 14, 2023
1 parent 3a4cf9c commit 8400862
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
using System;
using System.Reflection;
using System.Text;

namespace FakeXrmEasy.Core.Exceptions
{
/// <summary>
/// Exception raised when the generated early bound types have an unsupported format
/// </summary>
public class FindReflectedTypeException : Exception
{
/// <summary>
/// Default constructor
/// </summary>
/// <param name="message"></param>
public FindReflectedTypeException(string message) : base(message)
{

}

/// <summary>
/// Creates a FindReflectedException from a ReflectionTypeLoadException
/// </summary>
/// <param name="reflectionTypeLoadException"></param>
/// <returns></returns>
public static FindReflectedTypeException New(ReflectionTypeLoadException reflectionTypeLoadException)
{
// now look at ex.LoaderExceptions - this is an Exception[], so:
var s = "";
var s = new StringBuilder();
foreach (var innerException in reflectionTypeLoadException.LoaderExceptions)
{
// write details of "inner", in particular inner.Message
s += innerException.Message + " ";
s.AppendLine(innerException.Message);
}

return new FindReflectedTypeException("XrmFakedContext.FindReflectedType: " + s);
return new FindReflectedTypeException("XrmFakedContext.FindReflectedType: " + s.ToString());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private string GenerateLog(IEnumerable<Type> types)
var log = new StringBuilder();
foreach (var type in types)
{
log.Append($"'{type.Assembly.GetName().Name}'; ");
log.AppendLine($"'{type.Assembly.GetName().Name}'; ");
}

return log.ToString();
Expand Down

0 comments on commit 8400862

Please sign in to comment.