// 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 Microsoft.AspNet.Mvc.ModelBinding;
namespace ModelBindingWebSite
{
///
/// Extensions for .
///
public static class ModelMetadataExtensions
{
///
/// Gets the group name associated with given .
///
/// The
/// Group name associated with given .
public static string GetGroupName(this ModelMetadata modelMetadata)
{
object groupName;
modelMetadata.AdditionalValues.TryGetValue(AdditionalValuesMetadataProvider.GroupNameKey, out groupName);
return groupName as string;
}
}
}