Exemplo n.º 1
0
        public ModelMetadata(ModelMetadataProvider provider, Type containerType, Func <object> modelAccessor, Type modelType, string propertyName)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            if (modelType == null)
            {
                throw new ArgumentNullException("modelType");
            }

            Provider = provider;

            _containerType = containerType;
            _isRequired    = !TypeHelpers.TypeAllowsNullValue(modelType);
            _modelAccessor = modelAccessor;
            _modelType     = modelType;
            _propertyName  = propertyName;
        }
Exemplo n.º 2
0
 internal ModelMetadataProviders()
 {
     currentProvider = new PocoMetadataProvider();
 }