Skip to content

Instantly share code, notes, and snippets.

View kkadir's full-sized avatar
💭
FE Hell

Kadir Kılıçoğlu kkadir

💭
FE Hell
View GitHub Profile
@kkadir
kkadir / PermissionsAttribute.cs
Last active March 3, 2020 18:18
The custom authorization attribute.
using System;
using Microsoft.AspNetCore.Authorization;
namespace CustomPolicyProvidersDemo.Authorization
{
public sealed class PermissionsAttribute : AuthorizeAttribute
{
public const string PermissionsGroup = "Permissions";
public const string RolesGroup = "Roles";
public const string ScopesGroup = "Scopes";
@kkadir
kkadir / Enumeration.cs
Created September 14, 2019 10:22
An enumeration wrapper with lazy initialization.
namespace Models.Enums
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
/// <summary>
/// The base type to create enumeration classes.
public void EvaluateCustomerDepositStatusforEnrollment()
{
try
{
...
// Get customer list with status "L - Letter Generated"
var lstCustomerDepositData = depositEvaluationTask.GetCustomersListByStatus(CustomerStatusOption.EnrollmentProcessing_LetterGenerated);
if (lstCustomerDepositData == null || lstCustomerDepositData.Count.Equals(0)) return; // <== This line returns if there aren't any customers with the "L - Letter Generated" status
version: '2'
services:
dev_m1af_msdc_1:
image : "registry2.swarm.devfactory.com/m1/af-msdc:1.2.0.10-RC1"
restart: always
container_name: "dev_m1af_msdc_1"
hostname: "kitkat"
domainname: "aflab1.aflab.messageone.com"
cpu_quota: 400000
mem_limit: 16g