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 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) | |
//}); |
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
<User bind-Name="@UserName" bind-IsActive="@UserIsActive" /> | |
@functions | |
{ | |
public string UserName { get; set; } | |
public bool UserIsActive { 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
<!-- 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 --> |
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 void ConfigureServices(IServiceCollection services) | |
{ | |
// Add entity framework context. | |
services.AddDbContext<ApplicationDbContext>(options => | |
options.UseInMemoryDatabase() | |
); | |
// Add Identity framework. | |
services.AddIdentity<ApplicationUser, IdentityRole>() | |
.AddEntityFrameworkStores<ApplicationDbContext>() |
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 void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) | |
{ | |
loggerFactory.AddConsole(Configuration.GetSection("Logging")); | |
loggerFactory.AddDebug(); | |
app.UseRuntimeInfoPage("/runtimeinfo"); | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); |