Beispiel #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;
        }
Beispiel #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;
        }