{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/AspNetCore/issues/3594","repository_url":"https://api.github.com/repos/aspnet/AspNetCore","labels_url":"https://api.github.com/repos/aspnet/AspNetCore/issues/3594/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/AspNetCore/issues/3594/comments","events_url":"https://api.github.com/repos/aspnet/AspNetCore/issues/3594/events","html_url":"https://github.com/aspnet/AspNetCore/issues/3594","id":367622869,"node_id":"MDU6SXNzdWUzNjc2MjI4Njk=","number":3594,"title":"Microsoft.Extensions.Options ValidateOptionsResult when success","user":{"login":"SinxHe","id":9050899,"node_id":"MDQ6VXNlcjkwNTA4OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/9050899?v=4","gravatar_id":"","url":"https://api.github.com/users/SinxHe","html_url":"https://github.com/SinxHe","followers_url":"https://api.github.com/users/SinxHe/followers","following_url":"https://api.github.com/users/SinxHe/following{/other_user}","gists_url":"https://api.github.com/users/SinxHe/gists{/gist_id}","starred_url":"https://api.github.com/users/SinxHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinxHe/subscriptions","organizations_url":"https://api.github.com/users/SinxHe/orgs","repos_url":"https://api.github.com/users/SinxHe/repos","events_url":"https://api.github.com/users/SinxHe/events{/privacy}","received_events_url":"https://api.github.com/users/SinxHe/received_events","type":"User","site_admin":false},"labels":[{"id":85297670,"node_id":"MDU6TGFiZWw4NTI5NzY3MA==","url":"https://api.github.com/repos/aspnet/AspNetCore/labels/bug","name":"bug","color":"d93f0b","default":true},{"id":792347652,"node_id":"MDU6TGFiZWw3OTIzNDc2NTI=","url":"https://api.github.com/repos/aspnet/AspNetCore/labels/repo:Options","name":"repo:Options","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"HaoK","id":6537861,"node_id":"MDQ6VXNlcjY1Mzc4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6537861?v=4","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"assignees":[{"login":"HaoK","id":6537861,"node_id":"MDQ6VXNlcjY1Mzc4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6537861?v=4","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/aspnet/AspNetCore/milestones/19","html_url":"https://github.com/aspnet/AspNetCore/milestone/19","labels_url":"https://api.github.com/repos/aspnet/AspNetCore/milestones/19/labels","id":3463158,"node_id":"MDk6TWlsZXN0b25lMzQ2MzE1OA==","number":19,"title":"2.2.0","description":null,"creator":{"login":"anurse","id":7574,"node_id":"MDQ6VXNlcjc1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":21,"state":"open","created_at":"2018-06-29T17:43:32Z","updated_at":"2018-10-25T04:28:59Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2018-10-08T02:43:09Z","updated_at":"2018-10-25T15:52:42Z","closed_at":null,"author_association":"NONE","body":"I've found a feature in `Microsoft.Extensions.Options.DataAnnotations` when i want to develop a similarity.\r\n\r\nWhen I view the source code. I notice this below in the `ValidateOptionsResult`:\r\n\r\n```csharp\r\n/// <summary>\r\n/// Validation was successful.\r\n/// </summary>\r\npublic static readonly ValidateOptionsResult Success = new ValidateOptionsResult() \r\n{ \r\n    Skipped = true \r\n};\r\n```\r\n\r\nI am confused why successful result set `Skipped` property true rather than `Succeeded`. Is it a design or some other reasons?\r\n\r\nOn the other hand, in the source code of `DataAnnotationValidateOptions`, the annotation of code shows it will validate all options and it is a useful feature, but the code of `if (Name == null || name == Name)` appears will not validate all options when the options have not null name and i develivery null to `Validate` method:\r\n\r\n```csharp\r\n/// <summary>\r\n/// Validates a specific named options instance (or all when name is null).\r\n/// </summary>\r\n/// <param name=\"name\">The name of the options instance being validated.</param>\r\n/// <param name=\"options\">The options instance.</param>\r\n/// <returns>The <see cref=\"ValidateOptionsResult\"/> result.</returns>\r\npublic ValidateOptionsResult Validate(string name, TOptions options)\r\n{\r\n    // Null name is used to configure all named options.\r\n    if (Name == null || name == Name)\r\n    {\r\n        var validationResults = new List<ValidationResult>();\r\n        if (Validator.TryValidateObject(options,\r\n            new ValidationContext(options, serviceProvider: null, items: null), \r\n            validationResults, \r\n            validateAllProperties: true))\r\n    ...\r\n    // Ignored if not validating this instance.\r\n    return ValidateOptionsResult.Skip;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/AspNetCore/issues/comments/433105854","html_url":"https://github.com/aspnet/AspNetCore/issues/3594#issuecomment-433105854","issue_url":"https://api.github.com/repos/aspnet/AspNetCore/issues/3594","id":433105854,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzEwNTg1NA==","user":{"login":"ajcvickers","id":1430078,"node_id":"MDQ6VXNlcjE0MzAwNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1430078?v=4","gravatar_id":"","url":"https://api.github.com/users/ajcvickers","html_url":"https://github.com/ajcvickers","followers_url":"https://api.github.com/users/ajcvickers/followers","following_url":"https://api.github.com/users/ajcvickers/following{/other_user}","gists_url":"https://api.github.com/users/ajcvickers/gists{/gist_id}","starred_url":"https://api.github.com/users/ajcvickers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajcvickers/subscriptions","organizations_url":"https://api.github.com/users/ajcvickers/orgs","repos_url":"https://api.github.com/users/ajcvickers/repos","events_url":"https://api.github.com/users/ajcvickers/events{/privacy}","received_events_url":"https://api.github.com/users/ajcvickers/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T15:52:42Z","updated_at":"2018-10-25T15:52:42Z","author_association":"MEMBER","body":"@HaoK Thanks. Presumably the fix is low risk for 2.2?"}}
{"actor":{"display_login":"ajcvickers"}}