Flyweight Design Pattern (C#)

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 23

  • @thatcreole9913
    @thatcreole9913 3 роки тому +2

    Universities need to just show this playlist.

  • @stefanioan7569
    @stefanioan7569 3 роки тому +3

    Brilliant!

  • @nikosevangelopoulos3605
    @nikosevangelopoulos3605 3 роки тому +2

    The one guy who disliked wanted to test the extrinsic state of the button.

  • @АртемАванесов-з1й
    @АртемАванесов-з1й 3 роки тому +2

    Would be nice if the last video if this playlist would be the video where you explain the difference between different patterns e.g. Flyweight vs Singelton

  • @jefftong642
    @jefftong642 Рік тому +1

    Great video. Did anyone else noticed the ass in the background?

  • @marcoscardona989
    @marcoscardona989 2 роки тому

    How would you implement Flyweight in a microservices scenario?

  • @MostafaZaki_fcih
    @MostafaZaki_fcih 3 роки тому +1

    Could you please guide me for what's the difference
    Custom Authorization Filter vs Policy in ASP.Net Core
    I'm got confused
    It'll be nice if u provide me an article or example for when to use both of them
    thanks ?

    • @RawCoding
      @RawCoding  3 роки тому +1

      I have a whole series on authorisation in aspnetcore

    • @MostafaZaki_fcih
      @MostafaZaki_fcih 3 роки тому +1

      @@RawCoding I watch most of it , but get
      it's awsome,and I'll compleete it when I have a time , but I'm now confused with what I mentioned if u can clear this confusion for me thanks

    • @RawCoding
      @RawCoding  3 роки тому +1

      Policy is a business rule
      Custom filter is an infrastructure setup

    • @MostafaZaki_fcih
      @MostafaZaki_fcih 3 роки тому +1

      @@RawCoding I know that,but in example like this I think I can do what is the custom policy know without creaating requirement and handler so what is the difference or when to use authorize
      public class ClaimRequirementAttribute : TypeFilterAttribute
      {
      public ClaimRequirementAttribute(string claimType, string claimValue) : base(typeof(ClaimRequirementFilter))
      {
      Arguments = new object[] { new Claim(claimType, claimValue) };

      }
      }
      public class ClaimRequirementFilter : IAuthorizationFilter
      {
      readonly Claim _claim;
      public ClaimRequirementFilter(Claim claim)
      {
      _claim = claim;
      }
      public void OnAuthorization(AuthorizationFilterContext context)
      {
      var hasClaim = context.HttpContext.User.Claims.Any(c => c.Type == _claim.Type && c.Value == _claim.Value);
      if (!hasClaim)
      {
      context.Result = new ForbidResult();
      }
      }
      [Route("api/resource")]
      public class MyController : Controller
      {
      [ClaimRequirement("Permission", "SCI_FI")]
      //[StreamingCategoryAuthorize(StreamingCategory.SCI_FI)]
      [HttpGet]
      public IActionResult GetResource()
      {
      return Ok();
      }
      }
      }

  • @clearlyunwell
    @clearlyunwell 3 роки тому +1

    👍🏽

  • @amitsinghrawat4760
    @amitsinghrawat4760 3 роки тому +1

    Hi, Requesting video
    The best way to Check a file is virus-infected or not.

  • @prajjwalagarwal4314
    @prajjwalagarwal4314 3 роки тому +1

    Can you provide us this code?