ASP.NET MVC 3 IMetadataAware and custom ModelMetadata attributes
UPDATE: I've added a simple example project up on bitbucket to demonstrate the ColorPicker attribute
ASP.NET MVC 3 introduces a new interface, IMetadataAware, for providing additional values to the model metadata at creation time:
/* ****************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This software is subject to the Microsoft Public License (Ms-PL).
* A copy of the license can be found in the license.htm file included
* in this distribution.
*
* You must not remove this notice, or any other, from this software.
*
* ***************************************************************************/
namespace System.Web.Mvc {
// This interface is implemented by attributes which wish to contribute to the
// ModelMetadata creation process without needing to write a custom metadata
// provider. It is consumed by AssociatedMetadataProvider, so this behavior is
// automatically inherited by all classes which derive from it (notably, the
// DataAnnotationsModelMetadataProvider).
public interface IMetadataAware {
void OnMetadataCreated(ModelMetadata metadata);
}
}
c# (16)
asp.net mvc (8)
javascript (6)
jquery (5)
search (4)
elasticsearch (4)
nest (3)
openai (2)
async (2)
asynchrony (2)
await (2)
f# (2)
dependency injection (2)
castle windsor (2)
model binding (2)
validation (2)
llm (1)
csharp (1)
ocr (1)
translation (1)
vector search (1)
qdrant (1)
x509 (1)
certificate (1)
ssl (1)
tls (1)
bouncy castle (1)
statiq (1)
github (1)
query (1)
array (1)
internalsvisibleto (1)
dotnet (1)
msbuild (1)
friend assemblies (1)
monitoring (1)
windows (1)
process (1)
procmon (1)
vagrant (1)
winrm (1)
powershell (1)
task parallel library (1)
tpl (1)
gnaf (1)
addresses (1)
australia (1)
sql server (1)
akka (1)
akka.net (1)
reactive (1)
actor model (1)
agents (1)
versioning (1)
optimistic concurrency (1)
geospatial (1)
geojson (1)
geometry (1)
resharper (1)
semanticmerge (1)
git (1)
refactoring (1)
clean code (1)
windows services (1)
topshelf (1)
masstransit (1)
email (1)
acceptance tests (1)
specflow (1)
smtp4dev (1)
bdd (1)
wsfederationauthenticationmodule (1)
classic asp (1)
windows identity foundation (1)
wif (1)
nuget (1)
asp.net web api (1)
parameter binding (1)
csv (1)
valueprovider (1)
signal r (1)
ndc 2012 (1)
conferences (1)
events (1)
razor (1)
continuation passing style (1)
captcha (1)
routing (1)
modelmetadata (1)
podcasts (1)