Ejemplo n.º 1
0
        public ModelMetadata(ModelMetadataProvider provider, Type containerType, Func <object> modelAccessor, Type modelType, string propertyName)
        {
            Check.Requires <ArgumentNullException>(provider != null);
            Check.Requires <ArgumentNullException>(modelType != null);

            Provider      = provider;
            ModelType     = modelType;
            ContainerType = containerType;
            PropertyName  = propertyName;

            _modelAccessor = modelAccessor;

            FullName = propertyName ?? modelType.Name;
        }
Ejemplo n.º 2
0
        public ModelMetadata(ModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName)
        {
            Check.Requires<ArgumentNullException>(provider != null);
            Check.Requires<ArgumentNullException>(modelType != null);

            Provider = provider;
            ModelType = modelType;
            ContainerType = containerType;
            PropertyName = propertyName;

            _modelAccessor = modelAccessor;

            FullName = propertyName ?? modelType.Name;
        }