-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Generated Enum specific Resolve() methods for known enums #2400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
👍 |
russcam
added a commit
that referenced
this issue
Nov 28, 2016
Specific enum GetStringValue extension methods for known enums Caching of generic method of resolving string values for enums based on enum type. Renamed KnownEnums.Resolve to GetStringValue and made an extension method. Added GetStringValue extension method for HttpMethod - this is a hot path, called on every request. Fixed casing issue in HttpConnection for setting ContentLength Closes #2400
Mpdreamz
pushed a commit
that referenced
this issue
Nov 29, 2016
Specific enum GetStringValue extension methods for known enums Caching of generic method of resolving string values for enums based on enum type. Renamed KnownEnums.Resolve to GetStringValue and made an extension method. Added GetStringValue extension method for HttpMethod - this is a hot path, called on every request. Fixed casing issue in HttpConnection for setting ContentLength Closes #2400
Mpdreamz
pushed a commit
that referenced
this issue
Nov 29, 2016
Specific enum GetStringValue extension methods for known enums Caching of generic method of resolving string values for enums based on enum type. Renamed KnownEnums.Resolve to GetStringValue and made an extension method. Added GetStringValue extension method for HttpMethod - this is a hot path, called on every request. Fixed casing issue in HttpConnection for setting ContentLength Closes #2400 Conflicts: src/CodeGeneration/ApiGenerator/Views/Enums.Generated.cshtml src/Elasticsearch.Net/Domain/Enums.Generated.cs src/Elasticsearch.Net/Extensions/Extensions.cs src/Nest/Mapping/AttributeBased/ElasticsearchCorePropertyAttributeBase.cs src/Nest/Mapping/Types/Core/Number/NumberAttribute.cs
awelburn
pushed a commit
to Artesian/elasticsearch-net
that referenced
this issue
Nov 6, 2017
Specific enum GetStringValue extension methods for known enums Caching of generic method of resolving string values for enums based on enum type. Renamed KnownEnums.Resolve to GetStringValue and made an extension method. Added GetStringValue extension method for HttpMethod - this is a hot path, called on every request. Fixed casing issue in HttpConnection for setting ContentLength Closes elastic#2400 Conflicts: src/Elasticsearch.Net/Domain/Enums.Generated.cs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
KnownEnums.Resolve(Enum e)
can be used to get a string value for an enum value. We should generate enum specificResolve()
extension methods to avoid the type check and casting.The text was updated successfully, but these errors were encountered: