{"id":15655099,"url":"https://github.com/stefh/reflectionbridge","last_synced_at":"2025-05-01T14:42:31.007Z","repository":{"id":28402514,"uuid":"31916855","full_name":"StefH/ReflectionBridge","owner":"StefH","description":"ReflectionBridge : Provides some extensions which define a bridge for the differences between Type and TypeInfo.","archived":false,"fork":false,"pushed_at":"2018-01-13T09:16:18.000Z","size":84,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-27T06:01:53.424Z","etag":null,"topics":["netstandard","reflection","type","typeinfo"],"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/StefH.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}},"created_at":"2015-03-09T19:00:30.000Z","updated_at":"2024-09-10T00:27:36.000Z","dependencies_parsed_at":"2022-09-01T08:50:46.954Z","dependency_job_id":null,"html_url":"https://github.com/StefH/ReflectionBridge","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FReflectionBridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FReflectionBridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FReflectionBridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FReflectionBridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/ReflectionBridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251892119,"owners_count":21660911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["netstandard","reflection","type","typeinfo"],"created_at":"2024-10-03T12:56:17.938Z","updated_at":"2025-05-01T14:42:30.984Z","avatar_url":"https://github.com/StefH.png","language":"C#","readme":"# ReflectionBridge\n\n[![Build status](https://ci.appveyor.com/api/projects/status/xe3rcxeyyvfr9kwc?svg=true)](https://ci.appveyor.com/project/StefH/ReflectionBridge)\n\n[![NuGet Badge](https://buildstats.info/nuget/ReflectionBridge)](https://www.nuget.org/packages/ReflectionBridge)\n\nProvides some extensions which define a bridge for the differences between Type and TypeInfo.\n\nThis library can be used for the following Frameworks:\n- net2.0\n- net3.5\n- net4.0\n- net4.5\n- net4.5.x\n- net4.6\n- net4.6.1\n- netcore4.5 Windows Store apps [only up until version 0.0.12]\n- netcore4.5.1 Windows Store apps (Windows 8.1) [only up until version 0.0.12]\n- netcore5.0 Windows Universal [only up until version 0.0.12]\n- dnx451 [only up until version 0.0.12]\n- dnxcore5 [only up until version 0.0.12]\n- uap10.0\n- sl5 (SilverLight 5.0) [only up until version 0.0.12]\n- netstandard1.3 and up\n\n\nSo instead of doing this in your code:\n```c#\nstring s = \"example\";\n#if (!(NET40 || NET35 || NET20))\nType t = s.BaseType;\n#else\nType t = s.GetTypeInfo().BaseType;\n#endif\n```\n\nYou can just do:\n```c#\nstring s = \"example\";\nType t = s.BaseType();\n```\n\nAn extension method in this project like this does the if-def:\n```c#\n        public static Type BaseType(this Type type)\n        {\n#if REFLECTIONBRIDGE \u0026\u0026 (!(NET40 || NET35 || NET20))\n            return type.GetTypeInfo().BaseType;\n#else\n            return type.BaseType;\n#endif\n        }\n```\n\nPlease provide feedback on this project.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Freflectionbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Freflectionbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Freflectionbridge/lists"}