private static ModelValidationNode GetValidationNode()
 {
     EmptyModelMetadataProvider provider = new EmptyModelMetadataProvider();
     ModelMetadata metadata = provider.GetMetadataForType(null, typeof(object));
     return new ModelValidationNode(metadata, "someKey");
 }
            public ControllerData(Type type)
            {
                var metadataProvider = new EmptyModelMetadataProvider();

                this.Properties =
                   (from p in type.GetProperties()
                let attr = p.GetCustomAttributes(typeof(FromRouteAttribute), inherit: true)
                  .Cast<FromRouteAttribute>()
                  .SingleOrDefault()
                where attr != null
                select new PropertyData(
                   property: p,
                   attribute: attr,
                   metadata: metadataProvider.GetMetadataForType(null, p.PropertyType)
                )).ToArray();
            }