Skip to content

Instantly share code, notes, and snippets.

View maraf's full-sized avatar

Marek Fišera maraf

View GitHub Profile
@maraf
maraf / NavigationBlueprint.cs
Created October 17, 2018 13:32
Blueprint of navigation framework
using Neptuo.Features;
using Neptuo.Navigation;
using Neptuo.Navigation.Awaitable;
using Neptuo.Navigation.Awaitable.Executing;
using Neptuo.Navigation.Closeable;
using Neptuo.Navigation.Executing;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
@maraf
maraf / NuGetPackageSourceTest.cs
Created October 10, 2018 20:04
Working with package sources through NuGet.Client
var settings = new Settings(Environment.CurrentDirectory, "PackageSource.config");
var packageSourceProvider = new PackageSourceProvider(settings);
packageSourceProvider.LoadPackageSources();
//packageSourceProvider.SavePackageSources(new List<PackageSource>()
//{
// new PackageSource("https://www.nuget.org", "NuGet"),
// new PackageSource("https://www.myget.org/F/neptuo-gitextensions/api/v2", "Neptuo", false)
//});
@maraf
maraf / Test.cshtml
Created April 19, 2018 05:43
Two-way binding of multiple component properties.
<User bind-Name="@UserName" bind-IsActive="@UserIsActive" />
@functions
{
public string UserName { get; set; }
public bool UserIsActive { get; set; }
}
@maraf
maraf / is4wfw-LooklessActionCustomTag.html
Last active February 12, 2018 15:39
An example of lookless action
<!-- When save button was clicked -->
<web:condition when="post:save" is="Save">
<p:savePage pageId="query:pageId" content="post:pageContent">
<!-- Executed only when update was made -->
<web:redirectTo pageId="4" />
</p:savePage>
</web:condition>
<form method="post">
<!-- Get current page content -->
@maraf
maraf / AspNetCore-Startup-ConfigureServices.cs
Created February 7, 2017 18:10
AspNetCore Startup ConfigureServices
public void ConfigureServices(IServiceCollection services)
{
// Add entity framework context.
services.AddDbContext<ApplicationDbContext>(options =>
options.UseInMemoryDatabase()
);
// Add Identity framework.
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
@maraf
maraf / AspNetCore-Startup-Configure.cs
Created February 7, 2017 18:07
AspNetCore Startup Configure
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseRuntimeInfoPage("/runtimeinfo");
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();