{"id":50882352,"url":"https://github.com/beyondnetcode/shell.factory","last_synced_at":"2026-06-15T14:01:35.939Z","repository":{"id":363164638,"uuid":"1254307713","full_name":"beyondnetcode/Shell.Factory","owner":"beyondnetcode","description":"Configuration-driven Factory pattern library for .NET with fluent API, DI integration, interceptors, and type-safe object creation.","archived":false,"fork":false,"pushed_at":"2026-06-07T17:08:15.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T19:08:30.780Z","etag":null,"topics":["aop","csharp","factory-method-pattern","factory-pattern","net"],"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/beyondnetcode.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T12:03:14.000Z","updated_at":"2026-06-07T17:08:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beyondnetcode/Shell.Factory","commit_stats":null,"previous_names":["beyondnetcode/shell.factory"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/beyondnetcode/Shell.Factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondnetcode%2FShell.Factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondnetcode%2FShell.Factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondnetcode%2FShell.Factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondnetcode%2FShell.Factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondnetcode","download_url":"https://codeload.github.com/beyondnetcode/Shell.Factory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondnetcode%2FShell.Factory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34365597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aop","csharp","factory-method-pattern","factory-pattern","net"],"created_at":"2026-06-15T14:01:33.847Z","updated_at":"2026-06-15T14:01:35.917Z","avatar_url":"https://github.com/beyondnetcode.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeyondNet.Factory\n\n\u003cp\u003e\n  \u003cstrong\u003eEnglish\u003c/strong\u003e | \u003ca href=\"README.es.md\"\u003eEspañol\u003c/a\u003e\n\u003c/p\u003e\n\nBeyondNet.Factory is a .NET library aimed at improving the factory and abstract factory patterns by introducing configuration-driven behavior. It enables developers to create structured factories that simplify object instantiation across different .NET applications.\n\n## Features\n\n- **Configuration-Driven Factory**: Create factories with setup records for cleaner instantiation\n- **Fluent API**: Chain configuration with an expressive builder interface\n- **Interceptor Support**: Add custom logic before/after object creation\n- **DI Integration**: Seamless integration with Microsoft.Extensions.DependencyInjection\n- **Generic Support**: Work with generic types for better type safety\n- **Extensible**: Easily add custom setup sources and interceptors\n\n## Architecture\n\nThe library is organized into modular packages:\n\n```\nBeyondNetCode.Shell.Factory              # Core factory patterns\nBeyondNetCode.Shell.Factory.Installer    # DI extension methods\n```\n\n## Installation\n\n```bash\n# Core library\ndotnet add package BeyondNetCode.Shell.Factory\n\n# DI installer\ndotnet add package BeyondNetCode.Shell.Factory.Installer\n```\n\n## Usage\n\n### Define a Factory Record\n\n```csharp\npublic interface IDoSomething\n{\n    string DoIt(string name);\n}\n\npublic class DoSomething : IDoSomething\n{\n    public string DoIt(string name) =\u003e $\"Hello, {name}!\";\n}\n```\n\n### Configure and Use\n\n```csharp\n// Using fluent API\nvar factory = new FactorySetupCreateBuilder\u003cIFactory\u003e()\n    .Create\u003cDoSomething\u003e()\n    .When\u003cCriteria\u003e(c =\u003e c.Age \u003e 18)\n    .Build();\n\nvar service = factory.Create\u003cDoSomething\u003e();\nvar result = service.DoIt(\"World\"); // \"Hello, World!\"\n```\n\n### Register with DI\n\n```csharp\nservices.AddFactory(factory =\u003e\n{\n    factory.Create\u003cDoSomething\u003e()\n        .When\u003cCriteria\u003e(c =\u003e c.Age \u003e 18)\n        .Create\u003cDoSomethingLessThan18\u003e()\n        .When\u003cCriteria\u003e(c =\u003e c.Age \u003c= 18);\n});\n```\n\n### Interceptors\n\n```csharp\npublic class MyInterceptor : AbstractFactoryInterceptor\n{\n    public override void OnBeforeCreate(Type type, object[] args)\n    {\n        Console.WriteLine($\"Creating: {type.Name}\");\n    }\n}\n```\n\n## Testing\n\n```bash\ndotnet test\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for GitFlow workflow and coding standards.\n\n## Versioning\n\nSee [VERSIONING.md](VERSIONING.md) for SemVer strategy.\n\n## License\n\nMIT - See [LICENSE](LICENSE)\n\n## Acknowledgments\n\nSee [DISCLAIMER.md](DISCLAIMER.md) for original code authorship.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondnetcode%2Fshell.factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondnetcode%2Fshell.factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondnetcode%2Fshell.factory/lists"}