Skip to content

Instantly share code, notes, and snippets.

View molaie's full-sized avatar

ahmad molaie molaie

View GitHub Profile
public class ProfileClaimsService<TUser> : IProfileService
where TUser : class {
private readonly IUserClaimsPrincipalFactory<TUser> _claimsFactory;
private readonly UserManager<TUser> _userManager;
public ProfileClaimsService(UserManager<TUser> userManager, IUserClaimsPrincipalFactory<TUser> claimsFactory) {
_userManager = userManager;
_claimsFactory = claimsFactory;
}
@molaie
molaie / HtmlCellTemplatePdfReport.cs
Created February 23, 2019 13:09
Pdf Report Test Case
using iTextSharp.text;
using PdfRpt.Core.Contracts;
using PdfRpt.Core.Helper;
using PdfRpt.FluentInterface;
using System;
using System.Text;
namespace PdfReportSamples.HtmlCellTemplate {
public class HtmlCellTemplatePdfReport {
public IPdfReportData CreatePdfReport() {
@molaie
molaie / gist:169b241d906c54bc4ccb0b2085a29abf
Created September 17, 2018 18:13
regular expression to find htmltag properties
use following expression to find <htmltag width="ccdc"> and replace with <htmltag>
(width\s*=\s*["'](.*?)["'])
change width to antthing you want
@molaie
molaie / 1.md
Created January 13, 2018 13:01

An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately. Generated Code One or more compilation references are missing. Ensure that your project is referencing 'Microsoft.NET.Sdk.Web' and the 'PreserveCompilationContext' property is not set to false.

The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/Modules/Core/Views/Home/Index.cshtml", typeof(AspNetCore._Modules_Core_Views_Home_Index_cshtml))]

Predefined type 'System.String' is not defined or imported