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
public sealed partial class DecimalValue : pb::IMessage<DecimalValue> | |
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE | |
, pb::IBufferMessage | |
#endif | |
{ | |
private static readonly pb::MessageParser<DecimalValue> _parser = new pb::MessageParser<DecimalValue>(() => new DecimalValue()); | |
private pb::UnknownFieldSet _unknownFields; | |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
public static pb::MessageParser<DecimalValue> Parser { get { return _parser; } } |
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
public static class DbContextExtensions | |
{ | |
public static IQueryable<T> TagWithSource<T>(this IQueryable<T> queryable, | |
string tag = "", | |
[CallerMemberName] string methodName = "", | |
[CallerFilePath] string sourceFilePath = "", | |
[CallerLineNumber] int line = 0) | |
{ | |
return queryable.TagWith(string.IsNullOrEmpty(tag) | |
? $"{methodName} - {sourceFilePath}:{line}" |
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.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Logging; | |
using AzureFunctions.Ioc.Configurations; | |
using AzureFunctions.Ioc.Services; | |
using Microsoft.Extensions.Options; |
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 Microsoft.Azure.Functions.Extensions.DependencyInjection; | |
using Microsoft.Extensions.DependencyInjection; | |
[assembly: FunctionsStartup(typeof(azure_functions_ioc.Startup))] | |
namespace azure_functions_ioc | |
{ | |
public class Startup : FunctionsStartup | |
{ | |
public override void Configure(IFunctionsHostBuilder builder) |
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
<StackLayout Orientation="StackOrientation.Horizontal" | |
HorizontalOptions="LayoutOptions.Center"> | |
<Label Text="@("Battery level is " + BatteryLevel.ToString())" | |
FontAttributes="FontAttributes.Bold" | |
VerticalTextAlignment="TextAlignment.Center" /> | |
</StackLayout> | |
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
<StackLayout Orientation="StackOrientation.Horizontal" | |
HorizontalOptions="LayoutOptions.Center"> | |
<Label Text="@("Battery level is " + Battery.ToString())" | |
FontAttributes="FontAttributes.Bold" | |
VerticalTextAlignment="TextAlignment.Center" /> | |
</StackLayout> | |
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
<StackLayout Orientation="StackOrientation.Horizontal" | |
HorizontalOptions="LayoutOptions.Center"> | |
<Button Text="Increment" OnClick="@IncrementCount" /> | |
<Label Text="@("The button was clicked " + count + " times")" | |
FontAttributes="FontAttributes.Bold" | |
VerticalTextAlignment="TextAlignment.Center" /> | |
</StackLayout> |
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; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System; | |
namespace RetroChat | |
{ | |
internal static class Program | |
{ | |
private static string _username; |
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
var menu = new MenuBar(new MenuBarItem[] { | |
new MenuBarItem("_File", new MenuItem[]{ | |
new MenuItem("_Quit", "", () => Application.RequestStop()) | |
}), // end of file menu | |
new MenuBarItem("_Help", new MenuItem[]{ | |
new MenuItem("_About", "", () | |
=> MessageBox.Query(10, 5, "About", "Written by Ali Bahraminezhad\nVersion: 0.0001", "Ok")) | |
}) // end of the help menu | |
}); | |
top.Add(menu); |
NewerOlder