Comments (5)
I'm getting the same behavior. I'm looking into it.
from enums.net.
@derigel23 Could you please provide an example so I can research this?
from enums.net.
Here it is.
using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using EnumsNET;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
foreach (var enumMember in Enums.GetMembers<Wayspot>(EnumMemberSelection.All | EnumMemberSelection.DisplayOrder))
{
var flags = enumMember.GetFlags();
Console.WriteLine($"{enumMember.Value} = {string.Join(", ", flags.Select(e => e.ToString()))}");
}
}
[Flags]
public enum Wayspot : byte
{
[Display(Name = "Pokéstop", GroupName = "static_assets/png/btn_pokestop.png", Order = -10)]
Pokestop = 1,
[Display(Name = "Gym", GroupName = "static_assets/png/gymLogo.png", Order = -50)]
Gym = 2,
[Display(Name = "EX-Raid Gym", GroupName = "static_assets/png/gymLogo.png", Order = -100)]
ExRaidGym = 4,
[Display(Name = "In Queue", GroupName = "static_assets/png/btn_help_nooutline.png")]
NominationReview = 8,
[Display(Name = "Rejected", GroupName = "static_assets/png/btn_close_normal_dark.png")]
NominationRejected = 16,
[Display(Name = "Accepted", GroupName = "static_assets/png/btn_ok_normal_dark.png")]
NominationAccepted = 32,
Other = 128,
[Display(Name = "Wayspots", Order = 1)]
Wayspots = Pokestop | Gym | ExRaidGym | Other,
[Display(Name = "Nominations", Order = 2)]
Nominations = NominationReview | NominationRejected | NominationAccepted
}
}
}
from enums.net.
As appeared, it doesn't depend on target framework - hangs anywhere,
I've just updated Enums.NET library simultaneously with bumping target framework - that mislead me.
from enums.net.
v3.0.3 fixes this issue. This issue only affected flag enums that use an unsigned backing type and where the value is near the underlying type's max value. The commit including this fix is 708e766.
from enums.net.
Related Issues (20)
- Add .NET Standard 2.0 Build HOT 1
- Add non-array EnumFormats Parse overloads HOT 1
- Is multi symbol possible? HOT 2
- netstandard2.0 is required in Enums.NET 2.3.0 HOT 3
- How to check next or previous HOT 3
- SelectList for DropDown Functionality HOT 6
- Values of enumerated types decorated with the FlagsAttribute can not be converted to string. HOT 3
- Is explicit use of EnumInfo<,,> possible? HOT 10
- Int to Enum Extension Method HOT 1
- Support for Parsing ReadOnlySpan<char> HOT 14
- What is the equivalence to getting an enum member by ordinal position when using EnumFormat? HOT 5
- v3.0 Changes
- Feature request... HOT 1
- IsObsolete extension method HOT 2
- [Feature] Custom EnumFormat with AllowMultiple HOT 3
- Type Parameters HOT 2
- HasAnyFlags fails while HasFlag is not HOT 4
- FlagEnums.GetFlags gets stuck on V4.0.0 (and 3.0.3) HOT 2
- System.Runtime.CompilerServices.Unsafe HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enums.net.