This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Terminal.Gui; | |
namespace RetroChat | |
{ | |
public class ChatWindow : Window | |
{ | |
private readonly View _parent; | |
private static string _username; | |
private static readonly List<string> _users = new List<string>(); | |
private static readonly List<string> _messages = new List<string>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Terminal.Gui; | |
namespace RetroChat | |
{ | |
public class LoginWindow : Window | |
{ | |
private readonly View _parent; | |
public Action<(string name, DateTime birthday)> OnLogin {get;set;} | |
public Action OnExit {get;set;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Terminal.Gui; | |
namespace RetroChat | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Application.Init(); | |
var top = Application.Top; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.9.4 | |
# Add some libs required by .NET runtime | |
RUN apk add --no-cache libstdc++ libintl | |
EXPOSE 80 | |
EXPOSE 443 | |
# Copy | |
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.9.4 | |
# Add some libs required by .NET runtime | |
RUN apk add --no-cache libstdc++ libintl icu | |
EXPOSE 80 | |
EXPOSE 443 | |
# Copy | |
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.9.4 | |
# Add some libs required by .NET runtime | |
# https://github.com/dotnet/core/blob/master/Documentation/build-and-install-rhel6-prerequisites.md#troubleshooting | |
RUN apk add --no-cache \ | |
openssh libunwind \ | |
nghttp2-libs libidn krb5-libs libuuid lttng-ust zlib \ | |
libstdc++ libintl \ | |
icu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We only ship the published app in the image | |
# so we only use ASPNET runtime as the base-image | |
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS runtime | |
EXPOSE 80 | |
EXPOSE 443 | |
# Copy | |
WORKDIR /app | |
COPY ./publish ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void IncrementCount() | |
{ | |
Console.WriteLine(currentCount); | |
if(currentCount > 10) | |
currentCount = 0; | |
currentCount++; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/counter" | |
<h1>Counter</h1> | |
<p>Current count: @currentCount</p> | |
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button> | |
@code { | |
private int currentCount = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using McMaster.Extensions.CommandLineUtils; | |
using System; | |
using System.IO; | |
namespace CSVUtil | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ |