I've had lots of discussions with people over the past few days around how open source projects in the .NET space have poor documentation (if it exists). So how do we fix this?
At a high-level, I've got these goals in mind:
- make it easy
- make it cool
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| List<Person> source = new List<Person>(); | |
| source.Add(new Person { Id = 1, Name = "Maarten" }); | |
| source.Add(new Person { Id = 2, Name = "Xavier" }); | |
| var cache = new List<Person>(); |
| public class SomeClass { | |
| public void SomeMethod() { | |
| this.Log().Info(() => "Here is a log message with params which can be in Razor Views as well: '{0}'".FormatWith(typeof(SomeClass).Name)); | |
| } | |
| } |
| // use Microsoft.Experience.CloudFx.Framework.Storage.InMemoryCloudTableStorage |
I've had lots of discussions with people over the past few days around how open source projects in the .NET space have poor documentation (if it exists). So how do we fix this?
At a high-level, I've got these goals in mind:
| public class OctopusRestApi : ApiDefinition | |
| { | |
| public OctopusRestApi() | |
| { | |
| #region Projects | |
| Get["/api/projects/all"] = ListAll<ProjectSummaryIndex, Project, ProjectResource>() | |
| .WithDescription("Lists the name and ID of all of the projects in the current Octopus installation. The results will be sorted alphabetically by name.") | |
| .WithCustomQuery(projects => projects.OrderBy(m => m.Name)); | |
| Get["/api/projects/{id}"] = Load<Project, ProjectResource>() |
| #this automates the steps found here: http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore | |
| #yes, you could code golf this to about 6 characters if you wanted to | |
| $find= @' | |
| <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | |
| '@ | |
| foreach ($f in Get-ChildItem -Recurse -Path ".\" -Filter *.csproj | sort-object) | |
| { | |
| $text = Get-Content $f.FullName -Raw |
| namespace Analogy | |
| { | |
| /// <summary> | |
| /// This example shows that a library that needs access to target .NET Standard 1.3 | |
| /// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
| /// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
| /// </summary>INetCoreApp10 | |
| class Example1 | |
| { | |
| public void Net45Application(INetFramework45 platform) |