Shos.Console
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Shos.Console --version 1.0.1
NuGet\Install-Package Shos.Console -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shos.Console" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shos.Console --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Shos.Console, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Shos.Console as a Cake Addin #addin nuget:?package=Shos.Console&version=1.0.1 // Install Shos.Console as a Cake Tool #tool nuget:?package=Shos.Console&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Shos.Console
Shos.Console
See the sample: https://github.com/Fujiwo/Shos.Console/blob/main/Shos.Console.Sample/Program.cs
NuGet Gallery: Shos.Console 1.0.1 https://www.nuget.org/packages/Shos.Console/1.0.1
using System.Collections.Generic;
using System.Linq;
namespace Shos.Console.Sample
{
// Japanese (日本語)
class Program
{
static void 英数字記号のみの場合()
{
var staffs = new[] {
new { Number = 101, Name = "Takuro Yoshida" , Email = "takuro.y@xxx.com" , Score = 0.0 },
new { Number = 111, Name = "Miyuki Nakajima", Email = "m.nakajima@xxx.com", Score = 8.3 },
new { Number = 120, Name = "Sho Kiryuin" , Email = "eiichi@xxx.com" , Score = 99.7 },
new { Number = 9, Name = "Kana Nishino" , Email = "kana@xxx.com" , Score = 100.0 }
}.OrderBy(staff => staff.Number);
GridView.Show(dataSource: staffs);
}
static void 所謂全角半角混じりの場合()
{
var 全社員 = new[] {
new { 社員番号 = 101, 氏名 = "吉田 拓郎 ", フリガナ = "ヨシダ タクロウ" , メール = "takuro.y@xxx.com" , 点数 = 0.0 },
new { 社員番号 = 111, 氏名 = "中島 みゆき", フリガナ = "ナカジマ ミユキ" , メール = "m.nakajima@xxx.com", 点数 = 8.3 },
new { 社員番号 = 120, 氏名 = "鬼龍院 翔" , フリガナ = "キリュウイン ショウ", メール = "eiichi@xxx.com" , 点数 = 99.7 },
new { 社員番号 = 9, 氏名 = "西野 かな" , フリガナ = "ニシノ カナ" , メール = "kana@xxx.com" , 点数 = 100.0 }
}.OrderBy(社員 => 社員.氏名);
GridView.Show(dataSource: 全社員, hasFrame: true);
}
class Staff
{
public int Number { get; set; }
public string FamilyName { get; set; } = "";
public string GivenName { get; set; } = "";
public string FullName => $"{FamilyName} {GivenName}";
public string FamilyNameRuby { get; set; } = "";
public string GivenNameRuby { get; set; } = "";
public string FullNameRuby => $"{FamilyNameRuby} {GivenNameRuby}";
public string Email { get; set; } = "";
}
static void クラス利用の場合()
{
var staffs = new List<Staff> {
new Staff { Number = 101, FamilyName = "吉田" , GivenName = "拓郎 ", FamilyNameRuby = "ヨシダ" , GivenNameRuby = "タクロウ", Email = "takuro.y@xxx.com" },
new Staff { Number = 111, FamilyName = "中島" , GivenName = "みゆき", FamilyNameRuby = "ナカジマ" , GivenNameRuby = "ミユキ" , Email = "m.nakajima@xxx.com" },
new Staff { Number = 12, FamilyName = "鬼龍院", GivenName = "翔" , FamilyNameRuby = "キリュウイン", GivenNameRuby = "ショウ" , Email = "eiichi@xxx.com" },
new Staff { Number = 9, FamilyName = "西野" , GivenName = "かな" , FamilyNameRuby = "ニシノ" , GivenNameRuby = "カナ" , Email = "kana@xxx.com" }
};
var scoreTable = new Dictionary<int, double> {
{ 101, 100.0 },
{ 111, 80.0 },
{ 12, 8.0 },
{ 9, 0.0 }
};
GridView.Show(
dataSource: staffs.OrderBy(staff => staff.Number)
.Select(staff => new {
社員番号 = staff.Number ,
氏名 = staff.FullName ,
フリガナ = staff.FullNameRuby,
メール = staff.Email ,
得点 = scoreTable[staff.Number]
}),
hasFrame: true
);
}
static void Main()
{
new System.Action[] { 英数字記号のみの場合, 所謂全角半角混じりの場合, クラス利用の場合 }
.ForEach(test =>
{
test();
System.Console.WriteLine();
});
}
}
}
Result:
Number Name Email Score
9 Kana Nishino kana@xxx.com 100.0
101 Takuro Yoshida takuro.y@xxx.com 0.0
111 Miyuki Nakajima m.nakajima@xxx.com 8.3
120 Sho Kiryuin eiichi@xxx.com 99.7
+----------+-------------+------------+--------------------+-------+
| 社員番号 | 氏名 | フリガナ | メール | 点数 |
+----------+-------------+------------+--------------------+-------+
| 120 | 鬼龍院 翔 | キリュウイン ショウ | eiichi@xxx.com | 99.7 |
| 101 | 吉田 拓郎 | ヨシダ タクロウ | takuro.y@xxx.com | 0.0 |
| 9 | 西野 かな | ニシノ カナ | kana@xxx.com | 100.0 |
| 111 | 中島 みゆき | ナカジマ ミユキ | m.nakajima@xxx.com | 8.3 |
+----------+-------------+------------+--------------------+-------+
+----------+-------------+------------+--------------------+-------+
| 社員番号 | 氏名 | フリガナ | メール | 得点 |
+----------+-------------+------------+--------------------+-------+
| 9 | 西野 かな | ニシノ カナ | kana@xxx.com | 0.0 |
| 12 | 鬼龍院 翔 | キリュウイン ショウ | eiichi@xxx.com | 8.0 |
| 101 | 吉田 拓郎 | ヨシダ タクロウ | takuro.y@xxx.com | 100.0 |
| 111 | 中島 みゆき | ナカジマ ミユキ | m.nakajima@xxx.com | 80.0 |
+----------+-------------+------------+--------------------+-------+
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.VisualBasic (>= 10.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.5 | 105 | 8/28/2024 |
1.1.4 | 114 | 8/28/2024 |
1.1.3 | 113 | 8/9/2024 |
1.1.1 | 82 | 8/8/2024 |
1.1.0 | 87 | 8/8/2024 |
1.0.9 | 92 | 8/8/2024 |
1.0.8 | 93 | 8/8/2024 |
1.0.7 | 91 | 8/7/2024 |
1.0.6 | 87 | 8/7/2024 |
1.0.5 | 85 | 8/7/2024 |
1.0.4 | 91 | 8/7/2024 |
1.0.3 | 130 | 3/26/2024 |
1.0.2.1 | 459 | 6/16/2022 |
1.0.2 | 397 | 6/16/2022 |
1.0.1 | 402 | 6/16/2022 |
1.0.0 | 408 | 6/16/2022 |