Skip to content

Instantly share code, notes, and snippets.

View MSavameri's full-sized avatar
:octocat:

Meysam Savameri MSavameri

:octocat:
View GitHub Profile
import {catchError, map} from 'rxjs/operators';
import {Inject, Injectable} from '@angular/core';
import {HttpClient, HttpErrorResponse} from '@angular/common/http';
import {Observable} from 'rxjs/internal/Observable';
import {environment} from '../../../environments/environment';
import {User} from '../user/user';
import {Model} from '../abstract/model';
import {zip} from 'rxjs';
@lkaczanowski
lkaczanowski / CustomHandleErrorAttribute.cs
Last active November 14, 2020 00:33
Custom ASP.NET MVC handle error attribute. Handles and logs all errors.
public class CustomHandleErrorAttribute : HandleErrorAttribute
{
private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public override void OnException(ExceptionContext filterContext)
{
if (!filterContext.HttpContext.IsCustomErrorEnabled)
{
return;
}
@martinnormark
martinnormark / BusinessLogicInstaller.cs
Created July 17, 2012 09:17
Castle Windsor IoC Container setup for ASP.NET MVC
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using MyApp.BusinessLogic.Facades;
namespace MyApp.Web.PresentationLogic.Container
{
public class BusinessLogicInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)