19 references to XamlDirective
System.Xaml.Tests (19)
System\Xaml\XamlDirectiveTests.cs (19)
30var directive = new XamlDirective(xamlNamespaces, name, type, typeConverter, allowedLocation); 42Assert.Throws<ArgumentNullException>("xamlType", () => new XamlDirective(new string[] { "namespace"}, "name", null, null, AllowedMemberLocations.Any)); 49Assert.Throws<ArgumentNullException>("xamlNamespaces", () => new XamlDirective(null, "name", type, null, AllowedMemberLocations.Any)); 56Assert.Throws<ArgumentException>("xamlNamespaces", () => new XamlDirective(new string?[] { null }, "name", type, null, AllowedMemberLocations.Any)); 83var directive = new XamlDirective(new string[] { "namespace"}, "name", type, null, AllowedMemberLocations.Any); 91var directive = new XamlDirective(new string[] { "namespace"}, "name", type, null, AllowedMemberLocations.Any); 99var directive = new XamlDirective(new string[] { "xamlNamespace" }, "name", type1, null, AllowedMemberLocations.Any); 101yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace" }, "name", type1, null, AllowedMemberLocations.Any), true }; 102yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace" }, "name", type1, null, AllowedMemberLocations.None), true }; 103yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace" }, "name", type1, new XamlValueConverter<TypeConverter>(typeof(int), type1), AllowedMemberLocations.None), true }; 104yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace" }, "name", type2, null, AllowedMemberLocations.Any), true }; 105yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespaces" }, "name", type1, null, AllowedMemberLocations.Any), false }; 106yield return new object?[] { directive, new XamlDirective(Array.Empty<string>(), "name", type1, null, AllowedMemberLocations.Any), false }; 107yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace", "2" }, "name", type1, null, AllowedMemberLocations.Any), false }; 108yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace" }, "name2", type1, null, AllowedMemberLocations.Any), false }; 109yield return new object?[] { directive, new XamlDirective(new string[] { "xamlNamespace" }, null, type1, null, AllowedMemberLocations.Any), false }; 150yield return new object[] { new XamlDirective(Array.Empty<string>(), "name", type, null, AllowedMemberLocations.Any), "name" }; 151yield return new object[] { new XamlDirective(new string[] { "1", "2" }, "name", type, null, AllowedMemberLocations.Any), "{1}name" }; 287public SubXamlDirective(IEnumerable<string> xamlNamespaces, string name, XamlType xamlType, XamlValueConverter<TypeConverter> typeConverter, AllowedMemberLocations allowedLocation) : base(xamlNamespaces, name, xamlType, typeConverter, allowedLocation) { }