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
@inherits LayoutComponentBase | |
@inject I18NPortable.II18N L | |
@inject Events Events | |
<div class="page"> | |
<div class="sidebar"> | |
<NavMenu /> | |
</div> |
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 class MyComponentBase : ComponentBase | |
{ | |
[Inject] | |
public Events Events { get; set; } | |
protected override void OnAfterRender(bool firstRender) | |
{ | |
if (firstRender) | |
{ | |
Events.LanguageChanged += (_, lang) => StateHasChanged(); |
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 class Events | |
{ | |
public event EventHandler<string> LanguageChanged; | |
internal void InvokeLanguageChanged(string newLanguage, object sender = null) | |
=> LanguageChanged?.Invoke(sender ?? this, newLanguage); | |
} |
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
builder.Services.AddSingleton((_) => | |
I18N.Current | |
.SetNotFoundSymbol("$") | |
.SetFallbackLocale("en-US") | |
.Init(typeof(Program).Assembly)); |
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 RAGE; | |
using System; | |
namespace TecoRP.Client | |
{ | |
public class BasicInput | |
{ | |
public static void GetInput(Action<string> action, string title = "", int maxLength = 32, string defaultText = null) | |
{ | |
Chat.Activate(false); |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
<PackageId>My.Package</PackageId> | |
<Version>1.0.1</Version> | |
<Authors>enisn</Authors> | |
<Company>enisn</Company> | |
<Product>My Package</Product> | |
<Description>This is my packages description.</Description> |
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 AutoFilterer.Attributes; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace AutoFilterer.Types | |
{ | |
public class ArraySearchFilteringAttribute : FilteringOptionsBaseAttribute | |
{ | |
public override Expression BuildExpression(Expression expressionBody, PropertyInfo targetProperty, PropertyInfo filterProperty, object value) |
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 void Main(params string[] args) | |
{ | |
Func<string> getName = FindName; | |
Action<string> greet = SayHello; | |
greet(getName()); | |
} | |
static string FindName() |
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 void Main(params string[] args) | |
{ | |
var query = db.Books.Where(x => x.Year > 1990); | |
var result = query.ToList(); | |
} |
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 void Main(params string[] args) | |
{ | |
var query = | |
from x in db.Books | |
where x.Year > 1990 | |
select x; | |
var result = query.ToList(); | |
} |