Fix code bug in markup extensions (#1097)

* Update service-contexts-with-type-converters-and-markup-extensions.md

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

Co-authored-by: David Pine <[email protected]>
This commit is contained in:
Andy (Steve) De George
2021-06-17 09:06:28 -07:00
committed by GitHub
co-authored by David Pine
parent e7f2ff0e96
commit d9b54ba15b
@@ -19,7 +19,7 @@ As an implementer of a value converter, you often need access to some type of co
```csharp
public override object ProvideValue(IServiceProvider serviceProvider)
{
...
//...
// Get the IXamlTypeResolver from the service provider
if (serviceProvider == null)
{
@@ -27,10 +27,10 @@ public override object ProvideValue(IServiceProvider serviceProvider)
}
IXamlTypeResolver xamlTypeResolver = serviceProvider.GetService(typeof(IXamlTypeResolver)) as IXamlTypeResolver;
if (xamlTypeResolver == null)
{
throw new ArgumentException("IXamlTypeResolver"));
{
throw new ArgumentException("IXamlTypeResolver");
}
...
//...
}
```