Skip to content

Instantly share code, notes, and snippets.

View ismcagdas's full-sized avatar

İsmail ÇAĞDAŞ ismcagdas

  • Volosoft
  • Istanbul, Turkey
View GitHub Profile
<link rel="import" href="../google-map/google-map-directions.html">
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-tooltip/core-tooltip.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
@ismcagdas
ismcagdas / MyAppSession.cs
Last active April 27, 2021 13:18
How to add custom field to AbpSession in ASP.NET Core
//Define your own session and add your custom field to it
//Then, you can inject MyAppSession and use it's new property in your project.
public class MyAppSession : ClaimsAbpSession, ITransientDependency
{
public MyAppSession(
IPrincipalAccessor principalAccessor,
IMultiTenancyConfig multiTenancy,
ITenantResolver tenantResolver,
IAmbientScopeProvider<SessionOverride> sessionOverrideScopeProvider) :
base(principalAccessor, multiTenancy, tenantResolver, sessionOverrideScopeProvider)
@ismcagdas
ismcagdas / app.module.ts
Created January 29, 2018 12:21
Acme.HeroShop - app.module.ts
import { BrowserTransferStateModule } from '../modules/transfer-state/browser-transfer-state.module';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ORIGIN_URL, REQUEST } from '@nguniversal/aspnetcore-engine';
export function getOriginUrl() {
return window.location.origin;
@ismcagdas
ismcagdas / app.server.module.ts
Created January 29, 2018 12:24
Acme.HeroShop - app.server.module.ts
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { AppModule } from './app.module';
import { AppComponent } from './app.component';
import { ServerTransferStateModule } from '../modules/transfer-state/server-transfer-state.module';
import { TransferState } from '../modules/transfer-state/transfer-state';
@NgModule({
imports: [
@ismcagdas
ismcagdas / app-routing.module.ts
Created January 29, 2018 12:25
Acme.HeroShop - app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
@ismcagdas
ismcagdas / tsconfig.server.json
Created January 29, 2018 12:26
Acme.HeroShop - tsconfig.server.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "commonjs",
"types": []
},
"exclude": [
"test.ts",
@ismcagdas
ismcagdas / main.server.ts
Created January 29, 2018 12:26
Acme.HeroShop - main.server.ts
import 'zone.js/dist/zone-node';
import './polyfills.server';
import { AppServerModule } from './app/app.server.module';
import { enableProdMode } from '@angular/core';
import { INITIAL_CONFIG } from '@angular/platform-server';
// import { APP_BASE_HREF } from '@angular/common';
import { createServerRenderer, RenderResult, BootFuncParams } from 'aspnet-prerendering';
// import { ORIGIN_URL } from './app/shared/constants/baseurl.constants';
@ismcagdas
ismcagdas / HeroShopPublicModule.cs
Created January 29, 2018 12:42
Acme.HeroShop - HeroShopPublicModule.cs - 1
[DependsOn(typeof(HeroShopWebCoreModule))]
public class HeroShopPublicModule: AbpModule
{
private readonly IHostingEnvironment _env;
private readonly IConfigurationRoot _appConfiguration;
public HeroShopPublicModule(IHostingEnvironment env)
{
_env = env;
_appConfiguration = env.GetAppConfiguration();
@ismcagdas
ismcagdas / Startup.cs
Last active January 29, 2018 12:55
Acme.HeroShop - Startup.cs - 1
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddNodeServices();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{