wsl --update

wsl --update
Kategoria: 

onClick checkbox add event

<input type="checkbox" onChange="$(this).val(this.checked? '1': '0');" />
</code

url.ToString() and url.OriginalString

var uri3 = new Uri("https://onet.pl/?param=value%20space%20in");
 
Assert.Equal("https://onet.pl/?param=value space in", uri3.ToString());
// true            
Assert.Equal("https://onet.pl/?param=value%20space%20in", uri3.OriginalString);
// true
Kategoria: 

Example

     var sssss = await _managerPlatformDataService.GetPlatformData();
 
            var acvite = sssss.Single(x => x.IsActive && x.Code == AMZEU.ToString()).Marketplaces;
 
            foreach (var Channel in partnerPlatformsResponse?.PartnerChannels)
            {
                var marketplaceCodes = Channel.PartnerMarketplaces.Select(m => m.CountryCode);
 
                var missingMarketplaceResponseDtos = acvite
                    .ExceptBy(marketplaceCodes, m => m.CountryCode)
                    .Select(m => new PDto(new PM
                    {
                        Marketplace = m,
                        PartnerChannelId = Channel.Id
                    })
                    { IsAvailable = false });
 
                Channel.PartnerMarketplaces = Channel.PartnerMarketplaces
                    .Concat(missingMarketplaceResponseDtos)
                    .OrderBy(x => _orderOfMarkets.IndexOf(x.CountryCode))
                    .ToList();
            }
Kategoria: 

Qnap QuMagie - background - black

2.0.0
sed -i 's|"url('\''".concat(z,"'\'')")|"none"|' /share/CACHEDEV1_DATA/.qpkg/qumagie/v2.0.0/web/app.feb0fddc07e9661125b2.js (for image)
 
sed -i 's|filter: blur(10px)|display: none|' /share/CACHEDEV1_DATA/.qpkg/qumagie/v2.0.0/web/app.feb0fddc07e9661125b2.js (for video)

https://forum.qnap.com/viewtopic.php?t=164890

AddClaimsPrincipalFactory

            services.AddIdentity<ApplicationUser, ApplicationRole>(options =>
            {
                var allowed = options.User.AllowedUserNameCharacters + "ęóąśłżźćń";
                options.User.AllowedUserNameCharacters = allowed;
            }).AddEntityFrameworkStores<DomainModelContext>()
               .AddRoles<ApplicationRole>()
               .AddClaimsPrincipalFactory<ApplicationClaimsIdentityFactory>()
 
               .AddDefaultTokenProviders();

 public class ApplicationClaimsIdentityFactory : UserClaimsPrincipalFactory<ApplicationUser, ApplicationRole>
    {
        private readonly IHttpContextAccessor _httpContext;
 
        public ApplicationClaimsIdentityFactory(UserManager<ApplicationUser> userManager, RoleManager<ApplicationRole> roleManager, IOptions<IdentityOptions> options, IHttpContextAccessor httpContext) : base(userManager, roleManager, options)
        {
            _httpContext = httpContext;
        }
 
        public override async Task<System.Security.Claims.ClaimsPrincipal> CreateAsync(ApplicationUser user)
        {
            ClaimsPrincipal principal = await base.CreateAsync(user);
 
            ClaimsIdentity claimsIdentity = (ClaimsIdentity)principal.Identity;
 
 
            var ddd = claimsIdentity.Claims.Where(x => x.Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/name");
 
            foreach (var dd in ddd) {
                claimsIdentity.RemoveClaim(dd);
            }
 
            //claimsIdentity.Claims.ToList().RemoveAt(30);
 
            //claimsIdentity.Claims.Where(x => x.Type == )
            //claimsIdentity.AddClaim(new Claim("Deleted", user.Deleted.ToString().ToLower()));
 
 
            //_httpContext.HttpContext.User = principal;
 
 
            return principal;
        }
    }
Kategoria: 

entity tracking

  public async Task Update(Command command)
        {
            var p = await _repository.GetAsync(command.Id);
 
            foreach (var prop in command.GetType().GetProperties())
            {
                var value = prop.GetValue(command, null);
                var propertyInfo = p.GetType().GetProperty(prop.Name);
                if (propertyInfo != null)
                {
                    propertyInfo.SetValue(partner, value, null);
                }
            }
 
            _DbContext.ChangeTracker.DetectChanges();
            Console.WriteLine(_DbContext.ChangeTracker.DebugView.LongView);
 
            _DbContext.SaveChanges();
 
        }
<code>
Kategoria: 

Pasma radiowe

Pasma radiowe

zdjęcie: 

Strony

Subskrybuj Notatnik RSS