{"id":124,"date":"2021-06-28T13:42:31","date_gmt":"2021-06-28T10:42:31","guid":{"rendered":"https:\/\/ernan-maisels.net\/?p=124"},"modified":"2021-06-28T14:45:14","modified_gmt":"2021-06-28T11:45:14","slug":"decorator","status":"publish","type":"post","link":"https:\/\/hernan-yehuda.net\/?p=124","title":{"rendered":"Decorator"},"content":{"rendered":"\n<p class=\"has-text-align-right\">\u05d1\u05e4\u05d5\u05e1\u05d8 \u05d6\u05d4 \u05d0\u05d3\u05d2\u05d9\u05dd \u05e9\u05e0\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05e0\u05e4\u05d5\u05e6\u05d9\u05dd \u05d1\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1 Decorator.<\/p>\n\n\n\n<p class=\"has-text-align-right\">Decorator \u05d4\u05d9\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d3\u05d9 \u05e0\u05e4\u05d5\u05e6\u05d4 \u05d5\u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05ea \u05d1\u05d9\u05d5\u05ea\u05e8. \u05d4\u05d9\u05d0 \u05de\u05d0\u05e4\u05e9\u05e8 \u05d4\u05d5\u05e1\u05e4\u05ea \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05e7\u05d9\u05d9\u05dd \u05d1\u05e6\u05d5\u05e8\u05d4 \u05d3\u05d9\u05e0\u05d0\u05de\u05d9\u05ea, \u05de\u05d1\u05dc\u05d9 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9.<\/p>\n\n\n\n<p class=\"has-text-align-right\">\u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05d6\u05d5 \u05de\u05d5\u05e0\u05e2\u05ea \u05d9\u05e8\u05d5\u05e9\u05d4 \u05de\u05d9\u05d5\u05ea\u05e8\u05ea \u05d0\u05d5 \u05e4\u05d5\u05ea\u05e8\u05ea \u05de\u05e7\u05e8\u05d9\u05dd \u05d1\u05d4\u05dd \u05d0\u05d9\u05df \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d9\u05e8\u05d5\u05e9\u05d4 \u05d1\u05db\u05dc\u05dc (Sealed).<\/p>\n\n\n\n<p class=\"has-text-align-right\">\u05e2\u05d5\u05d3 \u05d3\u05d1\u05e8 \u05e9\u05e0\u05d9\u05ea\u05df \u05dc\u05d5\u05de\u05e8 \u05e2\u05dc \u05ea\u05d1\u05e0\u05d9\u05ea \u05d6\u05d5 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05d9\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc <a href=\"https:\/\/web.archive.org\/web\/20140919014121\/http:\/\/he.wikipedia.org\/wiki\/%D7%A2%D7%99%D7%A7%D7%A8%D7%95%D7%9F_%D7%A4%D7%AA%D7%99%D7%97%D7%95%D7%AA\/%D7%A1%D7%92%D7%99%D7%A8%D7%95%D7%AA\">Open Closed Principle<\/a>&#8211; \u05e2\u05d9\u05e7\u05e8\u05d5\u05df \u05d6\u05d4 \u05e9\u05dc \u05ea\u05db\u05e0\u05d5\u05ea \u05de\u05d5\u05e0\u05d7\u05d4 \u05e2\u05e6\u05de\u05d9\u05dd \u05d0\u05d5\u05de\u05e8 \u05e9Class \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d9\u05d5\u05ea \u05e4\u05ea\u05d5\u05d7 \u05dc\u05d4\u05e8\u05d7\u05d1\u05d4, \u05d0\u05d1\u05dc \u05e1\u05d2\u05d5\u05e8 \u05dc\u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd. \u05db\u05dc\u05d5\u05de\u05e8, \u05e1\u05d1\u05d9\u05e8 \u05dc\u05d4\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d5\u05e9\u05e7\u05e2\u05d4 \u05de\u05d7\u05e9\u05d1\u05d4 \u05e8\u05d1\u05d4 \u05e2\u05dc \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d4Class \u05e9\u05dc\u05e0\u05d5, \u05d5\u05dc\u05db\u05df \u05dc\u05d0 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05d5\u05ea\u05d5. \u05d0\u05da \u05de\u05e6\u05d3 \u05e9\u05e0\u05d9 \u05d9\u05ea\u05db\u05df \u05de\u05e6\u05d1 \u05e9\u05de\u05d9\u05e9\u05d4\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 \u05e9\u05dc\u05d1 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1.<\/p>\n\n\n\n<p class=\"has-text-align-right\">\u05de\u05e7\u05e8\u05d4 \u05e0\u05d5\u05e1\u05e3 \u05e9\u05d1\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1 Decorator \u05d4\u05d5\u05d0 \u05db\u05d0\u05e9\u05e8 \u05d9\u05e9 \u05e7\u05d5\u05d3 \u05d9\u05e9\u05df (\u05d4\u05d9\u05d3\u05d5\u05e2 \u05d1\u05db\u05d9\u05e0\u05d5\u05d9\u05d5 Legacy Code) \u05e9\u05de\u05e1\u05d5\u05d1\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d5\u05d1\u05db\u05dc\u05dc \u05dc\u05d0 \u05de\u05ea\u05d7\u05e9\u05e7 \u05dc\u05d2\u05e2\u05ea \u05d1\u05d5, \u05d0\u05da \u05dc\u05e2\u05d9\u05ea\u05d9\u05dd \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea.<\/p>\n\n\n\n<p>\u05d4 Decorator \u05de\u05d5\u05e8\u05db\u05d1 \u05de\u05d0\u05e8\u05d1\u05e2\u05d4 \u05d7\u05dc\u05e7\u05d9\u05dd \u05e2\u05d9\u05e7\u05e8\u05d9\u05d9\u05dd (\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e6\u05de\u05e6\u05dd \u05d0\u05ea \u05d7\u05dc\u05e7\u05dd \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05de\u05e7\u05e8\u05d4 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9):<\/p>\n\n\n\n<p class=\"has-text-align-right\">\u05d0. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05d4 Component \u2013 \u05d6\u05d4\u05d5 abstract class \u05d0\u05d5 Interface \u05e9\u05d0\u05ea \u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4 \u05de\u05de\u05d9\u05de\u05d5\u05e9\u05d9\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea.<\/p>\n\n\n\n<p class=\"has-text-align-right\">\u05d1. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05e0\u05d9 \u05d4\u05d5\u05d0 \u05d4 Concrete Component \u2013 \u05d6\u05d4\u05d5 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05e9\u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05d0\u05d5 \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4 Component.<\/p>\n\n\n\n<p>\u05d2. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05dc\u05d9\u05e9\u05d9 \u05d4\u05d5\u05d0 \u05d4 Decorator \u2013 \u05d6\u05d4\u05d5 abstract class \u05e9\u05d2\u05dd \u05d4\u05d5\u05d0 \u05db\u05de\u05d5 \u05d4 Concrete Component \u05d9\u05d5\u05e8\u05e9 \u05de\u05d4 Component . \u05d4\u05de\u05d0\u05e4\u05d9\u05d9\u05df \u05d0\u05ea \u05d4 Decorator \u05d4\u05d5\u05d0 \u05e9\u05d9\u05e9 \u05dc\u05d5 Protected Member \u05de\u05d4\u05e1\u05d5\u05d2 \u05e9\u05dc \u05d4Component \u05d5\u05e9\u05d1 Constructor \u05e9\u05dc\u05d5 \u05d4\u05d5\u05d0 \u05de\u05e7\u05d1\u05dc \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Component \u05db\u05dc\u05e9\u05d4\u05d5 \u05d5\u05de\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4 Member (\u05ea\u05d9\u05db\u05e3 \u05ea\u05d1\u05d5\u05d0 \u05d4\u05d3\u05d5\u05d2\u05de\u05d0).<\/p>\n\n\n\n<p>\u05d3. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d1\u05d9\u05e2\u05d9 \u05d4\u05d5\u05d0 Concrete Decorator \u2013 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05d0\u05e9\u05e8 \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05d4 Decorator, \u05de\u05d5\u05e1\u05d9\u05e4\u05d9\u05dd \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05de\u05e9\u05dc \u05e2\u05e6\u05de\u05dd \u05d5\u05db\u05de\u05d5\u05d1\u05df \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05d4\u05d1\u05e1\u05d9\u05e1\u05d9\u05ea, \u05d5\u05d6\u05d0\u05ea \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05d4\u05ea\u05e7\u05d1\u05dc \u05d1Constructor.<\/p>\n\n\n\n<p><strong><u>\u05d3\u05d5\u05d2\u05de\u05d0 \u05d0<\/u><\/strong><\/p>\n\n\n\n<p>\u05e0\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d7\u05d5\u05de\u05d5\u05e1\u05d9\u05d4 &#8220;\u05de\u05e1\u05d1\u05d4-\u05e4\u05d5\u05dc&#8221; (\u05d1\u05df \u05d2\u05d5\u05e8\u05d9\u05d5\u05df 18 \u05d1\u05e8\u05de\u05ea \u05d2\u05df, \u05dc\u05de\u05d9 \u05e9\u05de\u05ea\u05e2\u05e0\u05d9\u05d9\u05df \u2013 \u05ea\u05d1\u05e7\u05e9\u05d5 \u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea) \u05e4\u05e0\u05d5 \u05d0\u05dc\u05d9 \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d1\u05d4 \u05d4\u05dd \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05dc\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc\u05ea\u05e4\u05e8\u05d9\u05d8\u05d9\u05dd \u05d4\u05de\u05e2\u05d5\u05d3\u05db\u05e0\u05d9\u05dd \u05e9\u05dc\u05d4\u05dd \u05d5\u05d4\u05dd \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05ea\u05d0\u05d9\u05dd \u05d0\u05d5\u05ea\u05d4.<\/p>\n\n\n\n<p>\u05db\u05e8\u05d2\u05e2 \u05d4\u05de\u05e6\u05d1 \u05d4\u05d5\u05d0 \u05db\u05d6\u05d4 \u2013 \u05d1\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05dc\u05d4\u05dd \u05d9\u05e9 \u05e9\u05dc\u05d5\u05e9\u05d4 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd: \u05d7\u05d5\u05de\u05d5\u05e1 \u05e4\u05e8\u05d8\u05d9, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d6\u05d5\u05d2\u05d9, \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e9\u05e4\u05d7\u05ea\u05d9 \u2013 \u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05e7\u05dc\u05d0\u05e1 &#8220;\u05d7\u05d5\u05de\u05d5\u05e1&#8221; \u05db\u05de\u05d5\u05d1\u05df \u05d5\u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05de\u05de\u05e9\u05d9\u05dd GetDescription \u05d5 CalculateCost.<\/p>\n\n\n\n<p>\u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic abstract class Humus\n{\n   public string Description { get; set; }\n   public abstract string GetDescriotion();\n   public abstract double CalculateCost();\n}\n\npublic class PrivateHumus : Humus\n{\n  public PrivateHumus()\n  {\n     Description = &quot;Private Humus&quot;;\n  }\n  public override string GetDescriotion()\n  {\n      return Description;\n  }\n\n  public override double CalculateCost()\n  {\n     return 18.00;\n }\n}\n\npublic class DualHumus : Humus\n{\n   public DualHumus()\n   {\n     Description = &quot;Dual Humus&quot;;\n   }\n   public override string GetDescriotion()\n   {\n    return Description;\n   }\n   public override double CalculateCost()\n   {\n      return 30.00;\n   }\n}\n\npublic class FamilyHumus : Humus\n{\n   public FamilyHumus()\n   {\n      Description = &quot;Family Humus&quot;;\n   }\n   public override string GetDescriotion()\n   {\n       return Description;\n   }\n\n   public override double CalculateCost()\n   {\n       return 45.00;\n   }\n}\n\n<\/pre><\/div>\n\n\n<p>\u05de\u05d4 \u05e9\u05e7\u05e8\u05d4 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05dd \u05d2\u05d9\u05dc\u05d5 \u05e9\u05d4\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05d4\u05dd \u05de\u05e2\u05d3\u05d9\u05e4\u05d9\u05dd \u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e2\u05dc \u05d4\u05d7\u05d5\u05de\u05d5\u05e1 \u05e9\u05dc\u05d4\u05dd, \u05d0\u05d6 \u05d4\u05dd \u05d4\u05ea\u05d7\u05d9\u05dc\u05d5 \u05dc\u05d4\u05d2\u05d9\u05e9 \u05d7\u05d5\u05de\u05d5\u05e1 \u05d2\u05e8\u05d2\u05d9\u05e8\u05d9\u05dd, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d8\u05d7\u05d9\u05e0\u05d4 \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e1\u05d1\u05d7\u05d4.<\/p>\n\n\n\n<p>\u05d0\u05dd \u05db\u05da \u05de\u05d4 \u05e6\u05e8\u05d9\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d1\u05ea\u05d5\u05db\u05e0\u05d4?<\/p>\n\n\n\n<p>\u05d0\u05dd \u05e0\u05ea\u05d7\u05d9\u05dc \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e7\u05dc\u05d0\u05e1 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3 \u05d5\u05d6\u05d4 \u05d1\u05d4\u05ea\u05d0\u05de\u05d4 \u05dc\u05d2\u05d5\u05d3\u05dc \u05d4\u05de\u05e0\u05d4, \u05d6\u05d4 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da FamilyHumusWithTehini, DualHumusWithTehini, PrivateHumusWithTehini \u05d5\u05db\u05d5&#8217; \u05d5\u05db\u05d5&#8217;\u2026 \u05d5\u05db\u05da \u05d4\u05dc\u05d0\u05d4 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3.<\/p>\n\n\n\n<p>\u05d5\u05de\u05d4 \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05e9\u05dc\u05d1 (\u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea \u05db\u05d6\u05db\u05d5\u05e8)?<\/p>\n\n\n\n<p>\u05d5\u05de\u05d4 \u05d0\u05dd \u05de\u05d7\u05e8 \u05d4\u05dd \u05d9\u05e8\u05e6\u05d5 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d2\u05dd \u05e4\u05d5\u05dc?<\/p>\n\n\n\n<p>\u05ea\u05d4\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05ea\u05e4\u05d5\u05e6\u05e6\u05d5\u05ea \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05d5\u05e7\u05d5\u05d3 \u05e1\u05e4\u05d2\u05d8\u05d9.<\/p>\n\n\n\n<p>\u05d0\u05dd \u05db\u05da \u05e0\u05de\u05de\u05e9 Decorator.<\/p>\n\n\n\n<p>\u05d4\u05e9\u05dc\u05d1 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05dc\u05d9\u05e6\u05d5\u05e8 Abstract Class \u05e9\u05d9\u05d5\u05e8\u05e9 \u05de Humus<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic abstract class HumusDecorator : Humus\n<\/pre><\/div>\n\n\n<p>\u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e9\u05d3\u05d4 Protected \u05e9\u05dc Humus<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nprotected  Humus Humus;\n<\/pre><\/div>\n\n\n<p>\u05e0\u05d9\u05e6\u05d5\u05e8 Constructor \u05e9\u05de\u05e7\u05d1\u05dc Humus \u05d5\u05e0\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4\u05e9\u05d3\u05d4 \u05e9\u05dc\u05e0\u05d5.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nprotected HumusDecorator(Humus humus)\n{\n   Humus = humus;\n}\n<\/pre><\/div>\n\n\n<p>\u05db\u05e2\u05ea \u05e0\u05de\u05de\u05e9 \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05de\u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e8\u05d0\u05e9\u05d9 \u2013 Humus , \u05d0\u05d1\u05dc \u05dc\u05de\u05e2\u05e9\u05d4 \u05d4\u05de\u05d9\u05de\u05d5\u05e9 \u05d9\u05d4\u05d9\u05d4 \u05e8\u05e7 \u05d1\u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Humus \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5.<\/p>\n\n\n\n<p>\u05d4 Class \u05d1\u05e9\u05dc\u05de\u05d5\u05ea\u05d5 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic abstract class HumusDecorator : Humus\n{\n     protected  Humus Humus;\n\t \n     protected HumusDecorator(Humus humus)\n     {\n         Humus = humus;\n     }\n\n     public override string GetDescriotion()\n     {\n         return Humus.GetDescriotion();\n     }\n\n     public override double CalculateCost()\n     {\n         return Humus.CalculateCost();\n     }\n}\n<\/pre><\/div>\n\n\n<p>\u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05dc\u05db\u05dc \u05d0\u05d7\u05ea \u05de\u05d4\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05d5\u05d4\u05df \u05db\u05d5\u05dc\u05df \u05d9\u05e8\u05e9\u05d5 \u05de\u05d4Decorator .<\/p>\n\n\n\n<p>\u05d4\u05d4\u05d1\u05d3\u05dc \u05d1\u05d9\u05e0\u05d9\u05d4\u05dd \u05d9\u05d4\u05d9\u05d4 \u05d1\u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea.<\/p>\n\n\n\n<p>\u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da (\u05d0\u05d9\u05df \u05dc\u05d9 \u05d0\u05d7\u05e8\u05d9\u05d5\u05ea \u05e2\u05dc \u05d4\u05de\u05d7\u05d9\u05e8\u05d9\u05dd):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n public class Granules : HumusDecorator\n{\n    public Granules(Humus humus) : base(humus)\n    {\n        Description = &quot;Granules&quot;;\n    }\n\n    public override string GetDescriotion()\n    {\n       return string.Format(&quot;{0}, {1}&quot;, Humus.GetDescriotion(), Description);\n    }\n\n    public override double CalculateCost()\n    {\n        return Humus.CalculateCost() + 3.00;\n    }\n}\n\npublic class Tehina : HumusDecorator\n{\n\n    public Tehina(Humus humus)\n        : base(humus)\n    {\n        Description = &quot;Tehina&quot;;\n    }\n\n    public override string GetDescriotion()\n    {\n        return string.Format(&quot;{0}, {1}&quot;, Humus.GetDescriotion(), Description);\n    }\n\n    public override double CalculateCost()\n    {\n        return Humus.CalculateCost() + 2.00;\n    }\n}\n\npublic class Msabbaha : HumusDecorator\n{\n    public Msabbaha(Humus humus)\n        : base(humus)\n    {\n        Description = &quot;Msabbaha&quot;;\n    }\n\n    public override string GetDescriotion()\n    {\n        return string.Format(&quot;{0}, {1}&quot;, Humus.GetDescriotion(), Description);\n    }\n\n    public override double CalculateCost()\n    {\n        return Humus.CalculateCost() + 4.00;\n    }\n\n}\n<\/pre><\/div>\n\n\n<p>\u05ea\u05db\u05dc\u05e1 \u05d6\u05d4\u05d5.<\/p>\n\n\n\n<p>\u05d0\u05d6 \u05d0\u05d9\u05da \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1\u05d6\u05d4?<\/p>\n\n\n\n<p>\u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc \u05d4Humus \u05d4\u05e8\u05e6\u05d5\u05d9 \u05dc\u05e0\u05d5 (\u05e0\u05d2\u05d9\u05d3 PrivateHumes) \u05d0\u05da \u05d4\u05d5\u05d0 \u05d9\u05d4\u05d9\u05d4 \u05db\u05dc\u05dc\u05d9 (\u05db\u05dc\u05d5\u05de\u05e8 \u05de type Humus)<\/p>\n\n\n\n<p>\u05d5\u05dc\u05d0\u05d7\u05e8 \u05de\u05db\u05df \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9 \u05e9\u05dc \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05d4\u05e8\u05e6\u05d5\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05de\u05e7\u05d1\u05dc \u05d1 Constructor \u05d0\u05ea \u05d4 PrivateHumus \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05d5\u05d4\u05de\u05d5\u05e4\u05e2 \u05d9\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea MyHumus.<\/p>\n\n\n\n<p>\u05db\u05e2\u05ea \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05de\u05d4 \u05e9\u05e0\u05e8\u05e6\u05d4.<\/p>\n\n\n\n<p>\u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nHumus myHumus = new PrivateHumus();\n\nmyHumus = new Granules(myHumus);\n\nConsole.WriteLine(myHumus.GetDescriotion());\n\nConsole.WriteLine(myHumus.CalculateCost());\n<\/pre><\/div>\n\n\n<p>\u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05db\u05de\u05d5\u05d1\u05df \u05ea\u05d4\u05d9\u05d4 \u05db\u05de\u05e6\u05d5\u05e4\u05d4:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"548\" height=\"281\" src=\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png\" alt=\"\" class=\"wp-image-134\" srcset=\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png 548w, https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole-300x154.png 300w\" sizes=\"(max-width: 548px) 100vw, 548px\" \/><\/figure>\n\n\n\n<p><strong>\u05d3\u05d5\u05d2\u05de\u05d0 \u05d1&#8217; \u2013 Sealed Class<\/strong><\/p>\n\n\n\n<p>\u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d9\u05e9 \u05dc\u05d9 Sealed Class \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Interface.<\/p>\n\n\n\n<p>\u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic interface IDbHandler\n{\n   void HandelDb(string sql);\n}\n\npublic sealed class SqlHandler : IDbHandler\n{\n   public void HandelDb(string sql)\n   {\n        \/\/Do Some Work\n    }\n}\n<\/pre><\/div>\n\n\n<p>\u05d5\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic void Main()\n{\n    var db = new SqlHandler();\n    DoSomething(db);\n}\n\npublic void DoSomething(IDbHandler db)\n{\n    db.HandelDb(&quot;query&quot;);\n}\n<\/pre><\/div>\n\n\n<p>\u05e0\u05e9\u05d9\u05dd \u05dc\u05d1 \u05e9\u05d4\u05de\u05ea\u05d5\u05d3\u05d4 DoSomthing \u05dc\u05d0 \u05de\u05e7\u05d1\u05dc\u05ea \u05d3\u05d5\u05d5\u05e7\u05d0 \u05d0\u05ea \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9 \u05e9\u05dc\u05e0\u05d5 \u05d0\u05dc\u05d0 \u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4Interface.<\/p>\n\n\n\n<p>\u05d5\u05d1\u05db\u05df, \u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d3\u05dc\u05d9\u05e4\u05ea \u05d6\u05d9\u05db\u05e8\u05d5\u05df \u05d1\u05ea\u05d5\u05db\u05e0\u05d4.<\/p>\n\n\n\n<p>\u05d4\u05e9\u05ea\u05de\u05e9\u05e0\u05d5 \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Profiler \u05d5\u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d4\u05d1\u05e2\u05d9\u05d4 \u05d4\u05d9\u05d0 \u05d1\u05e7\u05dc\u05d0\u05e1 \u05e9\u05dc\u05e0\u05d5 \u2013 SqlHandler.<\/p>\n\n\n\n<p>\u05dc\u05e9\u05dd \u05d4\u05d1\u05d3\u05d9\u05e7\u05d4 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05db\u05dc sql \u05e9\u05de\u05d2\u05d9\u05e2 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 handelDb.<\/p>\n\n\n\n<p>\u05e0\u05d9\u05e6\u05d5\u05e8 Decorator \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d6\u05d4:<\/p>\n\n\n\n<p>\u05e0\u05d9\u05e6\u05d5\u05e8 Class \u05d7\u05d3\u05e9 \u05d0\u05e9\u05e8 \u05d0\u05e3 \u05d4\u05d5\u05d0 \u05de\u05de\u05de\u05e9 \u05d0\u05ea IDbHandler \u05d5\u05e0\u05d3\u05d0\u05d2 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d5 \u05e9\u05d3\u05d4 Protected \u05de\u05e1\u05d5\u05d2 IDbHandler \u05d5\u05e9\u05e9\u05d3\u05d4 \u05d6\u05d4 \u05de\u05d0\u05d5\u05ea\u05d7\u05dc \u05d1 Constructor .<\/p>\n\n\n\n<p>\u05d1\u05de\u05ea\u05d5\u05d3\u05d4 HandelDb \u05e0\u05e2\u05e9\u05d4 \u05e9\u05e0\u05d9 \u05d3\u05d1\u05e8\u05d9\u05dd<\/p>\n\n\n\n<p>\u05d0. \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05e9\u05dc\u05e0\u05d5 \u2013 \u05d4\u05d3\u05e4\u05e1\u05ea \u05d4 sql.<\/p>\n\n\n\n<p>\u05d1. \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9\u05ea \u05de\u05ea\u05d5\u05da \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9.<\/p>\n\n\n\n<p>\u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic class SqlDecorator : IDbHandler\n{\n    protected IDbHandler DbHandler { get; set; }\n    public SqlDecorator(IDbHandler db)\n    {\n        DbHandler = db;\n    }\n\n    public void HandelDb(string sql)\n    {\n        Console.WriteLine(sql);\n        DbHandler.HandelDb(sql);\n    }\n}\n<\/pre><\/div>\n\n\n<p>\u05db\u05e2\u05ea \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05d9\u05d4\u05d9\u05d4 \u05db\u05de\u05e2\u05d8 \u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05d5\u05d9\u05e8\u05d0\u05d4 \u05db\u05da \u2013<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic void Main()\n{\n    IDbHandler db = new SqlHandler();\n    var decorator = new SqlDecorator(db);\n\n    DoSomething(decorator);\n}\n\npublic void DoSomething(IDbHandler db)\n{\n    db.HandelDb(&quot;query&quot;);\n}\n<\/pre><\/div>\n\n\n<p>\u05e0\u05e8\u05d5\u05d5\u05d9\u05d7 \u05d4\u05d3\u05e4\u05e1\u05d4 \u05e9\u05dc \u05db\u05dc sql \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5 \u05de\u05d1\u05dc\u05d9 \u05dc\u05d4\u05e4\u05e8\u05d9\u05e2 \u05dc\u05e2\u05d1\u05d5\u05d3\u05d4 \u05d4\u05e1\u05d3\u05d9\u05e8\u05d4 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e2\u05dc \u05e4\u05d9 \u05d4\u05de\u05d4\u05dc\u05da \u05d4\u05de\u05e7\u05d5\u05e8\u05d9.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><u>\u05d8\u05d9\u05e4<\/u><\/strong>: \u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05d5\u05d1\u05d3\u05d5\u05de\u05d9\u05dd \u05dc\u05d5 \u05d9\u05e9\u05e0\u05d4 \u05d3\u05e8\u05da \u05e0\u05d5\u05e1\u05e4\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1 \u05e7\u05d9\u05d9\u05dd \u05d5\u05d6\u05d4 \u05e2\u05dc \u05d9\u05d3\u05d9 Extension Methods<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"367\" height=\"261\" src=\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/1_thumb.png\" alt=\"\" class=\"wp-image-137\" srcset=\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/1_thumb.png 367w, https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/1_thumb-300x213.png 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u05d1\u05e4\u05d5\u05e1\u05d8 \u05d6\u05d4 \u05d0\u05d3\u05d2\u05d9\u05dd \u05e9\u05e0\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05e0\u05e4\u05d5\u05e6\u05d9\u05dd \u05d1\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1 Decorator. Decorator \u05d4\u05d9\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d3\u05d9 \u05e0\u05e4\u05d5\u05e6\u05d4 \u05d5\u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05ea \u05d1\u05d9\u05d5\u05ea\u05e8. \u05d4\u05d9\u05d0 \u05de\u05d0\u05e4\u05e9\u05e8 \u05d4\u05d5\u05e1\u05e4\u05ea \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05e7\u05d9\u05d9\u05dd \u05d1\u05e6\u05d5\u05e8\u05d4 \u05d3\u05d9\u05e0\u05d0\u05de\u05d9\u05ea, \u05de\u05d1\u05dc\u05d9 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05d6\u05d5 \u05de\u05d5\u05e0\u05e2\u05ea \u05d9\u05e8\u05d5\u05e9\u05d4 \u05de\u05d9\u05d5\u05ea\u05e8\u05ea \u05d0\u05d5 \u05e4\u05d5\u05ea\u05e8\u05ea \u05de\u05e7\u05e8\u05d9\u05dd \u05d1\u05d4\u05dd \u05d0\u05d9\u05df \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d9\u05e8\u05d5\u05e9\u05d4 \u05d1\u05db\u05dc\u05dc (Sealed). \u05e2\u05d5\u05d3 \u05d3\u05d1\u05e8 \u05e9\u05e0\u05d9\u05ea\u05df \u05dc\u05d5\u05de\u05e8 \u05e2\u05dc \u05ea\u05d1\u05e0\u05d9\u05ea \u05d6\u05d5 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05d9\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc Open Closed Principle&#8211; \u05e2\u05d9\u05e7\u05e8\u05d5\u05df \u05d6\u05d4 \u05e9\u05dc \u05ea\u05db\u05e0\u05d5\u05ea \u05de\u05d5\u05e0\u05d7\u05d4 \u05e2\u05e6\u05de\u05d9\u05dd \u05d0\u05d5\u05de\u05e8 \u05e9Class \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d9\u05d5\u05ea \u05e4\u05ea\u05d5\u05d7 \u05dc\u05d4\u05e8\u05d7\u05d1\u05d4, \u05d0\u05d1\u05dc \u05e1\u05d2\u05d5\u05e8 \u05dc\u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd. \u05db\u05dc\u05d5\u05de\u05e8, \u05e1\u05d1\u05d9\u05e8 \u05dc\u05d4\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d5\u05e9\u05e7\u05e2\u05d4 \u05de\u05d7\u05e9\u05d1\u05d4 \u05e8\u05d1\u05d4 \u05e2\u05dc \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d4Class \u05e9\u05dc\u05e0\u05d5, \u05d5\u05dc\u05db\u05df \u05dc\u05d0 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05d5\u05ea\u05d5. \u05d0\u05da \u05de\u05e6\u05d3 \u05e9\u05e0\u05d9 \u05d9\u05ea\u05db\u05df \u05de\u05e6\u05d1 \u05e9\u05de\u05d9\u05e9\u05d4\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 \u05e9\u05dc\u05d1 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1. \u05de\u05e7\u05e8\u05d4 \u05e0\u05d5\u05e1\u05e3 \u05e9\u05d1\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1 Decorator \u05d4\u05d5\u05d0 \u05db\u05d0\u05e9\u05e8 \u05d9\u05e9 \u05e7\u05d5\u05d3 \u05d9\u05e9\u05df (\u05d4\u05d9\u05d3\u05d5\u05e2 \u05d1\u05db\u05d9\u05e0\u05d5\u05d9\u05d5 Legacy Code) \u05e9\u05de\u05e1\u05d5\u05d1\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d5\u05d1\u05db\u05dc\u05dc \u05dc\u05d0 \u05de\u05ea\u05d7\u05e9\u05e7 \u05dc\u05d2\u05e2\u05ea \u05d1\u05d5, \u05d0\u05da \u05dc\u05e2\u05d9\u05ea\u05d9\u05dd \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea. \u05d4 Decorator \u05de\u05d5\u05e8\u05db\u05d1 \u05de\u05d0\u05e8\u05d1\u05e2\u05d4 \u05d7\u05dc\u05e7\u05d9\u05dd \u05e2\u05d9\u05e7\u05e8\u05d9\u05d9\u05dd (\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e6\u05de\u05e6\u05dd \u05d0\u05ea \u05d7\u05dc\u05e7\u05dd \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05de\u05e7\u05e8\u05d4 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9): \u05d0. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05d4 Component \u2013 \u05d6\u05d4\u05d5 abstract class \u05d0\u05d5 Interface \u05e9\u05d0\u05ea \u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4 \u05de\u05de\u05d9\u05de\u05d5\u05e9\u05d9\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea. \u05d1. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05e0\u05d9 \u05d4\u05d5\u05d0 \u05d4 Concrete Component \u2013 \u05d6\u05d4\u05d5 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05e9\u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05d0\u05d5 \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4 Component. \u05d2. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05dc\u05d9\u05e9\u05d9 \u05d4\u05d5\u05d0 \u05d4 Decorator \u2013 \u05d6\u05d4\u05d5 abstract class \u05e9\u05d2\u05dd \u05d4\u05d5\u05d0 \u05db\u05de\u05d5 \u05d4 Concrete Component \u05d9\u05d5\u05e8\u05e9 \u05de\u05d4 Component . \u05d4\u05de\u05d0\u05e4\u05d9\u05d9\u05df \u05d0\u05ea \u05d4 Decorator \u05d4\u05d5\u05d0 \u05e9\u05d9\u05e9 \u05dc\u05d5 Protected Member \u05de\u05d4\u05e1\u05d5\u05d2 \u05e9\u05dc \u05d4Component \u05d5\u05e9\u05d1 Constructor \u05e9\u05dc\u05d5 \u05d4\u05d5\u05d0 \u05de\u05e7\u05d1\u05dc \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Component \u05db\u05dc\u05e9\u05d4\u05d5 \u05d5\u05de\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4 Member (\u05ea\u05d9\u05db\u05e3 \u05ea\u05d1\u05d5\u05d0 \u05d4\u05d3\u05d5\u05d2\u05de\u05d0). \u05d3. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d1\u05d9\u05e2\u05d9 \u05d4\u05d5\u05d0 Concrete Decorator \u2013 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05d0\u05e9\u05e8 \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05d4 Decorator, \u05de\u05d5\u05e1\u05d9\u05e4\u05d9\u05dd \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05de\u05e9\u05dc \u05e2\u05e6\u05de\u05dd \u05d5\u05db\u05de\u05d5\u05d1\u05df \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05d4\u05d1\u05e1\u05d9\u05e1\u05d9\u05ea, \u05d5\u05d6\u05d0\u05ea \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05d4\u05ea\u05e7\u05d1\u05dc \u05d1Constructor. \u05d3\u05d5\u05d2\u05de\u05d0 \u05d0 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d7\u05d5\u05de\u05d5\u05e1\u05d9\u05d4 &#8220;\u05de\u05e1\u05d1\u05d4-\u05e4\u05d5\u05dc&#8221; (\u05d1\u05df \u05d2\u05d5\u05e8\u05d9\u05d5\u05df 18 \u05d1\u05e8\u05de\u05ea \u05d2\u05df, \u05dc\u05de\u05d9 \u05e9\u05de\u05ea\u05e2\u05e0\u05d9\u05d9\u05df \u2013 \u05ea\u05d1\u05e7\u05e9\u05d5 \u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea) \u05e4\u05e0\u05d5 \u05d0\u05dc\u05d9 \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d1\u05d4 \u05d4\u05dd \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05dc\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc\u05ea\u05e4\u05e8\u05d9\u05d8\u05d9\u05dd \u05d4\u05de\u05e2\u05d5\u05d3\u05db\u05e0\u05d9\u05dd \u05e9\u05dc\u05d4\u05dd \u05d5\u05d4\u05dd \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05ea\u05d0\u05d9\u05dd \u05d0\u05d5\u05ea\u05d4. \u05db\u05e8\u05d2\u05e2 \u05d4\u05de\u05e6\u05d1 \u05d4\u05d5\u05d0 \u05db\u05d6\u05d4 \u2013 \u05d1\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05dc\u05d4\u05dd \u05d9\u05e9 \u05e9\u05dc\u05d5\u05e9\u05d4 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd: \u05d7\u05d5\u05de\u05d5\u05e1 \u05e4\u05e8\u05d8\u05d9, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d6\u05d5\u05d2\u05d9, \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e9\u05e4\u05d7\u05ea\u05d9 \u2013 \u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05e7\u05dc\u05d0\u05e1 &#8220;\u05d7\u05d5\u05de\u05d5\u05e1&#8221; \u05db\u05de\u05d5\u05d1\u05df \u05d5\u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05de\u05de\u05e9\u05d9\u05dd GetDescription \u05d5 CalculateCost. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05de\u05d4 \u05e9\u05e7\u05e8\u05d4 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05dd \u05d2\u05d9\u05dc\u05d5 \u05e9\u05d4\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05d4\u05dd \u05de\u05e2\u05d3\u05d9\u05e4\u05d9\u05dd \u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e2\u05dc \u05d4\u05d7\u05d5\u05de\u05d5\u05e1 \u05e9\u05dc\u05d4\u05dd, \u05d0\u05d6 \u05d4\u05dd \u05d4\u05ea\u05d7\u05d9\u05dc\u05d5 \u05dc\u05d4\u05d2\u05d9\u05e9 \u05d7\u05d5\u05de\u05d5\u05e1 \u05d2\u05e8\u05d2\u05d9\u05e8\u05d9\u05dd, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d8\u05d7\u05d9\u05e0\u05d4 \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e1\u05d1\u05d7\u05d4. \u05d0\u05dd \u05db\u05da \u05de\u05d4 \u05e6\u05e8\u05d9\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d1\u05ea\u05d5\u05db\u05e0\u05d4? \u05d0\u05dd \u05e0\u05ea\u05d7\u05d9\u05dc \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e7\u05dc\u05d0\u05e1 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3 \u05d5\u05d6\u05d4 \u05d1\u05d4\u05ea\u05d0\u05de\u05d4 \u05dc\u05d2\u05d5\u05d3\u05dc \u05d4\u05de\u05e0\u05d4, \u05d6\u05d4 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da FamilyHumusWithTehini, DualHumusWithTehini, PrivateHumusWithTehini \u05d5\u05db\u05d5&#8217; \u05d5\u05db\u05d5&#8217;\u2026 \u05d5\u05db\u05da \u05d4\u05dc\u05d0\u05d4 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3. \u05d5\u05de\u05d4 \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05e9\u05dc\u05d1 (\u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea \u05db\u05d6\u05db\u05d5\u05e8)? \u05d5\u05de\u05d4 \u05d0\u05dd \u05de\u05d7\u05e8 \u05d4\u05dd \u05d9\u05e8\u05e6\u05d5 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d2\u05dd \u05e4\u05d5\u05dc? \u05ea\u05d4\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05ea\u05e4\u05d5\u05e6\u05e6\u05d5\u05ea \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05d5\u05e7\u05d5\u05d3 \u05e1\u05e4\u05d2\u05d8\u05d9. \u05d0\u05dd \u05db\u05da \u05e0\u05de\u05de\u05e9 Decorator. \u05d4\u05e9\u05dc\u05d1 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05dc\u05d9\u05e6\u05d5\u05e8 Abstract Class \u05e9\u05d9\u05d5\u05e8\u05e9 \u05de Humus \u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e9\u05d3\u05d4 Protected \u05e9\u05dc Humus \u05e0\u05d9\u05e6\u05d5\u05e8 Constructor \u05e9\u05de\u05e7\u05d1\u05dc Humus \u05d5\u05e0\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4\u05e9\u05d3\u05d4 \u05e9\u05dc\u05e0\u05d5. \u05db\u05e2\u05ea \u05e0\u05de\u05de\u05e9 \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05de\u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e8\u05d0\u05e9\u05d9 \u2013 Humus , \u05d0\u05d1\u05dc \u05dc\u05de\u05e2\u05e9\u05d4 \u05d4\u05de\u05d9\u05de\u05d5\u05e9 \u05d9\u05d4\u05d9\u05d4 \u05e8\u05e7 \u05d1\u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Humus \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5. \u05d4 Class \u05d1\u05e9\u05dc\u05de\u05d5\u05ea\u05d5 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05dc\u05db\u05dc \u05d0\u05d7\u05ea \u05de\u05d4\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05d5\u05d4\u05df \u05db\u05d5\u05dc\u05df \u05d9\u05e8\u05e9\u05d5 \u05de\u05d4Decorator . \u05d4\u05d4\u05d1\u05d3\u05dc \u05d1\u05d9\u05e0\u05d9\u05d4\u05dd \u05d9\u05d4\u05d9\u05d4 \u05d1\u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da (\u05d0\u05d9\u05df \u05dc\u05d9 \u05d0\u05d7\u05e8\u05d9\u05d5\u05ea \u05e2\u05dc \u05d4\u05de\u05d7\u05d9\u05e8\u05d9\u05dd): \u05ea\u05db\u05dc\u05e1 \u05d6\u05d4\u05d5. \u05d0\u05d6 \u05d0\u05d9\u05da \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1\u05d6\u05d4? \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc \u05d4Humus \u05d4\u05e8\u05e6\u05d5\u05d9 \u05dc\u05e0\u05d5 (\u05e0\u05d2\u05d9\u05d3 PrivateHumes) \u05d0\u05da \u05d4\u05d5\u05d0 \u05d9\u05d4\u05d9\u05d4 \u05db\u05dc\u05dc\u05d9 (\u05db\u05dc\u05d5\u05de\u05e8 \u05de type Humus) \u05d5\u05dc\u05d0\u05d7\u05e8 \u05de\u05db\u05df \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9 \u05e9\u05dc \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05d4\u05e8\u05e6\u05d5\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05de\u05e7\u05d1\u05dc \u05d1 Constructor \u05d0\u05ea \u05d4 PrivateHumus \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05d5\u05d4\u05de\u05d5\u05e4\u05e2 \u05d9\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea MyHumus. \u05db\u05e2\u05ea \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05de\u05d4 \u05e9\u05e0\u05e8\u05e6\u05d4. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da: \u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05db\u05de\u05d5\u05d1\u05df \u05ea\u05d4\u05d9\u05d4 \u05db\u05de\u05e6\u05d5\u05e4\u05d4: \u05d3\u05d5\u05d2\u05de\u05d0 \u05d1&#8217; \u2013 Sealed Class \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d9\u05e9 \u05dc\u05d9 Sealed Class \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Interface. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05d5\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05e0\u05e9\u05d9\u05dd \u05dc\u05d1 \u05e9\u05d4\u05de\u05ea\u05d5\u05d3\u05d4 DoSomthing \u05dc\u05d0 \u05de\u05e7\u05d1\u05dc\u05ea \u05d3\u05d5\u05d5\u05e7\u05d0 \u05d0\u05ea \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9 \u05e9\u05dc\u05e0\u05d5 \u05d0\u05dc\u05d0 \u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4Interface. \u05d5\u05d1\u05db\u05df, \u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d3\u05dc\u05d9\u05e4\u05ea \u05d6\u05d9\u05db\u05e8\u05d5\u05df \u05d1\u05ea\u05d5\u05db\u05e0\u05d4. \u05d4\u05e9\u05ea\u05de\u05e9\u05e0\u05d5 \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Profiler \u05d5\u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d4\u05d1\u05e2\u05d9\u05d4 \u05d4\u05d9\u05d0 \u05d1\u05e7\u05dc\u05d0\u05e1 \u05e9\u05dc\u05e0\u05d5 \u2013 SqlHandler. \u05dc\u05e9\u05dd \u05d4\u05d1\u05d3\u05d9\u05e7\u05d4 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05db\u05dc sql \u05e9\u05de\u05d2\u05d9\u05e2 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 handelDb. \u05e0\u05d9\u05e6\u05d5\u05e8 Decorator \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d6\u05d4: \u05e0\u05d9\u05e6\u05d5\u05e8 Class \u05d7\u05d3\u05e9 \u05d0\u05e9\u05e8 \u05d0\u05e3 \u05d4\u05d5\u05d0 \u05de\u05de\u05de\u05e9 \u05d0\u05ea IDbHandler \u05d5\u05e0\u05d3\u05d0\u05d2 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d5 \u05e9\u05d3\u05d4 Protected \u05de\u05e1\u05d5\u05d2 IDbHandler \u05d5\u05e9\u05e9\u05d3\u05d4 \u05d6\u05d4 \u05de\u05d0\u05d5\u05ea\u05d7\u05dc \u05d1 Constructor . \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 HandelDb \u05e0\u05e2\u05e9\u05d4 \u05e9\u05e0\u05d9 \u05d3\u05d1\u05e8\u05d9\u05dd \u05d0. \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05e9\u05dc\u05e0\u05d5 \u2013 \u05d4\u05d3\u05e4\u05e1\u05ea \u05d4 sql. \u05d1. \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9\u05ea \u05de\u05ea\u05d5\u05da \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da: \u05db\u05e2\u05ea \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05d9\u05d4\u05d9\u05d4 \u05db\u05de\u05e2\u05d8 \u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05d5\u05d9\u05e8\u05d0\u05d4 \u05db\u05da \u2013 \u05e0\u05e8\u05d5\u05d5\u05d9\u05d7 \u05d4\u05d3\u05e4\u05e1\u05d4 \u05e9\u05dc \u05db\u05dc sql \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5 \u05de\u05d1\u05dc\u05d9 \u05dc\u05d4\u05e4\u05e8\u05d9\u05e2 \u05dc\u05e2\u05d1\u05d5\u05d3\u05d4 \u05d4\u05e1\u05d3\u05d9\u05e8\u05d4 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e2\u05dc \u05e4\u05d9 \u05d4\u05de\u05d4\u05dc\u05da \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d8\u05d9\u05e4: \u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05d5\u05d1\u05d3\u05d5\u05de\u05d9\u05dd \u05dc\u05d5 \u05d9\u05e9\u05e0\u05d4 \u05d3\u05e8\u05da \u05e0\u05d5\u05e1\u05e4\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1 \u05e7\u05d9\u05d9\u05dd \u05d5\u05d6\u05d4 \u05e2\u05dc \u05d9\u05d3\u05d9 Extension Methods<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,1],"tags":[9,5,3],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-designpatterns","category-solid","tag-decorator","tag-design-patterns","tag-dev"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Decorator - Design for Living<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hernan-yehuda.net\/?p=124\" \/>\n<meta property=\"og:locale\" content=\"he_IL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Decorator - Design for Living\" \/>\n<meta property=\"og:description\" content=\"\u05d1\u05e4\u05d5\u05e1\u05d8 \u05d6\u05d4 \u05d0\u05d3\u05d2\u05d9\u05dd \u05e9\u05e0\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05e0\u05e4\u05d5\u05e6\u05d9\u05dd \u05d1\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1 Decorator. Decorator \u05d4\u05d9\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d3\u05d9 \u05e0\u05e4\u05d5\u05e6\u05d4 \u05d5\u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05ea \u05d1\u05d9\u05d5\u05ea\u05e8. \u05d4\u05d9\u05d0 \u05de\u05d0\u05e4\u05e9\u05e8 \u05d4\u05d5\u05e1\u05e4\u05ea \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05e7\u05d9\u05d9\u05dd \u05d1\u05e6\u05d5\u05e8\u05d4 \u05d3\u05d9\u05e0\u05d0\u05de\u05d9\u05ea, \u05de\u05d1\u05dc\u05d9 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05d6\u05d5 \u05de\u05d5\u05e0\u05e2\u05ea \u05d9\u05e8\u05d5\u05e9\u05d4 \u05de\u05d9\u05d5\u05ea\u05e8\u05ea \u05d0\u05d5 \u05e4\u05d5\u05ea\u05e8\u05ea \u05de\u05e7\u05e8\u05d9\u05dd \u05d1\u05d4\u05dd \u05d0\u05d9\u05df \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d9\u05e8\u05d5\u05e9\u05d4 \u05d1\u05db\u05dc\u05dc (Sealed). \u05e2\u05d5\u05d3 \u05d3\u05d1\u05e8 \u05e9\u05e0\u05d9\u05ea\u05df \u05dc\u05d5\u05de\u05e8 \u05e2\u05dc \u05ea\u05d1\u05e0\u05d9\u05ea \u05d6\u05d5 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05d9\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc Open Closed Principle&#8211; \u05e2\u05d9\u05e7\u05e8\u05d5\u05df \u05d6\u05d4 \u05e9\u05dc \u05ea\u05db\u05e0\u05d5\u05ea \u05de\u05d5\u05e0\u05d7\u05d4 \u05e2\u05e6\u05de\u05d9\u05dd \u05d0\u05d5\u05de\u05e8 \u05e9Class \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d9\u05d5\u05ea \u05e4\u05ea\u05d5\u05d7 \u05dc\u05d4\u05e8\u05d7\u05d1\u05d4, \u05d0\u05d1\u05dc \u05e1\u05d2\u05d5\u05e8 \u05dc\u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd. \u05db\u05dc\u05d5\u05de\u05e8, \u05e1\u05d1\u05d9\u05e8 \u05dc\u05d4\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d5\u05e9\u05e7\u05e2\u05d4 \u05de\u05d7\u05e9\u05d1\u05d4 \u05e8\u05d1\u05d4 \u05e2\u05dc \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d4Class \u05e9\u05dc\u05e0\u05d5, \u05d5\u05dc\u05db\u05df \u05dc\u05d0 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05d5\u05ea\u05d5. \u05d0\u05da \u05de\u05e6\u05d3 \u05e9\u05e0\u05d9 \u05d9\u05ea\u05db\u05df \u05de\u05e6\u05d1 \u05e9\u05de\u05d9\u05e9\u05d4\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 \u05e9\u05dc\u05d1 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1. \u05de\u05e7\u05e8\u05d4 \u05e0\u05d5\u05e1\u05e3 \u05e9\u05d1\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1 Decorator \u05d4\u05d5\u05d0 \u05db\u05d0\u05e9\u05e8 \u05d9\u05e9 \u05e7\u05d5\u05d3 \u05d9\u05e9\u05df (\u05d4\u05d9\u05d3\u05d5\u05e2 \u05d1\u05db\u05d9\u05e0\u05d5\u05d9\u05d5 Legacy Code) \u05e9\u05de\u05e1\u05d5\u05d1\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d5\u05d1\u05db\u05dc\u05dc \u05dc\u05d0 \u05de\u05ea\u05d7\u05e9\u05e7 \u05dc\u05d2\u05e2\u05ea \u05d1\u05d5, \u05d0\u05da \u05dc\u05e2\u05d9\u05ea\u05d9\u05dd \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea. \u05d4 Decorator \u05de\u05d5\u05e8\u05db\u05d1 \u05de\u05d0\u05e8\u05d1\u05e2\u05d4 \u05d7\u05dc\u05e7\u05d9\u05dd \u05e2\u05d9\u05e7\u05e8\u05d9\u05d9\u05dd (\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e6\u05de\u05e6\u05dd \u05d0\u05ea \u05d7\u05dc\u05e7\u05dd \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05de\u05e7\u05e8\u05d4 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9): \u05d0. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05d4 Component \u2013 \u05d6\u05d4\u05d5 abstract class \u05d0\u05d5 Interface \u05e9\u05d0\u05ea \u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4 \u05de\u05de\u05d9\u05de\u05d5\u05e9\u05d9\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea. \u05d1. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05e0\u05d9 \u05d4\u05d5\u05d0 \u05d4 Concrete Component \u2013 \u05d6\u05d4\u05d5 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05e9\u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05d0\u05d5 \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4 Component. \u05d2. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05dc\u05d9\u05e9\u05d9 \u05d4\u05d5\u05d0 \u05d4 Decorator \u2013 \u05d6\u05d4\u05d5 abstract class \u05e9\u05d2\u05dd \u05d4\u05d5\u05d0 \u05db\u05de\u05d5 \u05d4 Concrete Component \u05d9\u05d5\u05e8\u05e9 \u05de\u05d4 Component . \u05d4\u05de\u05d0\u05e4\u05d9\u05d9\u05df \u05d0\u05ea \u05d4 Decorator \u05d4\u05d5\u05d0 \u05e9\u05d9\u05e9 \u05dc\u05d5 Protected Member \u05de\u05d4\u05e1\u05d5\u05d2 \u05e9\u05dc \u05d4Component \u05d5\u05e9\u05d1 Constructor \u05e9\u05dc\u05d5 \u05d4\u05d5\u05d0 \u05de\u05e7\u05d1\u05dc \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Component \u05db\u05dc\u05e9\u05d4\u05d5 \u05d5\u05de\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4 Member (\u05ea\u05d9\u05db\u05e3 \u05ea\u05d1\u05d5\u05d0 \u05d4\u05d3\u05d5\u05d2\u05de\u05d0). \u05d3. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d1\u05d9\u05e2\u05d9 \u05d4\u05d5\u05d0 Concrete Decorator \u2013 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05d0\u05e9\u05e8 \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05d4 Decorator, \u05de\u05d5\u05e1\u05d9\u05e4\u05d9\u05dd \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05de\u05e9\u05dc \u05e2\u05e6\u05de\u05dd \u05d5\u05db\u05de\u05d5\u05d1\u05df \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05d4\u05d1\u05e1\u05d9\u05e1\u05d9\u05ea, \u05d5\u05d6\u05d0\u05ea \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05d4\u05ea\u05e7\u05d1\u05dc \u05d1Constructor. \u05d3\u05d5\u05d2\u05de\u05d0 \u05d0 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d7\u05d5\u05de\u05d5\u05e1\u05d9\u05d4 &#8220;\u05de\u05e1\u05d1\u05d4-\u05e4\u05d5\u05dc&#8221; (\u05d1\u05df \u05d2\u05d5\u05e8\u05d9\u05d5\u05df 18 \u05d1\u05e8\u05de\u05ea \u05d2\u05df, \u05dc\u05de\u05d9 \u05e9\u05de\u05ea\u05e2\u05e0\u05d9\u05d9\u05df \u2013 \u05ea\u05d1\u05e7\u05e9\u05d5 \u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea) \u05e4\u05e0\u05d5 \u05d0\u05dc\u05d9 \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d1\u05d4 \u05d4\u05dd \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05dc\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc\u05ea\u05e4\u05e8\u05d9\u05d8\u05d9\u05dd \u05d4\u05de\u05e2\u05d5\u05d3\u05db\u05e0\u05d9\u05dd \u05e9\u05dc\u05d4\u05dd \u05d5\u05d4\u05dd \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05ea\u05d0\u05d9\u05dd \u05d0\u05d5\u05ea\u05d4. \u05db\u05e8\u05d2\u05e2 \u05d4\u05de\u05e6\u05d1 \u05d4\u05d5\u05d0 \u05db\u05d6\u05d4 \u2013 \u05d1\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05dc\u05d4\u05dd \u05d9\u05e9 \u05e9\u05dc\u05d5\u05e9\u05d4 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd: \u05d7\u05d5\u05de\u05d5\u05e1 \u05e4\u05e8\u05d8\u05d9, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d6\u05d5\u05d2\u05d9, \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e9\u05e4\u05d7\u05ea\u05d9 \u2013 \u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05e7\u05dc\u05d0\u05e1 &#8220;\u05d7\u05d5\u05de\u05d5\u05e1&#8221; \u05db\u05de\u05d5\u05d1\u05df \u05d5\u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05de\u05de\u05e9\u05d9\u05dd GetDescription \u05d5 CalculateCost. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05de\u05d4 \u05e9\u05e7\u05e8\u05d4 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05dd \u05d2\u05d9\u05dc\u05d5 \u05e9\u05d4\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05d4\u05dd \u05de\u05e2\u05d3\u05d9\u05e4\u05d9\u05dd \u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e2\u05dc \u05d4\u05d7\u05d5\u05de\u05d5\u05e1 \u05e9\u05dc\u05d4\u05dd, \u05d0\u05d6 \u05d4\u05dd \u05d4\u05ea\u05d7\u05d9\u05dc\u05d5 \u05dc\u05d4\u05d2\u05d9\u05e9 \u05d7\u05d5\u05de\u05d5\u05e1 \u05d2\u05e8\u05d2\u05d9\u05e8\u05d9\u05dd, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d8\u05d7\u05d9\u05e0\u05d4 \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e1\u05d1\u05d7\u05d4. \u05d0\u05dd \u05db\u05da \u05de\u05d4 \u05e6\u05e8\u05d9\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d1\u05ea\u05d5\u05db\u05e0\u05d4? \u05d0\u05dd \u05e0\u05ea\u05d7\u05d9\u05dc \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e7\u05dc\u05d0\u05e1 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3 \u05d5\u05d6\u05d4 \u05d1\u05d4\u05ea\u05d0\u05de\u05d4 \u05dc\u05d2\u05d5\u05d3\u05dc \u05d4\u05de\u05e0\u05d4, \u05d6\u05d4 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da FamilyHumusWithTehini, DualHumusWithTehini, PrivateHumusWithTehini \u05d5\u05db\u05d5&#8217; \u05d5\u05db\u05d5&#8217;\u2026 \u05d5\u05db\u05da \u05d4\u05dc\u05d0\u05d4 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3. \u05d5\u05de\u05d4 \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05e9\u05dc\u05d1 (\u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea \u05db\u05d6\u05db\u05d5\u05e8)? \u05d5\u05de\u05d4 \u05d0\u05dd \u05de\u05d7\u05e8 \u05d4\u05dd \u05d9\u05e8\u05e6\u05d5 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d2\u05dd \u05e4\u05d5\u05dc? \u05ea\u05d4\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05ea\u05e4\u05d5\u05e6\u05e6\u05d5\u05ea \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05d5\u05e7\u05d5\u05d3 \u05e1\u05e4\u05d2\u05d8\u05d9. \u05d0\u05dd \u05db\u05da \u05e0\u05de\u05de\u05e9 Decorator. \u05d4\u05e9\u05dc\u05d1 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05dc\u05d9\u05e6\u05d5\u05e8 Abstract Class \u05e9\u05d9\u05d5\u05e8\u05e9 \u05de Humus \u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e9\u05d3\u05d4 Protected \u05e9\u05dc Humus \u05e0\u05d9\u05e6\u05d5\u05e8 Constructor \u05e9\u05de\u05e7\u05d1\u05dc Humus \u05d5\u05e0\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4\u05e9\u05d3\u05d4 \u05e9\u05dc\u05e0\u05d5. \u05db\u05e2\u05ea \u05e0\u05de\u05de\u05e9 \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05de\u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e8\u05d0\u05e9\u05d9 \u2013 Humus , \u05d0\u05d1\u05dc \u05dc\u05de\u05e2\u05e9\u05d4 \u05d4\u05de\u05d9\u05de\u05d5\u05e9 \u05d9\u05d4\u05d9\u05d4 \u05e8\u05e7 \u05d1\u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Humus \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5. \u05d4 Class \u05d1\u05e9\u05dc\u05de\u05d5\u05ea\u05d5 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05dc\u05db\u05dc \u05d0\u05d7\u05ea \u05de\u05d4\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05d5\u05d4\u05df \u05db\u05d5\u05dc\u05df \u05d9\u05e8\u05e9\u05d5 \u05de\u05d4Decorator . \u05d4\u05d4\u05d1\u05d3\u05dc \u05d1\u05d9\u05e0\u05d9\u05d4\u05dd \u05d9\u05d4\u05d9\u05d4 \u05d1\u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da (\u05d0\u05d9\u05df \u05dc\u05d9 \u05d0\u05d7\u05e8\u05d9\u05d5\u05ea \u05e2\u05dc \u05d4\u05de\u05d7\u05d9\u05e8\u05d9\u05dd): \u05ea\u05db\u05dc\u05e1 \u05d6\u05d4\u05d5. \u05d0\u05d6 \u05d0\u05d9\u05da \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1\u05d6\u05d4? \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc \u05d4Humus \u05d4\u05e8\u05e6\u05d5\u05d9 \u05dc\u05e0\u05d5 (\u05e0\u05d2\u05d9\u05d3 PrivateHumes) \u05d0\u05da \u05d4\u05d5\u05d0 \u05d9\u05d4\u05d9\u05d4 \u05db\u05dc\u05dc\u05d9 (\u05db\u05dc\u05d5\u05de\u05e8 \u05de type Humus) \u05d5\u05dc\u05d0\u05d7\u05e8 \u05de\u05db\u05df \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9 \u05e9\u05dc \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05d4\u05e8\u05e6\u05d5\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05de\u05e7\u05d1\u05dc \u05d1 Constructor \u05d0\u05ea \u05d4 PrivateHumus \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05d5\u05d4\u05de\u05d5\u05e4\u05e2 \u05d9\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea MyHumus. \u05db\u05e2\u05ea \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05de\u05d4 \u05e9\u05e0\u05e8\u05e6\u05d4. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da: \u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05db\u05de\u05d5\u05d1\u05df \u05ea\u05d4\u05d9\u05d4 \u05db\u05de\u05e6\u05d5\u05e4\u05d4: \u05d3\u05d5\u05d2\u05de\u05d0 \u05d1&#8217; \u2013 Sealed Class \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d9\u05e9 \u05dc\u05d9 Sealed Class \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Interface. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05d5\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05e0\u05e9\u05d9\u05dd \u05dc\u05d1 \u05e9\u05d4\u05de\u05ea\u05d5\u05d3\u05d4 DoSomthing \u05dc\u05d0 \u05de\u05e7\u05d1\u05dc\u05ea \u05d3\u05d5\u05d5\u05e7\u05d0 \u05d0\u05ea \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9 \u05e9\u05dc\u05e0\u05d5 \u05d0\u05dc\u05d0 \u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4Interface. \u05d5\u05d1\u05db\u05df, \u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d3\u05dc\u05d9\u05e4\u05ea \u05d6\u05d9\u05db\u05e8\u05d5\u05df \u05d1\u05ea\u05d5\u05db\u05e0\u05d4. \u05d4\u05e9\u05ea\u05de\u05e9\u05e0\u05d5 \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Profiler \u05d5\u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d4\u05d1\u05e2\u05d9\u05d4 \u05d4\u05d9\u05d0 \u05d1\u05e7\u05dc\u05d0\u05e1 \u05e9\u05dc\u05e0\u05d5 \u2013 SqlHandler. \u05dc\u05e9\u05dd \u05d4\u05d1\u05d3\u05d9\u05e7\u05d4 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05db\u05dc sql \u05e9\u05de\u05d2\u05d9\u05e2 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 handelDb. \u05e0\u05d9\u05e6\u05d5\u05e8 Decorator \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d6\u05d4: \u05e0\u05d9\u05e6\u05d5\u05e8 Class \u05d7\u05d3\u05e9 \u05d0\u05e9\u05e8 \u05d0\u05e3 \u05d4\u05d5\u05d0 \u05de\u05de\u05de\u05e9 \u05d0\u05ea IDbHandler \u05d5\u05e0\u05d3\u05d0\u05d2 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d5 \u05e9\u05d3\u05d4 Protected \u05de\u05e1\u05d5\u05d2 IDbHandler \u05d5\u05e9\u05e9\u05d3\u05d4 \u05d6\u05d4 \u05de\u05d0\u05d5\u05ea\u05d7\u05dc \u05d1 Constructor . \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 HandelDb \u05e0\u05e2\u05e9\u05d4 \u05e9\u05e0\u05d9 \u05d3\u05d1\u05e8\u05d9\u05dd \u05d0. \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05e9\u05dc\u05e0\u05d5 \u2013 \u05d4\u05d3\u05e4\u05e1\u05ea \u05d4 sql. \u05d1. \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9\u05ea \u05de\u05ea\u05d5\u05da \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da: \u05db\u05e2\u05ea \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05d9\u05d4\u05d9\u05d4 \u05db\u05de\u05e2\u05d8 \u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05d5\u05d9\u05e8\u05d0\u05d4 \u05db\u05da \u2013 \u05e0\u05e8\u05d5\u05d5\u05d9\u05d7 \u05d4\u05d3\u05e4\u05e1\u05d4 \u05e9\u05dc \u05db\u05dc sql \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5 \u05de\u05d1\u05dc\u05d9 \u05dc\u05d4\u05e4\u05e8\u05d9\u05e2 \u05dc\u05e2\u05d1\u05d5\u05d3\u05d4 \u05d4\u05e1\u05d3\u05d9\u05e8\u05d4 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e2\u05dc \u05e4\u05d9 \u05d4\u05de\u05d4\u05dc\u05da \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d8\u05d9\u05e4: \u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05d5\u05d1\u05d3\u05d5\u05de\u05d9\u05dd \u05dc\u05d5 \u05d9\u05e9\u05e0\u05d4 \u05d3\u05e8\u05da \u05e0\u05d5\u05e1\u05e4\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1 \u05e7\u05d9\u05d9\u05dd \u05d5\u05d6\u05d4 \u05e2\u05dc \u05d9\u05d3\u05d9 Extension Methods\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hernan-yehuda.net\/?p=124\" \/>\n<meta property=\"og:site_name\" content=\"Design for Living\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-28T10:42:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-28T11:45:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png\" \/>\n<meta name=\"author\" content=\"Hernan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hernan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u05d3\u05e7\u05d5\u05ea\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#article\",\"isPartOf\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124\"},\"author\":{\"name\":\"Hernan\",\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64\"},\"headline\":\"Decorator\",\"datePublished\":\"2021-06-28T10:42:31+00:00\",\"dateModified\":\"2021-06-28T11:45:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124\"},\"wordCount\":89,\"publisher\":{\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64\"},\"image\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png\",\"keywords\":[\"Decorator\",\"Design Patterns\",\"DEV\"],\"articleSection\":[\"Design Patterns\",\"SOLID\"],\"inLanguage\":\"he-IL\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124\",\"url\":\"https:\/\/hernan-yehuda.net\/?p=124\",\"name\":\"Decorator - Design for Living\",\"isPartOf\":{\"@id\":\"https:\/\/hernan-yehuda.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png\",\"datePublished\":\"2021-06-28T10:42:31+00:00\",\"dateModified\":\"2021-06-28T11:45:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#breadcrumb\"},\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hernan-yehuda.net\/?p=124\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#primaryimage\",\"url\":\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png\",\"contentUrl\":\"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png\",\"width\":548,\"height\":281},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hernan-yehuda.net\/?p=124#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea\",\"item\":\"https:\/\/hernan-yehuda.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Decorator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hernan-yehuda.net\/#website\",\"url\":\"https:\/\/hernan-yehuda.net\/\",\"name\":\"\u05d0\u05e8\u05e0\u05df \u05de\u05d9\u05d9\u05e1\u05dc\u05e1\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hernan-yehuda.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"he-IL\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64\",\"name\":\"Hernan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fccf8cf4fc450b691c936a8d8435a7531aebd25301f198fe852050983a235aef?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fccf8cf4fc450b691c936a8d8435a7531aebd25301f198fe852050983a235aef?s=96&d=mm&r=g\",\"caption\":\"Hernan\"},\"logo\":{\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/hernan-yehuda.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Decorator - Design for Living","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hernan-yehuda.net\/?p=124","og_locale":"he_IL","og_type":"article","og_title":"Decorator - Design for Living","og_description":"\u05d1\u05e4\u05d5\u05e1\u05d8 \u05d6\u05d4 \u05d0\u05d3\u05d2\u05d9\u05dd \u05e9\u05e0\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05e0\u05e4\u05d5\u05e6\u05d9\u05dd \u05d1\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1 Decorator. Decorator \u05d4\u05d9\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d3\u05d9 \u05e0\u05e4\u05d5\u05e6\u05d4 \u05d5\u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05ea \u05d1\u05d9\u05d5\u05ea\u05e8. \u05d4\u05d9\u05d0 \u05de\u05d0\u05e4\u05e9\u05e8 \u05d4\u05d5\u05e1\u05e4\u05ea \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05e7\u05d9\u05d9\u05dd \u05d1\u05e6\u05d5\u05e8\u05d4 \u05d3\u05d9\u05e0\u05d0\u05de\u05d9\u05ea, \u05de\u05d1\u05dc\u05d9 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05d6\u05d5 \u05de\u05d5\u05e0\u05e2\u05ea \u05d9\u05e8\u05d5\u05e9\u05d4 \u05de\u05d9\u05d5\u05ea\u05e8\u05ea \u05d0\u05d5 \u05e4\u05d5\u05ea\u05e8\u05ea \u05de\u05e7\u05e8\u05d9\u05dd \u05d1\u05d4\u05dd \u05d0\u05d9\u05df \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d9\u05e8\u05d5\u05e9\u05d4 \u05d1\u05db\u05dc\u05dc (Sealed). \u05e2\u05d5\u05d3 \u05d3\u05d1\u05e8 \u05e9\u05e0\u05d9\u05ea\u05df \u05dc\u05d5\u05de\u05e8 \u05e2\u05dc \u05ea\u05d1\u05e0\u05d9\u05ea \u05d6\u05d5 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05d9\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc Open Closed Principle&#8211; \u05e2\u05d9\u05e7\u05e8\u05d5\u05df \u05d6\u05d4 \u05e9\u05dc \u05ea\u05db\u05e0\u05d5\u05ea \u05de\u05d5\u05e0\u05d7\u05d4 \u05e2\u05e6\u05de\u05d9\u05dd \u05d0\u05d5\u05de\u05e8 \u05e9Class \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d9\u05d5\u05ea \u05e4\u05ea\u05d5\u05d7 \u05dc\u05d4\u05e8\u05d7\u05d1\u05d4, \u05d0\u05d1\u05dc \u05e1\u05d2\u05d5\u05e8 \u05dc\u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd. \u05db\u05dc\u05d5\u05de\u05e8, \u05e1\u05d1\u05d9\u05e8 \u05dc\u05d4\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d5\u05e9\u05e7\u05e2\u05d4 \u05de\u05d7\u05e9\u05d1\u05d4 \u05e8\u05d1\u05d4 \u05e2\u05dc \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d4Class \u05e9\u05dc\u05e0\u05d5, \u05d5\u05dc\u05db\u05df \u05dc\u05d0 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05d5\u05ea\u05d5. \u05d0\u05da \u05de\u05e6\u05d3 \u05e9\u05e0\u05d9 \u05d9\u05ea\u05db\u05df \u05de\u05e6\u05d1 \u05e9\u05de\u05d9\u05e9\u05d4\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 \u05e9\u05dc\u05d1 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1. \u05de\u05e7\u05e8\u05d4 \u05e0\u05d5\u05e1\u05e3 \u05e9\u05d1\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1 Decorator \u05d4\u05d5\u05d0 \u05db\u05d0\u05e9\u05e8 \u05d9\u05e9 \u05e7\u05d5\u05d3 \u05d9\u05e9\u05df (\u05d4\u05d9\u05d3\u05d5\u05e2 \u05d1\u05db\u05d9\u05e0\u05d5\u05d9\u05d5 Legacy Code) \u05e9\u05de\u05e1\u05d5\u05d1\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d5\u05d1\u05db\u05dc\u05dc \u05dc\u05d0 \u05de\u05ea\u05d7\u05e9\u05e7 \u05dc\u05d2\u05e2\u05ea \u05d1\u05d5, \u05d0\u05da \u05dc\u05e2\u05d9\u05ea\u05d9\u05dd \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea. \u05d4 Decorator \u05de\u05d5\u05e8\u05db\u05d1 \u05de\u05d0\u05e8\u05d1\u05e2\u05d4 \u05d7\u05dc\u05e7\u05d9\u05dd \u05e2\u05d9\u05e7\u05e8\u05d9\u05d9\u05dd (\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e6\u05de\u05e6\u05dd \u05d0\u05ea \u05d7\u05dc\u05e7\u05dd \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05de\u05e7\u05e8\u05d4 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9): \u05d0. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05d4 Component \u2013 \u05d6\u05d4\u05d5 abstract class \u05d0\u05d5 Interface \u05e9\u05d0\u05ea \u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4 \u05de\u05de\u05d9\u05de\u05d5\u05e9\u05d9\u05d5 \u05e0\u05e8\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea. \u05d1. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05e0\u05d9 \u05d4\u05d5\u05d0 \u05d4 Concrete Component \u2013 \u05d6\u05d4\u05d5 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05e9\u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05d0\u05d5 \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4 Component. \u05d2. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e9\u05dc\u05d9\u05e9\u05d9 \u05d4\u05d5\u05d0 \u05d4 Decorator \u2013 \u05d6\u05d4\u05d5 abstract class \u05e9\u05d2\u05dd \u05d4\u05d5\u05d0 \u05db\u05de\u05d5 \u05d4 Concrete Component \u05d9\u05d5\u05e8\u05e9 \u05de\u05d4 Component . \u05d4\u05de\u05d0\u05e4\u05d9\u05d9\u05df \u05d0\u05ea \u05d4 Decorator \u05d4\u05d5\u05d0 \u05e9\u05d9\u05e9 \u05dc\u05d5 Protected Member \u05de\u05d4\u05e1\u05d5\u05d2 \u05e9\u05dc \u05d4Component \u05d5\u05e9\u05d1 Constructor \u05e9\u05dc\u05d5 \u05d4\u05d5\u05d0 \u05de\u05e7\u05d1\u05dc \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Component \u05db\u05dc\u05e9\u05d4\u05d5 \u05d5\u05de\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4 Member (\u05ea\u05d9\u05db\u05e3 \u05ea\u05d1\u05d5\u05d0 \u05d4\u05d3\u05d5\u05d2\u05de\u05d0). \u05d3. \u05d4\u05d7\u05dc\u05e7 \u05d4\u05e8\u05d1\u05d9\u05e2\u05d9 \u05d4\u05d5\u05d0 Concrete Decorator \u2013 Class (\u05d0\u05d7\u05d3 \u05d0\u05d5 \u05db\u05de\u05d4) \u05d0\u05e9\u05e8 \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05d4 Decorator, \u05de\u05d5\u05e1\u05d9\u05e4\u05d9\u05dd \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05de\u05e9\u05dc \u05e2\u05e6\u05de\u05dd \u05d5\u05db\u05de\u05d5\u05d1\u05df \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05d4\u05d1\u05e1\u05d9\u05e1\u05d9\u05ea, \u05d5\u05d6\u05d0\u05ea \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05d4\u05ea\u05e7\u05d1\u05dc \u05d1Constructor. \u05d3\u05d5\u05d2\u05de\u05d0 \u05d0 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d4\u05d7\u05d5\u05de\u05d5\u05e1\u05d9\u05d4 &#8220;\u05de\u05e1\u05d1\u05d4-\u05e4\u05d5\u05dc&#8221; (\u05d1\u05df \u05d2\u05d5\u05e8\u05d9\u05d5\u05df 18 \u05d1\u05e8\u05de\u05ea \u05d2\u05df, \u05dc\u05de\u05d9 \u05e9\u05de\u05ea\u05e2\u05e0\u05d9\u05d9\u05df \u2013 \u05ea\u05d1\u05e7\u05e9\u05d5 \u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea) \u05e4\u05e0\u05d5 \u05d0\u05dc\u05d9 \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d1\u05d4 \u05d4\u05dd \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05dc\u05d0 \u05de\u05ea\u05d0\u05d9\u05de\u05d4 \u05dc\u05ea\u05e4\u05e8\u05d9\u05d8\u05d9\u05dd \u05d4\u05de\u05e2\u05d5\u05d3\u05db\u05e0\u05d9\u05dd \u05e9\u05dc\u05d4\u05dd \u05d5\u05d4\u05dd \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05ea\u05d0\u05d9\u05dd \u05d0\u05d5\u05ea\u05d4. \u05db\u05e8\u05d2\u05e2 \u05d4\u05de\u05e6\u05d1 \u05d4\u05d5\u05d0 \u05db\u05d6\u05d4 \u2013 \u05d1\u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05dc\u05d4\u05dd \u05d9\u05e9 \u05e9\u05dc\u05d5\u05e9\u05d4 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd: \u05d7\u05d5\u05de\u05d5\u05e1 \u05e4\u05e8\u05d8\u05d9, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d6\u05d5\u05d2\u05d9, \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e9\u05e4\u05d7\u05ea\u05d9 \u2013 \u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05d9\u05d5\u05e8\u05e9\u05d9\u05dd \u05de\u05e7\u05dc\u05d0\u05e1 &#8220;\u05d7\u05d5\u05de\u05d5\u05e1&#8221; \u05db\u05de\u05d5\u05d1\u05df \u05d5\u05e9\u05dc\u05d5\u05e9\u05ea\u05dd \u05de\u05de\u05e9\u05d9\u05dd GetDescription \u05d5 CalculateCost. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05de\u05d4 \u05e9\u05e7\u05e8\u05d4 \u05d4\u05d5\u05d0 \u05e9\u05d4\u05dd \u05d2\u05d9\u05dc\u05d5 \u05e9\u05d4\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05d4\u05dd \u05de\u05e2\u05d3\u05d9\u05e4\u05d9\u05dd \u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e2\u05dc \u05d4\u05d7\u05d5\u05de\u05d5\u05e1 \u05e9\u05dc\u05d4\u05dd, \u05d0\u05d6 \u05d4\u05dd \u05d4\u05ea\u05d7\u05d9\u05dc\u05d5 \u05dc\u05d4\u05d2\u05d9\u05e9 \u05d7\u05d5\u05de\u05d5\u05e1 \u05d2\u05e8\u05d2\u05d9\u05e8\u05d9\u05dd, \u05d7\u05d5\u05de\u05d5\u05e1 \u05d8\u05d7\u05d9\u05e0\u05d4 \u05d5\u05d7\u05d5\u05de\u05d5\u05e1 \u05de\u05e1\u05d1\u05d7\u05d4. \u05d0\u05dd \u05db\u05da \u05de\u05d4 \u05e6\u05e8\u05d9\u05da \u05dc\u05e9\u05e0\u05d5\u05ea \u05d1\u05ea\u05d5\u05db\u05e0\u05d4? \u05d0\u05dd \u05e0\u05ea\u05d7\u05d9\u05dc \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e7\u05dc\u05d0\u05e1 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3 \u05d5\u05d6\u05d4 \u05d1\u05d4\u05ea\u05d0\u05de\u05d4 \u05dc\u05d2\u05d5\u05d3\u05dc \u05d4\u05de\u05e0\u05d4, \u05d6\u05d4 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da FamilyHumusWithTehini, DualHumusWithTehini, PrivateHumusWithTehini \u05d5\u05db\u05d5&#8217; \u05d5\u05db\u05d5&#8217;\u2026 \u05d5\u05db\u05da \u05d4\u05dc\u05d0\u05d4 \u05dc\u05db\u05dc \u05ea\u05d5\u05e1\u05e4\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3. \u05d5\u05de\u05d4 \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05e9\u05dc\u05d1 (\u05de\u05e0\u05d4 \u05de\u05e9\u05d5\u05dc\u05e9\u05ea \u05db\u05d6\u05db\u05d5\u05e8)? \u05d5\u05de\u05d4 \u05d0\u05dd \u05de\u05d7\u05e8 \u05d4\u05dd \u05d9\u05e8\u05e6\u05d5 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d2\u05dd \u05e4\u05d5\u05dc? \u05ea\u05d4\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05ea\u05e4\u05d5\u05e6\u05e6\u05d5\u05ea \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05d5\u05e7\u05d5\u05d3 \u05e1\u05e4\u05d2\u05d8\u05d9. \u05d0\u05dd \u05db\u05da \u05e0\u05de\u05de\u05e9 Decorator. \u05d4\u05e9\u05dc\u05d1 \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d5\u05d0 \u05dc\u05d9\u05e6\u05d5\u05e8 Abstract Class \u05e9\u05d9\u05d5\u05e8\u05e9 \u05de Humus \u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e9\u05d3\u05d4 Protected \u05e9\u05dc Humus \u05e0\u05d9\u05e6\u05d5\u05e8 Constructor \u05e9\u05de\u05e7\u05d1\u05dc Humus \u05d5\u05e0\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4\u05e9\u05d3\u05d4 \u05e9\u05dc\u05e0\u05d5. \u05db\u05e2\u05ea \u05e0\u05de\u05de\u05e9 \u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05de\u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e8\u05d0\u05e9\u05d9 \u2013 Humus , \u05d0\u05d1\u05dc \u05dc\u05de\u05e2\u05e9\u05d4 \u05d4\u05de\u05d9\u05de\u05d5\u05e9 \u05d9\u05d4\u05d9\u05d4 \u05e8\u05e7 \u05d1\u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e4\u05e2 \u05e9\u05dc Humus \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5. \u05d4 Class \u05d1\u05e9\u05dc\u05de\u05d5\u05ea\u05d5 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05db\u05e2\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 \u05e7\u05dc\u05d0\u05e1\u05d9\u05dd \u05dc\u05db\u05dc \u05d0\u05d7\u05ea \u05de\u05d4\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05d5\u05d4\u05df \u05db\u05d5\u05dc\u05df \u05d9\u05e8\u05e9\u05d5 \u05de\u05d4Decorator . \u05d4\u05d4\u05d1\u05d3\u05dc \u05d1\u05d9\u05e0\u05d9\u05d4\u05dd \u05d9\u05d4\u05d9\u05d4 \u05d1\u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05ea. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da (\u05d0\u05d9\u05df \u05dc\u05d9 \u05d0\u05d7\u05e8\u05d9\u05d5\u05ea \u05e2\u05dc \u05d4\u05de\u05d7\u05d9\u05e8\u05d9\u05dd): \u05ea\u05db\u05dc\u05e1 \u05d6\u05d4\u05d5. \u05d0\u05d6 \u05d0\u05d9\u05da \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1\u05d6\u05d4? \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05e9\u05dc \u05d4Humus \u05d4\u05e8\u05e6\u05d5\u05d9 \u05dc\u05e0\u05d5 (\u05e0\u05d2\u05d9\u05d3 PrivateHumes) \u05d0\u05da \u05d4\u05d5\u05d0 \u05d9\u05d4\u05d9\u05d4 \u05db\u05dc\u05dc\u05d9 (\u05db\u05dc\u05d5\u05de\u05e8 \u05de type Humus) \u05d5\u05dc\u05d0\u05d7\u05e8 \u05de\u05db\u05df \u05e0\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9 \u05e9\u05dc \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05d4\u05e8\u05e6\u05d5\u05d9\u05d4 \u05dc\u05e0\u05d5 \u05d4\u05de\u05e7\u05d1\u05dc \u05d1 Constructor \u05d0\u05ea \u05d4 PrivateHumus \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05d5\u05d4\u05de\u05d5\u05e4\u05e2 \u05d9\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea MyHumus. \u05db\u05e2\u05ea \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05de\u05d4 \u05e9\u05e0\u05e8\u05e6\u05d4. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da: \u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05db\u05de\u05d5\u05d1\u05df \u05ea\u05d4\u05d9\u05d4 \u05db\u05de\u05e6\u05d5\u05e4\u05d4: \u05d3\u05d5\u05d2\u05de\u05d0 \u05d1&#8217; \u2013 Sealed Class \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05ea\u05d5\u05db\u05e0\u05d4 \u05e9\u05d9\u05e9 \u05dc\u05d9 Sealed Class \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Interface. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05d5\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: \u05e0\u05e9\u05d9\u05dd \u05dc\u05d1 \u05e9\u05d4\u05de\u05ea\u05d5\u05d3\u05d4 DoSomthing \u05dc\u05d0 \u05de\u05e7\u05d1\u05dc\u05ea \u05d3\u05d5\u05d5\u05e7\u05d0 \u05d0\u05ea \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05e1\u05e4\u05e6\u05d9\u05e4\u05d9 \u05e9\u05dc\u05e0\u05d5 \u05d0\u05dc\u05d0 \u05de\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4Interface. \u05d5\u05d1\u05db\u05df, \u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d3\u05dc\u05d9\u05e4\u05ea \u05d6\u05d9\u05db\u05e8\u05d5\u05df \u05d1\u05ea\u05d5\u05db\u05e0\u05d4. \u05d4\u05e9\u05ea\u05de\u05e9\u05e0\u05d5 \u05d1\u05d0\u05d9\u05d6\u05e9\u05d4\u05d5 Profiler \u05d5\u05d2\u05d9\u05dc\u05d9\u05e0\u05d5 \u05e9\u05d4\u05d1\u05e2\u05d9\u05d4 \u05d4\u05d9\u05d0 \u05d1\u05e7\u05dc\u05d0\u05e1 \u05e9\u05dc\u05e0\u05d5 \u2013 SqlHandler. \u05dc\u05e9\u05dd \u05d4\u05d1\u05d3\u05d9\u05e7\u05d4 \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05d3\u05e4\u05d9\u05e1 \u05db\u05dc sql \u05e9\u05de\u05d2\u05d9\u05e2 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 handelDb. \u05e0\u05d9\u05e6\u05d5\u05e8 Decorator \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d6\u05d4: \u05e0\u05d9\u05e6\u05d5\u05e8 Class \u05d7\u05d3\u05e9 \u05d0\u05e9\u05e8 \u05d0\u05e3 \u05d4\u05d5\u05d0 \u05de\u05de\u05de\u05e9 \u05d0\u05ea IDbHandler \u05d5\u05e0\u05d3\u05d0\u05d2 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d5 \u05e9\u05d3\u05d4 Protected \u05de\u05e1\u05d5\u05d2 IDbHandler \u05d5\u05e9\u05e9\u05d3\u05d4 \u05d6\u05d4 \u05de\u05d0\u05d5\u05ea\u05d7\u05dc \u05d1 Constructor . \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 HandelDb \u05e0\u05e2\u05e9\u05d4 \u05e9\u05e0\u05d9 \u05d3\u05d1\u05e8\u05d9\u05dd \u05d0. \u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05e9\u05dc\u05e0\u05d5 \u2013 \u05d4\u05d3\u05e4\u05e1\u05ea \u05d4 sql. \u05d1. \u05d4\u05e4\u05e2\u05dc\u05ea \u05d4\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9\u05ea \u05de\u05ea\u05d5\u05da \u05d4\u05e7\u05dc\u05d0\u05e1 \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05e8\u05d0\u05d4 \u05db\u05da: \u05db\u05e2\u05ea \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05d9\u05d4\u05d9\u05d4 \u05db\u05de\u05e2\u05d8 \u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05d5\u05d9\u05e8\u05d0\u05d4 \u05db\u05da \u2013 \u05e0\u05e8\u05d5\u05d5\u05d9\u05d7 \u05d4\u05d3\u05e4\u05e1\u05d4 \u05e9\u05dc \u05db\u05dc sql \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5 \u05de\u05d1\u05dc\u05d9 \u05dc\u05d4\u05e4\u05e8\u05d9\u05e2 \u05dc\u05e2\u05d1\u05d5\u05d3\u05d4 \u05d4\u05e1\u05d3\u05d9\u05e8\u05d4 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e2\u05dc \u05e4\u05d9 \u05d4\u05de\u05d4\u05dc\u05da \u05d4\u05de\u05e7\u05d5\u05e8\u05d9. \u05d8\u05d9\u05e4: \u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05d5\u05d1\u05d3\u05d5\u05de\u05d9\u05dd \u05dc\u05d5 \u05d9\u05e9\u05e0\u05d4 \u05d3\u05e8\u05da \u05e0\u05d5\u05e1\u05e4\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05dc\u05e7\u05dc\u05d0\u05e1 \u05e7\u05d9\u05d9\u05dd \u05d5\u05d6\u05d4 \u05e2\u05dc \u05d9\u05d3\u05d9 Extension Methods","og_url":"https:\/\/hernan-yehuda.net\/?p=124","og_site_name":"Design for Living","article_published_time":"2021-06-28T10:42:31+00:00","article_modified_time":"2021-06-28T11:45:14+00:00","og_image":[{"url":"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png","type":"","width":"","height":""}],"author":"Hernan","twitter_card":"summary_large_image","twitter_misc":{"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3":"Hernan","\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da":"5 \u05d3\u05e7\u05d5\u05ea"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hernan-yehuda.net\/?p=124#article","isPartOf":{"@id":"https:\/\/hernan-yehuda.net\/?p=124"},"author":{"name":"Hernan","@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64"},"headline":"Decorator","datePublished":"2021-06-28T10:42:31+00:00","dateModified":"2021-06-28T11:45:14+00:00","mainEntityOfPage":{"@id":"https:\/\/hernan-yehuda.net\/?p=124"},"wordCount":89,"publisher":{"@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64"},"image":{"@id":"https:\/\/hernan-yehuda.net\/?p=124#primaryimage"},"thumbnailUrl":"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png","keywords":["Decorator","Design Patterns","DEV"],"articleSection":["Design Patterns","SOLID"],"inLanguage":"he-IL"},{"@type":"WebPage","@id":"https:\/\/hernan-yehuda.net\/?p=124","url":"https:\/\/hernan-yehuda.net\/?p=124","name":"Decorator - Design for Living","isPartOf":{"@id":"https:\/\/hernan-yehuda.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hernan-yehuda.net\/?p=124#primaryimage"},"image":{"@id":"https:\/\/hernan-yehuda.net\/?p=124#primaryimage"},"thumbnailUrl":"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png","datePublished":"2021-06-28T10:42:31+00:00","dateModified":"2021-06-28T11:45:14+00:00","breadcrumb":{"@id":"https:\/\/hernan-yehuda.net\/?p=124#breadcrumb"},"inLanguage":"he-IL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hernan-yehuda.net\/?p=124"]}]},{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/hernan-yehuda.net\/?p=124#primaryimage","url":"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png","contentUrl":"https:\/\/hernan-yehuda.net\/wp-content\/uploads\/2021\/06\/DecoratorConsole.png","width":548,"height":281},{"@type":"BreadcrumbList","@id":"https:\/\/hernan-yehuda.net\/?p=124#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea","item":"https:\/\/hernan-yehuda.net\/"},{"@type":"ListItem","position":2,"name":"Decorator"}]},{"@type":"WebSite","@id":"https:\/\/hernan-yehuda.net\/#website","url":"https:\/\/hernan-yehuda.net\/","name":"\u05d0\u05e8\u05e0\u05df \u05de\u05d9\u05d9\u05e1\u05dc\u05e1","description":"","publisher":{"@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hernan-yehuda.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"he-IL"},{"@type":["Person","Organization"],"@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64","name":"Hernan","image":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fccf8cf4fc450b691c936a8d8435a7531aebd25301f198fe852050983a235aef?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fccf8cf4fc450b691c936a8d8435a7531aebd25301f198fe852050983a235aef?s=96&d=mm&r=g","caption":"Hernan"},"logo":{"@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/hernan-yehuda.net"]}]}},"_links":{"self":[{"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":14,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions\/142"}],"wp:attachment":[{"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}