private void RecreateMetadata(ModelMetadataIdentity key, DefaultMetadataDetails details)
        {
            var validationContext = new ValidationMetadataProviderContext(key, details.ModelAttributes);
            var displayContext    = new DisplayMetadataProviderContext(key, details.ModelAttributes);
            var bindingContext    = new BindingMetadataProviderContext(key, details.ModelAttributes);

            DetailsProvider.CreateValidationMetadata(validationContext);
            DetailsProvider.CreateDisplayMetadata(displayContext);
            DetailsProvider.CreateBindingMetadata(bindingContext);
            details.ValidationMetadata = validationContext.ValidationMetadata;
            details.DisplayMetadata    = displayContext.DisplayMetadata;
            details.BindingMetadata    = bindingContext.BindingMetadata;
        }
Esempio n. 2
0
 protected virtual async Task <ProxyTypeDetails> GetProxyDetails(Proxy proxy, TaskItem task, CancellationTokenSource cancellationToken)
 {
     return(await DetailsProvider.GetProxyDetails(proxy, task, cancellationToken));
 }
Esempio n. 3
0
 protected override async Task <ProxyTypeDetails> GetProxyDetails(Proxy proxy, TaskItem task, CancellationTokenSource cancellationToken)
 {
     return(await Task.FromResult(DetailsProvider.GetUncheckedProxyDetails()));
 }