{"id":16208709,"url":"https://github.com/oleghcp/vssnippets","last_synced_at":"2026-03-18T18:24:27.177Z","repository":{"id":230080414,"uuid":"778405211","full_name":"oleghcp/vssnippets","owner":"oleghcp","description":"Snippets for Visual Studio","archived":false,"fork":false,"pushed_at":"2024-05-08T15:29:16.000Z","size":155,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T20:43:48.169Z","etag":null,"topics":["snippet","visual-studio","vs"],"latest_commit_sha":null,"homepage":"","language":"Vim Snippet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oleghcp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-27T16:55:41.000Z","updated_at":"2024-05-08T15:29:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee770d4f-44be-4a33-b986-627ef792acec","html_url":"https://github.com/oleghcp/vssnippets","commit_stats":null,"previous_names":["oleghcp/vssnippets"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oleghcp/vssnippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleghcp%2Fvssnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleghcp%2Fvssnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleghcp%2Fvssnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleghcp%2Fvssnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oleghcp","download_url":"https://codeload.github.com/oleghcp/vssnippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleghcp%2Fvssnippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28612989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"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":["snippet","visual-studio","vs"],"created_at":"2024-10-10T10:25:20.910Z","updated_at":"2026-01-20T20:34:00.338Z","avatar_url":"https://github.com/oleghcp.png","language":"Vim Snippet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snippets for Visual Studio\n\nPlace snippet files to the snippet folder in addition to existing ones.  \nFor example for vs 2022 it is:  \n`C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC#\\Snippets\\1033\\Visual C#\\`\n\n## Common C# Snippets\n\n### Method\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/mtod.png)\n\n```csharp\nvoid MyMethod()\n{\n    throw new System.NotImplementedException();\n}\n```\n\n### Deconstructor\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/dctor.png)\n\n```csharp\npublic void Deconstruct()\n{\n\n}\n```\n\n### Yield return\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/yr.png)\n\n```csharp\nyield return null;\n```\n\n### fixed\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/fixed.png)\n\n```csharp\nfixed (void* ptr = value)\n{\n\n}\n```\n\n### StructLayout\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/sl.png)\n\n```csharp\n[StructLayout(LayoutKind.Sequential, Pack = 1)]\n```\n\n### MethodImpl\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/mi.png)\n\n```csharp\n[MethodImpl(MethodImplOptions.AggressiveInlining)]\n```\n\n## For Unity\n\n### Debug.Log();\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/dl.png)\n\n```csharp\nDebug.Log();\n```\n\n### SerializeField\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/sf.png)\n\n```csharp\n[SerializeField]\n```\n\n### SerializeReference\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/sr.png)\n\n```csharp\n[SerializeReference]\n```\n\n### UnityObject\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/uo.png)\n\n```csharp\nusing UnityObject = UnityEngine.Object;\n```\n\n### #if UNITY_EDITOR\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/ifue.png)\n\n```csharp\n#if UNITY_EDITOR\n\n#endif\n```\n\n### #if UNITY_EDITOR || DEVELOPMENT_BUILD\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/ifdb.png)\n\n```csharp\n#if UNITY_EDITOR || DEVELOPMENT_BUILD\n\n#endif\n```\n\n### rectTransform property\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/proprt.png)\n\n```csharp\n#pragma warning disable IDE1006\n    public RectTransform rectTransform =\u003e transform as RectTransform;\n#pragma warning restore IDE1006\n```\n\n### OnValidate + Reset\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/vld.png)\n\n```csharp\n#if UNITY_EDITOR\n    private void OnValidate()\n    {\n        ValidateData();\n    }\n\n    private void Reset()\n    {\n        ValidateData();\n    }\n\n    private void ValidateData()\n    {\n\n    }\n#endif\n```\n\n### CustomEditor\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/ce.png)\n\n```csharp\n[CustomEditor(typeof(ExampleClass))]\n```\n\n### CustomPropertyDrawer\n\n![](https://raw.githubusercontent.com/oleghcp/vssnippets/master/_images/cpd.png)\n\n```csharp\n[CustomPropertyDrawer(typeof(CustomType))]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleghcp%2Fvssnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleghcp%2Fvssnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleghcp%2Fvssnippets/lists"}