TinyIoCContainer.Current.Register(typeof(IFoo), typeof(Foo));
// Does not make a difference if using AsSingleton() or AsMultiInstance().
3. Run application.
Expected behaviour:
Should just work.
Actual Behaviour:
You receive a System.TypeInitializationException during application startup.
Observations:
1. Removing the copy constructor results in the exception not being thrown.
Environment:
Xamarin.Forms 4.8.0.1821
NETStandard.Library 2.0.3
Steps to reproduce:
public class Foo : IFoo { public Foo() { }
public Foo(Foo copy) { } }
TinyIoCContainer.Current.Register(typeof(IFoo), typeof(Foo)); // Does not make a difference if using AsSingleton() or AsMultiInstance().