{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/1","id":51184652,"html_url":"https://github.com/arogozine/EnumUtilities/pull/1","diff_url":"https://github.com/arogozine/EnumUtilities/pull/1.diff","patch_url":"https://github.com/arogozine/EnumUtilities/pull/1.patch","issue_url":"https://api.github.com/repos/arogozine/EnumUtilities/issues/1","number":1,"state":"closed","locked":false,"title":"Add SetFlag() function to set flags on/off via boolean.","user":{"login":"binki","id":82626,"avatar_url":"https://avatars.githubusercontent.com/u/82626?v=3","gravatar_id":"","url":"https://api.github.com/users/binki","html_url":"https://github.com/binki","followers_url":"https://api.github.com/users/binki/followers","following_url":"https://api.github.com/users/binki/following{/other_user}","gists_url":"https://api.github.com/users/binki/gists{/gist_id}","starred_url":"https://api.github.com/users/binki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binki/subscriptions","organizations_url":"https://api.github.com/users/binki/orgs","repos_url":"https://api.github.com/users/binki/repos","events_url":"https://api.github.com/users/binki/events{/privacy}","received_events_url":"https://api.github.com/users/binki/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI was looking at making some code I was touching more readable/less error prone by taking a flags-enabled enum value, a particular flag, and a boolean to either set the bits for that flag on or off as a logical operation. I’m not sure if your library is attempting to solve that sort of problem, but I did find that building such a method on top of your idiom of dynamically compiling away `GetUnderlyingType()` calls provided a good starting point.\r\n\r\nThis adds a `BitwiseNot()` (for when turning the flag off / setting `on: false`) and `T SetFlag(T value, T flag, bool on = true)` the current way I envision this working.\r\n\r\nIf you consider incorporating this change, may you also consider publishing an assembly-oriented nuget package for this library? I’d like to use it and `SetFlag()` while letting nuget deal with the sort of thing it’s meant to deal with—referencing external libraries with reusable code that shouldn’t have to be recreated in every project.","created_at":"2015-11-19T06:19:39Z","updated_at":"2015-12-02T20:14:28Z","closed_at":"2015-12-02T20:14:28Z","merged_at":"2015-12-02T20:14:28Z","merge_commit_sha":"ef9b97ee70667bf5de05500d13225f00cac710fd","assignee":{"login":"arogozine","id":7774690,"avatar_url":"https://avatars.githubusercontent.com/u/7774690?v=3","gravatar_id":"","url":"https://api.github.com/users/arogozine","html_url":"https://github.com/arogozine","followers_url":"https://api.github.com/users/arogozine/followers","following_url":"https://api.github.com/users/arogozine/following{/other_user}","gists_url":"https://api.github.com/users/arogozine/gists{/gist_id}","starred_url":"https://api.github.com/users/arogozine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arogozine/subscriptions","organizations_url":"https://api.github.com/users/arogozine/orgs","repos_url":"https://api.github.com/users/arogozine/repos","events_url":"https://api.github.com/users/arogozine/events{/privacy}","received_events_url":"https://api.github.com/users/arogozine/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/1/commits","review_comments_url":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/1/comments","review_comment_url":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arogozine/EnumUtilities/issues/1/comments","statuses_url":"https://api.github.com/repos/arogozine/EnumUtilities/statuses/893957a965fb036a6869f016ecad6ff5ce7d63db","head":{"label":"binki:InDev","ref":"InDev","sha":"893957a965fb036a6869f016ecad6ff5ce7d63db","user":{"login":"binki","id":82626,"avatar_url":"https://avatars.githubusercontent.com/u/82626?v=3","gravatar_id":"","url":"https://api.github.com/users/binki","html_url":"https://github.com/binki","followers_url":"https://api.github.com/users/binki/followers","following_url":"https://api.github.com/users/binki/following{/other_user}","gists_url":"https://api.github.com/users/binki/gists{/gist_id}","starred_url":"https://api.github.com/users/binki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binki/subscriptions","organizations_url":"https://api.github.com/users/binki/orgs","repos_url":"https://api.github.com/users/binki/repos","events_url":"https://api.github.com/users/binki/events{/privacy}","received_events_url":"https://api.github.com/users/binki/received_events","type":"User","site_admin":false},"repo":{"id":46469907,"name":"EnumUtilities","full_name":"binki/EnumUtilities","owner":{"login":"binki","id":82626,"avatar_url":"https://avatars.githubusercontent.com/u/82626?v=3","gravatar_id":"","url":"https://api.github.com/users/binki","html_url":"https://github.com/binki","followers_url":"https://api.github.com/users/binki/followers","following_url":"https://api.github.com/users/binki/following{/other_user}","gists_url":"https://api.github.com/users/binki/gists{/gist_id}","starred_url":"https://api.github.com/users/binki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binki/subscriptions","organizations_url":"https://api.github.com/users/binki/orgs","repos_url":"https://api.github.com/users/binki/repos","events_url":"https://api.github.com/users/binki/events{/privacy}","received_events_url":"https://api.github.com/users/binki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/binki/EnumUtilities","description":"Generic C# Enum Utilities","fork":true,"url":"https://api.github.com/repos/binki/EnumUtilities","forks_url":"https://api.github.com/repos/binki/EnumUtilities/forks","keys_url":"https://api.github.com/repos/binki/EnumUtilities/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binki/EnumUtilities/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binki/EnumUtilities/teams","hooks_url":"https://api.github.com/repos/binki/EnumUtilities/hooks","issue_events_url":"https://api.github.com/repos/binki/EnumUtilities/issues/events{/number}","events_url":"https://api.github.com/repos/binki/EnumUtilities/events","assignees_url":"https://api.github.com/repos/binki/EnumUtilities/assignees{/user}","branches_url":"https://api.github.com/repos/binki/EnumUtilities/branches{/branch}","tags_url":"https://api.github.com/repos/binki/EnumUtilities/tags","blobs_url":"https://api.github.com/repos/binki/EnumUtilities/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binki/EnumUtilities/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binki/EnumUtilities/git/refs{/sha}","trees_url":"https://api.github.com/repos/binki/EnumUtilities/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binki/EnumUtilities/statuses/{sha}","languages_url":"https://api.github.com/repos/binki/EnumUtilities/languages","stargazers_url":"https://api.github.com/repos/binki/EnumUtilities/stargazers","contributors_url":"https://api.github.com/repos/binki/EnumUtilities/contributors","subscribers_url":"https://api.github.com/repos/binki/EnumUtilities/subscribers","subscription_url":"https://api.github.com/repos/binki/EnumUtilities/subscription","commits_url":"https://api.github.com/repos/binki/EnumUtilities/commits{/sha}","git_commits_url":"https://api.github.com/repos/binki/EnumUtilities/git/commits{/sha}","comments_url":"https://api.github.com/repos/binki/EnumUtilities/comments{/number}","issue_comment_url":"https://api.github.com/repos/binki/EnumUtilities/issues/comments{/number}","contents_url":"https://api.github.com/repos/binki/EnumUtilities/contents/{+path}","compare_url":"https://api.github.com/repos/binki/EnumUtilities/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binki/EnumUtilities/merges","archive_url":"https://api.github.com/repos/binki/EnumUtilities/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binki/EnumUtilities/downloads","issues_url":"https://api.github.com/repos/binki/EnumUtilities/issues{/number}","pulls_url":"https://api.github.com/repos/binki/EnumUtilities/pulls{/number}","milestones_url":"https://api.github.com/repos/binki/EnumUtilities/milestones{/number}","notifications_url":"https://api.github.com/repos/binki/EnumUtilities/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binki/EnumUtilities/labels{/name}","releases_url":"https://api.github.com/repos/binki/EnumUtilities/releases{/id}","created_at":"2015-11-19T05:31:18Z","updated_at":"2015-11-19T05:31:19Z","pushed_at":"2015-12-02T15:16:37Z","git_url":"git://github.com/binki/EnumUtilities.git","ssh_url":"git@github.com:binki/EnumUtilities.git","clone_url":"https://github.com/binki/EnumUtilities.git","svn_url":"https://github.com/binki/EnumUtilities","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"arogozine:InDev","ref":"InDev","sha":"ee1a88fad5e552f097475a11789aea5392e9b32a","user":{"login":"arogozine","id":7774690,"avatar_url":"https://avatars.githubusercontent.com/u/7774690?v=3","gravatar_id":"","url":"https://api.github.com/users/arogozine","html_url":"https://github.com/arogozine","followers_url":"https://api.github.com/users/arogozine/followers","following_url":"https://api.github.com/users/arogozine/following{/other_user}","gists_url":"https://api.github.com/users/arogozine/gists{/gist_id}","starred_url":"https://api.github.com/users/arogozine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arogozine/subscriptions","organizations_url":"https://api.github.com/users/arogozine/orgs","repos_url":"https://api.github.com/users/arogozine/repos","events_url":"https://api.github.com/users/arogozine/events{/privacy}","received_events_url":"https://api.github.com/users/arogozine/received_events","type":"User","site_admin":false},"repo":{"id":40457982,"name":"EnumUtilities","full_name":"arogozine/EnumUtilities","owner":{"login":"arogozine","id":7774690,"avatar_url":"https://avatars.githubusercontent.com/u/7774690?v=3","gravatar_id":"","url":"https://api.github.com/users/arogozine","html_url":"https://github.com/arogozine","followers_url":"https://api.github.com/users/arogozine/followers","following_url":"https://api.github.com/users/arogozine/following{/other_user}","gists_url":"https://api.github.com/users/arogozine/gists{/gist_id}","starred_url":"https://api.github.com/users/arogozine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arogozine/subscriptions","organizations_url":"https://api.github.com/users/arogozine/orgs","repos_url":"https://api.github.com/users/arogozine/repos","events_url":"https://api.github.com/users/arogozine/events{/privacy}","received_events_url":"https://api.github.com/users/arogozine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arogozine/EnumUtilities","description":"Generic C# Enum Utilities","fork":false,"url":"https://api.github.com/repos/arogozine/EnumUtilities","forks_url":"https://api.github.com/repos/arogozine/EnumUtilities/forks","keys_url":"https://api.github.com/repos/arogozine/EnumUtilities/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arogozine/EnumUtilities/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arogozine/EnumUtilities/teams","hooks_url":"https://api.github.com/repos/arogozine/EnumUtilities/hooks","issue_events_url":"https://api.github.com/repos/arogozine/EnumUtilities/issues/events{/number}","events_url":"https://api.github.com/repos/arogozine/EnumUtilities/events","assignees_url":"https://api.github.com/repos/arogozine/EnumUtilities/assignees{/user}","branches_url":"https://api.github.com/repos/arogozine/EnumUtilities/branches{/branch}","tags_url":"https://api.github.com/repos/arogozine/EnumUtilities/tags","blobs_url":"https://api.github.com/repos/arogozine/EnumUtilities/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arogozine/EnumUtilities/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arogozine/EnumUtilities/git/refs{/sha}","trees_url":"https://api.github.com/repos/arogozine/EnumUtilities/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arogozine/EnumUtilities/statuses/{sha}","languages_url":"https://api.github.com/repos/arogozine/EnumUtilities/languages","stargazers_url":"https://api.github.com/repos/arogozine/EnumUtilities/stargazers","contributors_url":"https://api.github.com/repos/arogozine/EnumUtilities/contributors","subscribers_url":"https://api.github.com/repos/arogozine/EnumUtilities/subscribers","subscription_url":"https://api.github.com/repos/arogozine/EnumUtilities/subscription","commits_url":"https://api.github.com/repos/arogozine/EnumUtilities/commits{/sha}","git_commits_url":"https://api.github.com/repos/arogozine/EnumUtilities/git/commits{/sha}","comments_url":"https://api.github.com/repos/arogozine/EnumUtilities/comments{/number}","issue_comment_url":"https://api.github.com/repos/arogozine/EnumUtilities/issues/comments{/number}","contents_url":"https://api.github.com/repos/arogozine/EnumUtilities/contents/{+path}","compare_url":"https://api.github.com/repos/arogozine/EnumUtilities/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arogozine/EnumUtilities/merges","archive_url":"https://api.github.com/repos/arogozine/EnumUtilities/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arogozine/EnumUtilities/downloads","issues_url":"https://api.github.com/repos/arogozine/EnumUtilities/issues{/number}","pulls_url":"https://api.github.com/repos/arogozine/EnumUtilities/pulls{/number}","milestones_url":"https://api.github.com/repos/arogozine/EnumUtilities/milestones{/number}","notifications_url":"https://api.github.com/repos/arogozine/EnumUtilities/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arogozine/EnumUtilities/labels{/name}","releases_url":"https://api.github.com/repos/arogozine/EnumUtilities/releases{/id}","created_at":"2015-08-10T01:55:43Z","updated_at":"2015-11-19T06:20:13Z","pushed_at":"2015-12-02T20:14:28Z","git_url":"git://github.com/arogozine/EnumUtilities.git","ssh_url":"git@github.com:arogozine/EnumUtilities.git","clone_url":"https://github.com/arogozine/EnumUtilities.git","svn_url":"https://github.com/arogozine/EnumUtilities","homepage":null,"size":16,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/1"},"html":{"href":"https://github.com/arogozine/EnumUtilities/pull/1"},"issue":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/issues/1"},"comments":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/arogozine/EnumUtilities/statuses/893957a965fb036a6869f016ecad6ff5ce7d63db"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"arogozine","id":7774690,"avatar_url":"https://avatars.githubusercontent.com/u/7774690?v=3","gravatar_id":"","url":"https://api.github.com/users/arogozine","html_url":"https://github.com/arogozine","followers_url":"https://api.github.com/users/arogozine/followers","following_url":"https://api.github.com/users/arogozine/following{/other_user}","gists_url":"https://api.github.com/users/arogozine/gists{/gist_id}","starred_url":"https://api.github.com/users/arogozine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arogozine/subscriptions","organizations_url":"https://api.github.com/users/arogozine/orgs","repos_url":"https://api.github.com/users/arogozine/repos","events_url":"https://api.github.com/users/arogozine/events{/privacy}","received_events_url":"https://api.github.com/users/arogozine/received_events","type":"User","site_admin":false},"comments":4,"review_comments":2,"commits":5,"additions":109,"deletions":0,"changed_files":3}}