Skip to content

Commit c38f541

Browse files
authored
Remove remaining README and other elements in samples (#169)
1 parent 45c2e8f commit c38f541

File tree

13 files changed

+534
-184
lines changed

13 files changed

+534
-184
lines changed

devices/Bh1750fvi/samples/README.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

devices/Bno055/samples/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

devices/Dhtxx/samples/README.md

Lines changed: 0 additions & 86 deletions
This file was deleted.
-31.7 KB
Binary file not shown.
-115 KB
Binary file not shown.

devices/Rtc/samples/README.md

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using CommandLine;
5+
using System.Collections.Generic;
6+
7+
namespace GenerateDocFxStructure
8+
{
9+
/// <summary>
10+
/// Class for command line options.
11+
/// </summary>
12+
public class CommandlineOptions
13+
{
14+
/// <summary>
15+
/// Gets or sets the destination folder.
16+
/// </summary>
17+
[Option('d', "destination", Required = true, HelpText = "Folder containing the destination folder.")]
18+
public string DestinationFolder { get; set; } = string.Empty;
19+
20+
/// <summary>
21+
/// Gets or sets the source folder.
22+
/// </summary>
23+
[Option('s', "source", Required = true, HelpText = "Folder containing the source folder.")]
24+
public string SourceFolder { get; set; } = string.Empty;
25+
26+
/// <summary>
27+
/// Gets or sets the destination media folder.
28+
/// </summary>
29+
[Option('m', "media", Required = true, HelpText = "Folder containing the destination media folder.")]
30+
public string MediaFolder { get; set; } = string.Empty;
31+
32+
[Option('i', "ignore", Required = false, Separator = ',', HelpText = "Folder to ignore in building the docs, separate with ','.")]
33+
public IEnumerable<string> IgnoreFolders { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets the main repository.
37+
/// </summary>
38+
[Option('r', "repo", Required = false, HelpText = "The main repository with the branch to target pointing on the folder used as a source. Default value is 'https://github.com/nanoFramework/nanoFramework.IoT.Device/tree/main/devices'.")]
39+
public string Repo { get; set; } = "https://github.com/nanoFramework/nanoFramework.IoT.Device/tree/main/devices";
40+
41+
/// <summary>
42+
/// Gets or sets a value indicating whether verbose information is shown in the output.
43+
/// </summary>
44+
[Option('v', "verbose", Required = false, HelpText = "Show verbose messages.")]
45+
public bool Verbose { get; set; }
46+
}
47+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net5.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="CommandLineParser" Version="2.8.0" />
10+
</ItemGroup>
11+
12+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31515.178
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateDocFxStructure", "GenerateDocFxStructure.csproj", "{2B2D40D8-B5EB-48CB-9A3D-1B8329CD2C3F}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{2B2D40D8-B5EB-48CB-9A3D-1B8329CD2C3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{2B2D40D8-B5EB-48CB-9A3D-1B8329CD2C3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{2B2D40D8-B5EB-48CB-9A3D-1B8329CD2C3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{2B2D40D8-B5EB-48CB-9A3D-1B8329CD2C3F}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {F6874961-62B8-4B53-8D7B-748AA09F65FE}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
5+
6+
namespace GenerateDocFxStructure.Helpers
7+
{
8+
/// <summary>
9+
/// Helper methods to write messages to the console.
10+
/// </summary>
11+
public class MessageHelper
12+
{
13+
private readonly CommandlineOptions options;
14+
15+
/// <summary>
16+
/// Initializes a new instance of the <see cref="MessageHelper"/> class.
17+
/// </summary>
18+
/// <param name="options">Command line options.</param>
19+
public MessageHelper(CommandlineOptions options)
20+
{
21+
this.options = options;
22+
}
23+
24+
/// <summary>
25+
/// Helper method for verbose messages.
26+
/// </summary>
27+
/// <param name="message">Message to show in verbose mode.</param>
28+
public void Output(string message)
29+
{
30+
Console.WriteLine(message);
31+
}
32+
33+
/// <summary>
34+
/// Helper method for verbose messages.
35+
/// </summary>
36+
/// <param name="message">Message to show in verbose mode.</param>
37+
public void Verbose(string message)
38+
{
39+
if (this.options == null || this.options.Verbose)
40+
{
41+
Console.WriteLine(message);
42+
}
43+
}
44+
45+
/// <summary>
46+
/// Helper method for warning messages.
47+
/// </summary>
48+
/// <param name="message">Message to show in verbose mode.</param>
49+
public void Warning(string message)
50+
{
51+
Console.ForegroundColor = ConsoleColor.Yellow;
52+
Console.WriteLine(message);
53+
Console.ResetColor();
54+
}
55+
56+
/// <summary>
57+
/// Helper method for error messages.
58+
/// </summary>
59+
/// <param name="message">Message to show in verbose mode.</param>
60+
public void Error(string message)
61+
{
62+
Console.ForegroundColor = ConsoleColor.Red;
63+
Console.WriteLine(message);
64+
Console.ResetColor();
65+
}
66+
}
67+
}

0 commit comments

Comments
 (0)