Skip to content

Instantly share code, notes, and snippets.

@maxisoft
Last active November 22, 2020 14:52
Show Gist options
  • Save maxisoft/803b0818ff2213264d5a6ddb63769caf to your computer and use it in GitHub Desktop.
Save maxisoft/803b0818ff2213264d5a6ddb63769caf to your computer and use it in GitHub Desktop.
LamarCrashOnNoNamespace
using System;
using Lamar;
using LamarCrashOnNoNamespace;
namespace LamarCrashOnNoNamespace
{
class Program
{
static void Main(string[] args)
{
using var container = new Container(r =>
{
r.Scan(scanner =>
{
scanner.TheCallingAssembly();
scanner.AddAllTypesOf<IService>();
scanner.IncludeNamespaceContainingType<IService>();
});
});
Console.WriteLine(container.WhatDidIScan());
Console.WriteLine(container.WhatDoIHave());
container.AssertConfigurationIsValid();
}
}
internal interface IService
{
}
public class Service : IService
{
}
}
/// <summary>
/// namespace removed
/// </summary>
//namespace LamarCrashOnNoNamespace
//{
public class NoNamespaceClass
{
}
//}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment