Title: WriteObject enumerateCollection set to true not enumerating DataRowCollection in System.Data.DataTable · Issue #6453 · PowerShell/PowerShell · GitHub
Open Graph Title: WriteObject enumerateCollection set to true not enumerating DataRowCollection in System.Data.DataTable · Issue #6453 · PowerShell/PowerShell
X Title: WriteObject enumerateCollection set to true not enumerating DataRowCollection in System.Data.DataTable · Issue #6453 · PowerShell/PowerShell
Description: Steps to reproduce Create a simple cmdlet with this method as the ProcessRecord() protected override void ProcessRecord() { DataTable dt = new DataTable("test"); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("Age", typeof(string...
Open Graph Description: Steps to reproduce Create a simple cmdlet with this method as the ProcessRecord() protected override void ProcessRecord() { DataTable dt = new DataTable("test"); dt.Columns.Add("Name", typeof(strin...
X Description: Steps to reproduce Create a simple cmdlet with this method as the ProcessRecord() protected override void ProcessRecord() { DataTable dt = new DataTable("test"); dt.Columns.Add("Name...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6453
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"WriteObject enumerateCollection set to true not enumerating DataRowCollection in System.Data.DataTable","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\n- Windows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://github.com/PowerShell/PowerShell/blob/master/docs/KNOWNISSUES.md).\r\n- Fill out the following repro template:\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n--\u003e\r\n\r\nSteps to reproduce\r\n------------------\r\nCreate a simple cmdlet with this method as the ProcessRecord()\r\n\r\n```csharp\r\nprotected override void ProcessRecord()\r\n{\r\n DataTable dt = new DataTable(\"test\");\r\n dt.Columns.Add(\"Name\", typeof(string));\r\n dt.Columns.Add(\"Age\", typeof(string));\r\n DataRow dr = dt.NewRow(); dr[\"Name\"] = \"John\"; dr[\"Age\"] = \"20\";\r\n DataRow dr2 = dt.NewRow(); dr[\"Name\"] = \"Susan\"; dr[\"Age\"] = \"25\";\r\n dt.Rows.Add(dr); dt.Rows.Add(dr2);\r\n WriteObject(dt, enumerateCollection: true);\r\n}\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nReturn type should be a System.Array with the 2 rows enumerated.\r\n(This works on Powershell 5 with the full .NET Framework)\r\n\r\nActual behavior\r\n---------------\r\n\r\nReturn type is a DataTable not a System.Array with the rows enumerated.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\n\r\n```\r\n","author":{"url":"https://github.com/abhisheksinha89","@type":"Person","name":"abhisheksinha89"},"datePublished":"2018-03-21T19:28:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/6453/PowerShell/issues/6453"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:427aa977-0a82-b07c-607c-260a348aae10 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD38:27A07D:5701DE:782F96:6A552070 |
| html-safe-nonce | 91371d607318b9986d24923a369d31b7d2f216d957a9b15ac868c9ef0d842b5b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDM4OjI3QTA3RDo1NzAxREU6NzgyRjk2OjZBNTUyMDcwIiwidmlzaXRvcl9pZCI6IjQyODAzMjQyMTI4OTczOTM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 41a8ae7935e6ea9e8bcbdb9a1ca1d2e8d2b3f8d1e6270965a48b6d218c3a180b |
| hovercard-subject-tag | issue:307387136 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6453/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f5a252f92049a58fff151c8a1ebb35da8d88747b07750b68494431f44c8ba1d/PowerShell/PowerShell/issues/6453 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f5a252f92049a58fff151c8a1ebb35da8d88747b07750b68494431f44c8ba1d/PowerShell/PowerShell/issues/6453 |
| og:image:alt | Steps to reproduce Create a simple cmdlet with this method as the ProcessRecord() protected override void ProcessRecord() { DataTable dt = new DataTable("test"); dt.Columns.Add("Name", typeof(strin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abhisheksinha89 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 358dd24ad7465d20e3fae729b5b169d35b0dd7f8 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width