63 instantiations of ValidationContext
Aspire.Hosting.Azure.Tests (4)
AzureProvisionerOptionsTests.cs (4)
29var context = new ValidationContext(options); 45var context = new ValidationContext(options); 57var context = new ValidationContext(options); 69var context = new ValidationContext(options);
Microsoft.AspNetCore.Components.Forms (3)
EditContextDataAnnotationsExtensions.cs (3)
140var validationContext = new ValidationContext(_editContext.Model, _serviceProvider, items: null); 154var validationContext = new ValidationContext(_editContext.Model, _serviceProvider, items: null); 249var validationContext = new ValidationContext(fieldIdentifier.Model, _serviceProvider, items: null)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (4)
25var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 84var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 123var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 192var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null);
Microsoft.AspNetCore.HeaderParsing (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
21var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsModelValidator.cs (1)
74var context = new ValidationContext(
ValidatableObjectAdapter.cs (1)
33var validationContext = new ValidationContext(
Microsoft.Extensions.AmbientMetadata.Application (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
21var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Compliance.Redaction (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Compliance.Testing (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (2)
26var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 75var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null);
Microsoft.Extensions.Diagnostics.Probes (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Http.Diagnostics (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Http.Resilience (13)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (13)
20var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 86var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 157var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 208var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 239var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 310var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 341var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 389var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 447var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 487var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 535var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 583var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 648var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
15var context = new ValidationContext(options);
Microsoft.Extensions.Options.DataAnnotations (2)
DataAnnotationValidateOptions.Async.cs (1)
100bool res = await Validator.TryValidateObjectAsync(options, new ValidationContext(options), results, validateAllProperties: true, cancellationToken).ConfigureAwait(false);
DataAnnotationValidateOptions.cs (1)
92bool res = Validator.TryValidateObject(options, new ValidationContext(options), results, validateAllProperties: true);
Microsoft.Extensions.Telemetry (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (3)
20var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 50var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 97var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Telemetry.Abstractions (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
21var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Shared.Tests (20)
Data.Validation\LengthAttributeTests.cs (13)
28var context = new ValidationContext(options); 84var context = new ValidationContext(options); 156var context = new ValidationContext(options); 213var context = new ValidationContext(options); 263var context = new ValidationContext(options); 341var context = new ValidationContext(options0); 346context = new ValidationContext(options1); 351context = new ValidationContext(options2); 356context = new ValidationContext(options3); 361context = new ValidationContext(options4); 370var context = new ValidationContext(value); 389var context = new ValidationContext(options); 409var context = new ValidationContext(options);
Data.Validation\TimeSpanAttributeTests.cs (7)
26var context = new ValidationContext(options); 91var context = new ValidationContext(options); 154var context = new ValidationContext(options); 228var context = new ValidationContext(options0); 233context = new ValidationContext(options1); 238context = new ValidationContext(options3); 247var context = new ValidationContext(value);
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\Validator.cs (1)
950var context = new ValidationContext(instance, validationContext, validationContext.Items);
218 references to ValidationContext
Aspire.Dashboard (1)
Model\Otlp\FilterDialogFormModel.cs (1)
46public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Aspire.Hosting.Azure.Tests (4)
AzureProvisionerOptionsTests.cs (4)
29var context = new ValidationContext(options); 45var context = new ValidationContext(options); 57var context = new ValidationContext(options); 69var context = new ValidationContext(options);
BasketService (1)
Models\BasketItem.cs (1)
13public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Microsoft.AspNetCore.Components.Forms (4)
EditContextDataAnnotationsExtensions.cs (4)
27/// <param name="serviceProvider">The <see cref="IServiceProvider"/> to be used in the <see cref="ValidationContext"/>.</param> 140var validationContext = new ValidationContext(_editContext.Model, _serviceProvider, items: null); 154var validationContext = new ValidationContext(_editContext.Model, _serviceProvider, items: null); 249var validationContext = new ValidationContext(fieldIdentifier.Model, _serviceProvider, items: null)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (4)
25var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 84var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 123var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 192var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null);
Microsoft.AspNetCore.HeaderParsing (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
21var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsModelValidator.cs (1)
74var context = new ValidationContext(
ValidatableObjectAdapter.cs (1)
33var validationContext = new ValidationContext(
Microsoft.Extensions.AmbientMetadata.Application (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
21var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Compliance.Redaction (6)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Microsoft.Extensions.Compliance.Testing (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (7)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (2)
26var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null); 75var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options, displayName, null, null);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Microsoft.Extensions.Diagnostics.Probes (6)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Microsoft.Extensions.Http.Diagnostics (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
19var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Http.Resilience (18)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (13)
20var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 86var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 157var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 208var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 239var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 310var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 341var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 389var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 447var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 487var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 535var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 583var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 648var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Microsoft.Extensions.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
15var context = new ValidationContext(options);
Microsoft.Extensions.Telemetry (8)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (3)
20var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 50var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); 97var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Microsoft.Extensions.Telemetry.Abstractions (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (1)
21var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);
Microsoft.Extensions.Validation (1)
ValidateContext.cs (1)
23/// Gets or sets the service provider. This will also be made available on the <see cref="System.ComponentModel.DataAnnotations.ValidationContext"/> instances.
MyFrontend (1)
playground\TestShop\BasketService\Models\BasketItem.cs (1)
13public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
OrderProcessor (1)
playground\TestShop\BasketService\Models\BasketItem.cs (1)
13public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Shared (5)
Data.Validation\LengthAttribute.cs (2)
94protected override ValidationResult IsValid(object? value, ValidationContext? validationContext) 152private ValidationResult Validate(int count, ValidationContext? validationContext)
Data.Validation\TimeSpanAttribute.cs (1)
114protected override ValidationResult IsValid(object? value, ValidationContext? validationContext)
Data.Validation\ValidationContextExtensions.cs (2)
16public static string[]? GetMemberName(this ValidationContext? validationContext) 25public static string GetDisplayName(this ValidationContext? validationContext)
Shared.Tests (14)
Data.Validation\LengthAttributeTests.cs (9)
28var context = new ValidationContext(options); 84var context = new ValidationContext(options); 156var context = new ValidationContext(options); 213var context = new ValidationContext(options); 263var context = new ValidationContext(options); 341var context = new ValidationContext(options0); 370var context = new ValidationContext(value); 389var context = new ValidationContext(options); 409var context = new ValidationContext(options);
Data.Validation\TimeSpanAttributeTests.cs (5)
26var context = new ValidationContext(options); 91var context = new ValidationContext(options); 154var context = new ValidationContext(options); 228var context = new ValidationContext(options0); 247var context = new ValidationContext(value);
System.ComponentModel.Annotations (122)
System\ComponentModel\DataAnnotations\AsyncValidationAttribute.cs (10)
42/// Override of the base class <see cref="ValidationAttribute.IsValid(object?, ValidationContext)" /> method. 48/// A <see cref="ValidationContext" /> instance that provides context about the validation operation, 56protected abstract override ValidationResult? IsValid(object? value, ValidationContext validationContext); 63/// A <see cref="ValidationContext" /> instance that provides context about the validation operation, 81ValidationContext validationContext, 86/// <see cref="ValidationContext" /> overload so that <see cref="AsyncValidationAttribute" /> implementations 88/// <see cref="ValidationAttribute.IsValid(object?, ValidationContext)" />. 103/// A <see cref="ValidationContext" /> instance that provides context about the validation operation, 115/// The underlying <see cref="IsValidAsync(object, ValidationContext, CancellationToken)" /> implementation 130ValidationContext validationContext,
System\ComponentModel\DataAnnotations\CompareAttribute.cs (1)
44protected override ValidationResult? IsValid(object? value, ValidationContext validationContext)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (9)
17/// public static <see cref="ValidationResult" /> Method(object value, <see cref="ValidationContext" /> context) { 26/// Like any other <see cref="ValidationAttribute" />, its <see cref="IsValid(object, ValidationContext)" /> 38/// The <see cref="Method" /> may also declare an additional parameter of type <see cref="ValidationContext" />. 39/// The <see cref="ValidationContext" /> parameter provides additional context the method may use to determine 79/// <see cref="IsValid(object, ValidationContext)" />> to return a <see cref="ValidationResult" /> 128/// Override of validation method. See <see cref="ValidationAttribute.IsValid(object, ValidationContext)" />. 132/// A <see cref="ValidationContext" /> instance that provides 137protected override ValidationResult? IsValid(object? value, ValidationContext validationContext) 272if ((parameterInfos.Length != 2) || (parameterInfos[1].ParameterType != typeof(ValidationContext)))
System\ComponentModel\DataAnnotations\IAsyncValidatableObject.cs (3)
15/// <see cref="Validator.TryValidateObjectAsync(object, ValidationContext, System.Collections.Generic.ICollection{ValidationResult}?, System.Threading.CancellationToken)"/>) 33/// A <see cref="ValidationContext" /> instance that provides context about the validation operation, 48ValidationContext validationContext,
System\ComponentModel\DataAnnotations\IValidatableObject.cs (1)
10IEnumerable<ValidationResult> Validate(ValidationContext validationContext);
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (19)
13/// <para>Override <see cref="IsValid(object, ValidationContext)" /> to implement validation logic.</para> 136/// <see cref="ValidationContext" /> to perform validation. 140/// This property is a hint for callers deciding whether a <see cref="ValidationContext" /> 142/// <see cref="AsyncValidationAttribute.GetValidationResultAsync(object?, ValidationContext, System.Threading.CancellationToken)" /> 143/// always requires a non-null <see cref="ValidationContext" /> parameter, 305private protected ValidationResult CreateFailedValidationResult(ValidationContext validationContext) 316ValidationContext validationContext) 380/// Instead, implement <see cref="IsValid(object, ValidationContext)" />. 417/// A <see cref="ValidationContext" /> instance that provides 428/// is thrown when <see cref="IsValid(object, ValidationContext)" /> 431protected virtual ValidationResult? IsValid(object? value, ValidationContext validationContext) 457/// A <see cref="ValidationContext" /> instance that provides 469/// is thrown when <see cref="IsValid(object, ValidationContext)" /> 472public ValidationResult? GetValidationResult(object? value, ValidationContext validationContext) 484/// The overloaded <see cref="Validate(object, ValidationContext)" /> is the recommended entry point as it 512/// This method invokes the <see cref="IsValid(object, ValidationContext)" /> method 521/// is thrown if <see cref="IsValid(object, ValidationContext)" /> 526/// is thrown when <see cref="IsValid(object, ValidationContext)" /> 529public void Validate(object? value, ValidationContext validationContext)
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (11)
36internal IEnumerable<ValidationAttribute> GetTypeValidationAttributes(ValidationContext validationContext) 49internal DisplayAttribute? GetTypeDisplayAttribute(ValidationContext validationContext) 62internal IEnumerable<ValidationAttribute> GetPropertyValidationAttributes(ValidationContext validationContext) 76internal DisplayAttribute? GetPropertyDisplayAttribute(ValidationContext validationContext) 90internal Type GetPropertyType(ValidationContext validationContext) 99/// Determines whether or not a given <see cref="ValidationContext" />'s 100/// <see cref="ValidationContext.MemberName" /> references a property on 101/// the <see cref="ValidationContext.ObjectType" />. 103/// <param name="validationContext">The <see cref="ValidationContext" /> to check.</param> 106internal bool IsPropertyContext(ValidationContext validationContext) 137private static void EnsureValidationContext(ValidationContext validationContext)
System\ComponentModel\DataAnnotations\ValidationContext.cs (6)
22/// will be available to validation methods that use this <see cref="ValidationContext" /> 43/// Construct a <see cref="ValidationContext" /> for a given object instance being validated. 54/// Construct a <see cref="ValidationContext" /> for a given object instance and an optional 71/// Construct a <see cref="ValidationContext" /> for a given object instance, an optional 102/// Construct a <see cref="ValidationContext" /> for a given object instance with 257/// Initializes the <see cref="ValidationContext" /> with a service provider that can return
System\ComponentModel\DataAnnotations\Validator.cs (62)
47/// When the <see cref="ValidationContext.MemberName" /> of <paramref name="validationContext" /> is not a valid 51public static bool TryValidateProperty(object? value, ValidationContext validationContext, 94/// <see cref="ValidationContext.ObjectInstance" />on <paramref name="validationContext" />. 96[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 98object instance, ValidationContext validationContext, ICollection<ValidationResult>? validationResults) => 132/// <see cref="ValidationContext.ObjectInstance" />on <paramref name="validationContext" />. 134[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 135public static bool TryValidateObject(object instance, ValidationContext validationContext, 187public static bool TryValidateValue(object? value, ValidationContext validationContext, 218public static void ValidateProperty(object? value, ValidationContext validationContext) 248/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 251[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 252public static void ValidateObject(object instance, ValidationContext validationContext) 274/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 277[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 278public static void ValidateObject(object instance, ValidationContext validationContext, 313public static void ValidateValue(object? value, ValidationContext validationContext, 351/// When the <see cref="ValidationContext.MemberName" /> of <paramref name="validationContext" /> is not a valid property. 356ValidationContext validationContext, 386/// <see cref="TryValidateObjectAsync(object, ValidationContext, ICollection{ValidationResult}?, bool, CancellationToken)" /> 397/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 399[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 402ValidationContext validationContext, 443/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 445[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 448ValidationContext validationContext, 493ValidationContext validationContext, 525ValidationContext validationContext, 554/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 557[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 560ValidationContext validationContext, 582/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 585[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 588ValidationContext validationContext, 620ValidationContext validationContext, 638[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 641ValidationContext validationContext, 708[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 711ValidationContext validationContext, 811ValidationContext validationContext, 926ValidationContext validationContext, 934/// Creates a new <see cref="ValidationContext" /> to use to validate the type or a member of 940/// and <see cref="ValidationContext.Items" />. 942/// <returns>A new <see cref="ValidationContext" /> for the <paramref name="instance" /> provided.</returns> 944[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 945private static ValidationContext CreateValidationContext(object instance, ValidationContext validationContext) 950var context = new ValidationContext(instance, validationContext, validationContext.Items); 1009/// <see cref="ValidationContext.ObjectInstance" /> on <paramref name="validationContext" />. 1011[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 1013ValidationContext validationContext, bool validateAllProperties, bool breakOnFirstError) 1069[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 1071ValidationContext validationContext, bool validateAllProperties, bool breakOnFirstError) 1124[RequiresUnreferencedCode(ValidationContext.InstanceTypeNotStaticallyDiscovered)] 1125private static List<KeyValuePair<ValidationContext, object?>> GetPropertyValues(object instance, 1126ValidationContext validationContext) 1129var items = new List<KeyValuePair<ValidationContext, object?>>(properties.Count); 1132var context = CreateValidationContext(instance, validationContext); 1137items.Add(new KeyValuePair<ValidationContext, object?>(context, property.GetValue(instance))); 1162ValidationContext validationContext, IEnumerable<ValidationAttribute> attributes, bool breakOnFirstError) 1207/// <see cref="ValidationContext" />. 1218private static bool TryValidate(object? value, ValidationContext validationContext, ValidationAttribute attribute,
System.ComponentModel.DataAnnotations (1)
System.ComponentModel.DataAnnotations.cs (1)
43[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DataAnnotations.ValidationContext))]