{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/15387","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/15387/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/15387/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/15387/events","html_url":"https://github.com/dotnet/roslyn/issues/15387","id":190494159,"number":15387,"title":"\"Implement abstract class\" reorders members","user":{"login":"OndrejPetrzilka","id":3371096,"avatar_url":"https://avatars.githubusercontent.com/u/3371096?v=3","gravatar_id":"","url":"https://api.github.com/users/OndrejPetrzilka","html_url":"https://github.com/OndrejPetrzilka","followers_url":"https://api.github.com/users/OndrejPetrzilka/followers","following_url":"https://api.github.com/users/OndrejPetrzilka/following{/other_user}","gists_url":"https://api.github.com/users/OndrejPetrzilka/gists{/gist_id}","starred_url":"https://api.github.com/users/OndrejPetrzilka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OndrejPetrzilka/subscriptions","organizations_url":"https://api.github.com/users/OndrejPetrzilka/orgs","repos_url":"https://api.github.com/users/OndrejPetrzilka/repos","events_url":"https://api.github.com/users/OndrejPetrzilka/events{/privacy}","received_events_url":"https://api.github.com/users/OndrejPetrzilka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-19T12:31:42Z","updated_at":"2016-11-19T12:31:42Z","closed_at":null,"body":"**Version Used**: \r\nVisual Studio 15, Preview 5\r\n\r\n**Steps to Reproduce**:\r\n\r\n1. Write abstract class with two abstract methods\r\n2. Name first method 'XXX'\r\n3. Name second method 'AAA'\r\n4. Write class which inherits abstract class\r\n5. Use 'Quick Actions': 'Implement abstract class'\r\n\r\n**Expected Behavior**:\r\nMember order would be preserved\r\n```\r\n    abstract class BaseClass\r\n    {\r\n        public abstract void XXX();\r\n        public abstract void AAA();\r\n    }\r\n\r\n    class Implementation : BaseClass\r\n    {\r\n        public override void XXX()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public override void AAA()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n```\r\n\r\n**Actual Behavior**:\r\nMembers are sorted by name\r\n```\r\n    abstract class BaseClass\r\n    {\r\n        public abstract void XXX();\r\n        public abstract void AAA();\r\n    }\r\n\r\n    class Implementation : BaseClass\r\n    {\r\n        public override void AAA()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        public override void XXX()\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n```\r\n\r\n**Justification**:\r\nIf I wanted members sorted by name, I would have done it in the base class. Member sorting should be optional (e.g. formatting options in TextEditor/C#), imho disabled by default. When somebody orders members somehow, it's usually for a reason. For our organization, it's typical to write Dispose method as first under constructors. Similarly methods like Initialize and Terminate are next to each other.\r\nReason for this is to 'see' both methods at the same time, which is convenient when making changes to the code. It's similar for abstract interface implementations."}}
{"actor":{"display_login":"OndrejPetrzilka"}}