{"id":21276440,"url":"https://github.com/lawrence-laz/transactional-io","last_synced_at":"2026-05-10T14:49:19.313Z","repository":{"id":65348564,"uuid":"590621818","full_name":"lawrence-laz/transactional-io","owner":"lawrence-laz","description":"Manipulate FileStreams in a transactional manner.","archived":false,"fork":false,"pushed_at":"2023-03-18T08:55:35.000Z","size":795,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-10T14:49:17.681Z","etag":null,"topics":["csharp","dotnet","filestream","nuget","resilience","transaction"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lawrence-laz.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-18T20:35:38.000Z","updated_at":"2023-03-08T18:24:15.000Z","dependencies_parsed_at":"2025-01-22T03:39:30.476Z","dependency_job_id":null,"html_url":"https://github.com/lawrence-laz/transactional-io","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lawrence-laz/transactional-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrence-laz%2Ftransactional-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrence-laz%2Ftransactional-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrence-laz%2Ftransactional-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrence-laz%2Ftransactional-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lawrence-laz","download_url":"https://codeload.github.com/lawrence-laz/transactional-io/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrence-laz%2Ftransactional-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32860226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"ssl_error","status_checked_at":"2026-05-10T13:40:02.145Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","filestream","nuget","resilience","transaction"],"created_at":"2024-11-21T09:48:59.347Z","updated_at":"2026-05-10T14:49:19.244Z","avatar_url":"https://github.com/lawrence-laz.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NuGet Version](https://img.shields.io/nuget/v/Transactional.IO?label=NuGet)](https://www.nuget.org/packages/Transactional.IO/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/Transactional.IO?label=Downloads)](https://www.nuget.org/packages/Transactional.IO/)\n[![Build](https://github.com/lawrence-laz/transactional-io/workflows/Build/badge.svg)](https://github.com/lawrence-laz/transactional-io/actions?query=workflow%3ABuild)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7ff922b8f755431ea5a1fa59e59c534a)](https://www.codacy.com/gh/lawrence-laz/transactional-io/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=lawrence-laz/transactional-io\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/7ff922b8f755431ea5a1fa59e59c534a)](https://www.codacy.com/gh/lawrence-laz/transactional-io/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=lawrence-laz/transactional-io\u0026utm_campaign=Badge_Coverage)\n\n# 📁 Transactional.IO\nA dead simple way to manage your `FileStream` in a transactional way to ensure \nthat the file does not get corrupted if things don't go as planned.\n\nTake an example with `XmlWriter` (note that any `StreamWriter` is compatible, including the direct access!)\n```csharp\nusing Transactional.IO;\nusing System.Xml;\n\nusing var stream = new TransactionalFileStream(\"my-file.xml\", FileMode.Truncate);\nusing var writer = XmlWriter.Create(stream);\n\nvar userFullName = \"\";\n\nwriter.WriteStartDocument();\nwriter.WriteStartElement(\"User\");\nif (userFullName == \"\")\n{\n    // ❌ This interrupts execution and writer does not finish.\n    // Your file would be left corrupted with half of XML missing.\n    throw new Exception(\"Uh-oh!\"); \n}\nwriter.WriteValue(userFullName);\nwriter.WriteEndElement();\n\nwriter.WriteEndDocument();\n\n// ✅ But don't fret! \n// As long as .Commit() was not called, the original file is left unchanged.\nstream.Commit();\n```\n\n## 🌟 Features\n  - As simple as it gets, no bloated custom APIs\n  - Extends standard `System.IO.FileStream`\n\n## 📦️ Get started\nDownload from [nuget.org](https://www.nuget.org/packages/Transactional.IO/):\n```powershell\ndotnet add package Transactional.IO\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawrence-laz%2Ftransactional-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flawrence-laz%2Ftransactional-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawrence-laz%2Ftransactional-io/lists"}