{"id":20504476,"url":"https://github.com/tiknil/csharp-style-guide","last_synced_at":"2025-09-21T23:51:15.069Z","repository":{"id":113421837,"uuid":"90058730","full_name":"tiknil/csharp-style-guide","owner":"tiknil","description":"Tiknil's style guide \u0026 coding conventions for C# (Xamarin Studio) projects","archived":false,"fork":false,"pushed_at":"2021-02-10T15:57:46.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T07:54:35.824Z","etag":null,"topics":["c-sharp","codestyle","xamarin-studio"],"latest_commit_sha":null,"homepage":"http://www.tiknil.com","language":null,"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/tiknil.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":"2017-05-02T17:16:13.000Z","updated_at":"2021-02-10T15:57:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e4d5f18-fe6a-496e-b6e4-507c166e3f12","html_url":"https://github.com/tiknil/csharp-style-guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fcsharp-style-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fcsharp-style-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fcsharp-style-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fcsharp-style-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiknil","download_url":"https://codeload.github.com/tiknil/csharp-style-guide/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242101974,"owners_count":20071982,"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":["c-sharp","codestyle","xamarin-studio"],"created_at":"2024-11-15T19:38:21.818Z","updated_at":"2025-09-21T23:51:10.048Z","avatar_url":"https://github.com/tiknil.png","language":null,"readme":"# C# Style Guide\n\nGuida di riferimento per i progetti C# (Visual Studio) in Tiknil.\n\n### References\n\n*  [C# Guide](https://docs.microsoft.com/en-gb/dotnet/articles/csharp/)\n\n### Code Snippet\n\n#### C# elements in correct order\n\nPer semplificare l'utilizzo dell'organizzazione del codice consigliamo di utilizzare il Code Template per C# in accordo con la [StyleCop Rules Documentation](http://stylecop.soyuz5.com/SA1201.html).\nLa procedura per aggiungere un Code Template in Visual Studio è la seguente:\n\n1. **Visual Studio** -\u003e **Preferences**\n2. Espandere **Text Editor**\n3. Selezionare **Code Snippets**\n4. Cliccare il pulsante **Add**\n\nSi consiglia di definire il Code Template come segue:\n\n* Shortcut: `def`\n* Group: `C#`\n* Mime: `text/x-csharp`\n* Is expandable template: `true`\n* Template Text: utilizzare il file `def.txt` contenuto in questa repo,\n\nPer utilizzare lo snippet è necessario digitare la shortcut (es.:`def`) e premere 2 volte il tasto \u003ckbd\u003eTab\u003c/kbd\u003e per confermare e aggiungere il Template Text nel codice.\n\n### Interface implementation\nQuando si crea una classe che implementa un'interfaccia è buona norma riportare tutte le implementazioni dei metodi dell'interfaccia nella stessa area di codice. In `C#` è possibile utilizzare le `partial class` per raggiungere questo obiettivo.\nEsempio:\n```csharp\n// Interfaccia\npublic interface IAawesomeInterface\n{\n  void AwesomeMethod();\n}\n\n// Classe partial contenente le funzionalità principali della classe\npublic partial class AwesomeClass\n{\n  // Funzionalità principali della classe\n}\n \n// Classe partial che implementa l'interfaccia\npublic partial class AwesomeClass : IAawesomeInterface\n{\n    public void AwesomeMethod()\n    {\n        // Implementazione del metodo definito nell'interfaccia\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiknil%2Fcsharp-style-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiknil%2Fcsharp-style-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiknil%2Fcsharp-style-guide/lists"}