public void should_return_null_when_generic_argument_type_is_not_in_assemblies() { ClassUnderTest = new GenericParser(new[] { typeof(Bar).Assembly }); const string typeName = "FubuMVC.Razor.Tests.RazorModel.Binding.Generic<FubuMVC.Razor.Tests.RazorModel.Binding.Baz, System.String>"; var type = ClassUnderTest.Parse(typeName); type.ShouldBeNull(); }
public void should_return_null_when_type_is_not_in_assemblies() { ClassUnderTest = new GenericParser(new[] { typeof(String).Assembly }); const string typeName = "FubuMVC.Spark.Tests.SparkModel.Binding.Generic<FubuMVC.Spark.Tests.SparkModel.Binding.Baz>"; var type = ClassUnderTest.Parse(typeName); type.ShouldBeNull(); }
public Type FindTypeByName(string typeFullName, Action<string> log) { if (GenericParser.IsGeneric(typeFullName)) { var genericParser = new GenericParser(_graph.AllAssemblies()); return genericParser.Parse(typeFullName); } return findClosedTypeByFullName(typeFullName, log); }
public Type FindTypeByName(string typeFullName, Assembly defaultAssembly, Action<string> log) { if (GenericParser.IsGeneric(typeFullName)) { var genericParser = new GenericParser(_types.Assemblies); return genericParser.Parse(typeFullName); } return findClosedTypeByFullName(typeFullName, defaultAssembly, log); }