// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Mvc;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Xml
{
///
/// Creates an for the type .
///
public class SerializableErrorWrapperProviderFactory : IWrapperProviderFactory
{
///
/// Creates an instance of if the provided
/// declared type is .
///
///
/// An instance of if the provided
/// declared type is , else null.
public IWrapperProvider GetProvider([NotNull] WrapperProviderContext context)
{
if (context.DeclaredType == typeof(SerializableError))
{
return new SerializableErrorWrapperProvider();
}
return null;
}
}
}