{"id":144,"date":"2021-07-05T10:26:02","date_gmt":"2021-07-05T07:26:02","guid":{"rendered":"https:\/\/ernan-maisels.net\/?p=144"},"modified":"2021-07-08T16:49:08","modified_gmt":"2021-07-08T13:49:08","slug":"inversion-of-control-%d7%95-dependency-injection","status":"publish","type":"post","link":"https:\/\/hernan-yehuda.net\/?p=144","title":{"rendered":"Inversion of Control \u05d5 Dependency Injection"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"144\" class=\"elementor elementor-144\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-30ee5d4b elementor-section-boxed elementor-section-height-default elementor-section-height-default wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no\" data-id=\"30ee5d4b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1809ae90\" data-id=\"1809ae90\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-23f95694 elementor-widget elementor-widget-text-editor\" data-id=\"23f95694\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p>Inversion of Control (\u05dc\u05d4\u05dc\u05df Ioc), \u05d4\u05d9\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d0\u05e9\u05e8 \u05e0\u05d9\u05ea\u05df \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8\u05d4 \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9, \u05db\u05d4\u05e2\u05d1\u05e8\u05ea \u05d4\u05e9\u05dc\u05d9\u05d8\u05d4 \u05e2\u05dc \u05ea\u05d4\u05dc\u05d9\u05da \u05db\u05dc\u05e9\u05d4\u05d5, \u05db\u05d2\u05d5\u05df \u05d9\u05e6\u05d9\u05e8\u05ea \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd, \u05d4\u05e8\u05e6\u05ea \u05e7\u05d8\u05e2 \u05e7\u05d5\u05d3 \u05d5\u05db\u05d5&#8217;, \u05de\u05d4\u05d3\u05e8\u05da \u05d4\u05e0\u05e7\u05e8\u05d0\u05ea &#8216;\u05e8\u05d2\u05d9\u05dc\u05d4&#8217;, \u05e2\u05dc \u05d9\u05d3\u05d9 \u05ea\u05d4\u05dc\u05d9\u05da \u05de\u05e8\u05db\u05d6\u05d9 \u05db\u05dc\u05e9\u05d4\u05d5, \u05d0\u05dc \u05e8\u05db\u05d9\u05d1 \u05e7\u05d5\u05d3 \u05d0\u05d7\u05e8 \u05d0\u05e9\u05e8 \u05d9\u05e2\u05e9\u05d4 \u05d4\u05d5\u05d0 \u05d0\u05ea \u05d4\u05e2\u05d1\u05d5\u05d3\u05d4. \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05d9\u05e4\u05d5\u05da \u05e9\u05dc\u05d9\u05d8\u05d4 \u05d6\u05d4 \u05e0\u05e8\u05d5\u05d5\u05d9\u05d7 \u05dc\u05e2\u05d9\u05ea\u05d9\u05dd \u05db\u05de\u05d4 \u05d3\u05d1\u05e8\u05d9\u05dd, \u05db\u05e4\u05d9 \u05e9\u05ea\u05d9\u05db\u05e3 \u05e0\u05d9\u05e8\u05d0\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0\u05ea IoC \u05d0\u05e4\u05e9\u05e8 \u05dc\u05de\u05de\u05e9 \u05d1\u05db\u05dc \u05de\u05d9\u05e0\u05d9 \u05d3\u05e8\u05db\u05d9\u05dd \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05ea\u05d4\u05dc\u05d9\u05da \u05e2\u05dc\u05d9\u05d5 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e2\u05d5\u05d1\u05d3\u05d9\u05dd, \u05d0\u05da \u05d4\u05db\u05dc\u05d9 \u05e9\u05d1\u05e2\u05d6\u05e8\u05ea\u05d5 \u05de\u05de\u05de\u05e9\u05d9\u05dd IoC \u05d4\u05d5\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05e0\u05d5\u05e1\u05e4\u05ea \u05d1\u05e9\u05dd Dependency Injection.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05dc\u05e4\u05e2\u05de\u05d9\u05dd \u05e0\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1 IoC \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d0\u05d9\u05e0\u05d8\u05e8\u05e4\u05d9\u05d9\u05e1\u05d9\u05dd, \u05db\u05d0\u05e9\u05e8 \u05d4\u05e8\u05e2\u05d9\u05d5\u05df \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9 \u05d0\u05d5\u05de\u05e8 \u05e9\u05d1\u05de\u05e7\u05d5\u05dd \u05e9\u05ea\u05d4\u05dc\u05d9\u05da \u05db\u05dc\u05e9\u05d4\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05dc\u05d4\u05db\u05d9\u05e8 \u05d0\u05ea \u05d4\u05de\u05d7\u05dc\u05e7\u05d5\u05ea \u05d4\u05de\u05e9\u05ea\u05de\u05e9\u05d5\u05ea \u05d1\u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05d5, \u05d4\u05d5\u05d0 \u05e4\u05e9\u05d5\u05d8 \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8 Interface \u05d0\u05e9\u05e8 \u05e8\u05e7 \u05d0\u05d5\u05ea\u05d5 \u05d4\u05d5\u05d0 \u05de\u05db\u05d9\u05e8, \u05d5\u05db\u05dc \u05de\u05d9 \u05e9\u05d9\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e9\u05d9\u05e8\u05d5\u05ea\u05d9 \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05d4\u05d6\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05dc\u05de\u05de\u05e9 \u05d0\u05ea \u05d4 Interface \u05d4\u05d6\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d5\u05dc\u05e4\u05e2\u05de\u05d9\u05dd \u05e0\u05e9\u05ea\u05de\u05e9 \u05d1IoC \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05ea\u05d4\u05dc\u05d9\u05da &#8216;\u05d4\u05e8\u05d2\u05d9\u05dc&#8217; \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4. \u05d1\u05de\u05d9\u05dc\u05d4 &#8216;\u05e8\u05d2\u05d9\u05dc&#8217; \u05d0\u05e0\u05d9 \u05de\u05ea\u05db\u05d5\u05d5\u05df \u05dc\u05ea\u05d4\u05dc\u05d9\u05da \u05e9\u05e2\u05d5\u05d1\u05d3 \u05d1\u05d0\u05d5\u05e4\u05df \u05e4\u05e8\u05d5\u05e6\u05d3\u05d5\u05e8\u05dc\u05d9 \u2013 \u05e0\u05d9\u05ea\u05df \u05dc\u05ea\u05d0\u05e8 \u05d6\u05d0\u05ea \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05d4\u05d1\u05d3\u05dc \u05e9\u05d1\u05d9\u05df Console Application \u05e9\u05d1\u05d4 \u05e0\u05e9\u05d0\u05dc\u05ea \u05e9\u05d0\u05dc\u05d4 \u05d5\u05de\u05ea\u05e7\u05d1\u05dc\u05ea \u05ea\u05e9\u05d5\u05d1\u05d4 \u05d5\u05d7\u05d5\u05d6\u05e8 \u05d7\u05dc\u05d9\u05dc\u05d4, \u05d5\u05e9\u05d4\u05e9\u05dc\u05d9\u05d8\u05d4 \u05e2\u05dc \u05d4\u05ea\u05d4\u05dc\u05d9\u05da \u05d4\u05d9\u05d0 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e2\u05e6\u05de\u05d4, \u05dc\u05d1\u05d9\u05df WinForm \u05e9\u05d1\u05d5 \u05d9\u05e9 \u05ea\u05d5\u05d5\u05d9\u05d5\u05ea \u05e2\u05dd \u05e9\u05d0\u05dc\u05d5\u05ea \u05d5\u05e9\u05d3\u05d5\u05ea \u05dc\u05d4\u05db\u05e0\u05e1\u05ea \u05ea\u05e9\u05d5\u05d1\u05d5\u05ea \u05d5\u05dc\u05d7\u05d9\u05e6\u05d4 \u05e2\u05dc \u05db\u05e4\u05ea\u05d5\u05e8 \u05e9\u05d1\u05d4 \u05d4\u05de\u05e9\u05ea\u05de\u05e9 \u05d4\u05d5\u05d0 \u05d6\u05d4 \u05e9\u05de\u05e4\u05e2\u05d9\u05dc \u05ea\u05d4\u05dc\u05d9\u05da \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05dc\u05d9\u05d7\u05ea \u05ea\u05e9\u05d5\u05d1\u05d5\u05ea.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d3\u05e8\u05da \u05d6\u05d5 \u05d9\u05d3\u05d5\u05e2\u05d4 \u05d1\u05d0\u05d9\u05de\u05e8\u05d4 \u2013 &#8220;Don&#8217;t call us, we&#8217;ll call you!!&#8221;<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e2\u05d5\u05d3 \u05e9\u05d9\u05de\u05d5\u05e9 \u05e0\u05e4\u05d5\u05e5 \u05d1IoC \u05d4\u05d5\u05d0 \u05d1\u05d9\u05e6\u05d9\u05e8\u05ea \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd. \u05d1\u05de\u05e7\u05d5\u05dd \u05dc\u05d9\u05e6\u05d5\u05e8 \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05d1\u05ea\u05d5\u05da \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05d9, \u05d0\u05e7\u05e8\u05d0 \u05dc\u05de\u05d7\u05dc\u05e7\u05d4 \u05d0\u05d7\u05e8\u05ea \u05d0\u05e9\u05e8 \u05ea\u05d9\u05d9\u05e6\u05e8 \u05d4\u05d9\u05d0 \u05e2\u05d1\u05d5\u05e8\u05d9 \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05d5\u05d1\u05db\u05da \u05d0\u05e0\u05d9 \u05de\u05e7\u05d8\u05d9\u05df \u05d0\u05ea \u05d4\u05ea\u05dc\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05d9 \u05d1\u05de\u05d7\u05dc\u05e7\u05d5\u05ea \u05d0\u05d5\u05ea\u05df \u05d0\u05e0\u05d9 \u05de\u05de\u05de\u05e9. \u05e9\u05d9\u05de\u05d5\u05e9 \u05d6\u05d4 \u05d3\u05d5\u05de\u05d4 \u05dc\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1&nbsp;<strong>Factory<\/strong>.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>Dependency Injection<\/strong><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>DI (\u05d4\u05d6\u05e8\u05e7\u05ea \u05ea\u05dc\u05d5\u05d9\u05d5\u05ea) \u05d4\u05d5\u05d0 \u05e1\u05d5\u05d2 \u05e9\u05dc IOC \u2013 \u05d6\u05d5\u05d4\u05d9 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05d1\u05d4 \u05d0\u05e0\u05d5 \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd \u05d0\u05d5 \u05de\u05e9\u05d9\u05d9\u05db\u05d9\u05dd \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05e9\u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05e0\u05d5 \u05ea\u05dc\u05d5\u05d9\u05d4 \u05d1\u05d4\u05dd \u2013 \u05de\u05d7\u05d5\u05e5 \u05dc\u05de\u05d7\u05dc\u05e7\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05d0\u05d5\u05e4\u05df \u05e6\u05d9\u05d5\u05e8\u05d9 \u05d0\u05e4\u05e9\u05e8 \u05dc\u05ea\u05d0\u05e8 \u05d6\u05d0\u05ea \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0: \u05d1\u05de\u05e7\u05d5\u05dd \u05e9\u05d0\u05d1\u05d9\u05d0 \u05d0\u05ea \u05d0\u05e8\u05d5\u05d7\u05ea \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd \u05e9\u05dc\u05d9 \u05d1\u05e2\u05e6\u05de\u05d9 \u2013 \u05d9\u05d4\u05d9\u05d4 \u05e7\u05d9\u05d9\u05d8\u05e8\u05d9\u05e0\u05d2\u2026.. \u05d1\u05db\u05dc \u05de\u05e7\u05e8\u05d4 \u05d0\u05e0\u05d9 \u05d9\u05d5\u05d3\u05e2 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05d0\u05d5\u05db\u05dc \u05d1\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd, \u05d0\u05d1\u05dc \u05d1\u05de\u05e7\u05d5\u05dd \u05e9\u05d0\u05e0\u05d9 \u05d0\u05d3\u05d0\u05d2 \u05dc\u05d6\u05d4, \u05de\u05d9\u05e9\u05d4\u05d5 \u05d0\u05d7\u05e8 \u05d3\u05d5\u05d0\u05d2 \u05dc\u05d6\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05d3\u05e8\u05da \u05db\u05dc\u05dc \u05d4\u05d6\u05e8\u05e7\u05ea \u05d4\u05ea\u05dc\u05d5\u05d9\u05d5\u05ea \u05ea\u05ea\u05e8\u05d7\u05e9 \u05d3\u05e8\u05da \u05d4 Construcor.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d3\u05d5\u05d2\u05de\u05d0:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05de\u05d7\u05dc\u05e7\u05d4 \u05d1\u05e9\u05dd Till \u05d4\u05de\u05ea\u05d0\u05e8\u05ea \u05d4\u05ea\u05e0\u05d4\u05d2\u05d5\u05ea \u05e9\u05dc \u05e7\u05d5\u05e4\u05d4 \u05d1\u05d7\u05e0\u05d5\u05ea, \u05d5\u05d4\u05d9\u05d0 \u05e6\u05e8\u05d9\u05db\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05d0\u05de\u05e6\u05e2\u05d9 \u05ea\u05e9\u05dc\u05d5\u05dd. \u05d0\u05e0\u05d9 \u05d9\u05d5\u05e6\u05e8 Interface \u05d1\u05e9\u05dd ITender, \u05d5\u05db\u05dc \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05e9\u05dc\u05d9 \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05d5\u05ea\u05d5. \u05d1 Constructor \u05e9\u05dc Till \u05e0\u05e6\u05d8\u05e8\u05da &#8216;\u05dc\u05d4\u05d6\u05e8\u05d9\u05e7&#8217; \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05d5 \u05d0\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05e9\u05ea\u05de\u05e9.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> ITender tender = <span style=\"color: #0000ff\">new<\/span> CreditCard();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> Till till = <span style=\"color: #0000ff\">new<\/span> Till(tender);<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Till<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span>         <span style=\"color: #0000ff\">private<\/span> <span style=\"color: #0000ff\">readonly<\/span> ITender _tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span>     <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span>         <span style=\"color: #0000ff\">public<\/span> Till(ITender tender)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span>         _tender = tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum10\" style=\"color: #606060\">  10:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum11\" style=\"color: #606060\">  11:<\/span>     }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05d5\u05db\u05da \u05d1\u05d0\u05d5\u05e4\u05df \u05e4\u05e9\u05d5\u05d8 \u05d1\u05d9\u05d5\u05ea\u05e8 \u05de\u05d9\u05de\u05e9\u05e0\u05d5 DI.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d9\u05e9\u05e0\u05d4 \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05de\u05de\u05e9 DI \u05dc\u05d0 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4 Constructor \u05d0\u05dc\u05d0 \u05e2\u05dc \u05d9\u05d3\u05d9 Setter \u05e9\u05dc Property, \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> ITender tender = <span style=\"color: #0000ff\">new<\/span> CreditCard();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> Till till = <span style=\"color: #0000ff\">new<\/span> Till();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span> till.Tender = tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Till<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span>       <span style=\"color: #0000ff\">public<\/span> ITender Tender { get; set; }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d6\u05d4\u05e8 \u05dc\u05d0 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e9\u05d3\u05d4 \u05d4\u05d6\u05d4 \u05dc\u05e4\u05e0\u05d9 \u05e9\u05d4\u05d5\u05d0 \u05d0\u05d5\u05ea\u05d7\u05dc.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e4\u05d9 \u05e9\u05e0\u05d9\u05ea\u05df \u05dc\u05e8\u05d0\u05d5\u05ea, \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 Till \u05dc\u05d0 \u05d9\u05d5\u05d3\u05e2\u05ea \u05e9\u05d5\u05dd \u05d3\u05d1\u05e8 \u05e2\u05dc \u05db\u05e8\u05d8\u05d9\u05e1\u05d9 \u05d0\u05e9\u05e8\u05d0\u05d9, \u05e6&#8217;\u05e7\u05d9\u05dd, \u05de\u05d6\u05d5\u05de\u05df \u05d0\u05d5 \u05db\u05dc \u05d0\u05de\u05e6\u05e2\u05d9 \u05ea\u05e9\u05dc\u05d5\u05dd \u05e9\u05d9\u05de\u05e6\u05d9\u05d0\u05d5 \u05d1\u05e2\u05ea\u05d9\u05d3. \u05d4\u05d9\u05d0 \u05de\u05db\u05d9\u05e8\u05d4 \u05e8\u05e7 \u05d0\u05ea ITender \u05d5\u05e8\u05e7 \u05d1\u05d6\u05d4 \u05d4\u05d9\u05d0 \u05ea\u05dc\u05d5\u05d9\u05d4. \u05d4\u05d6\u05e8\u05e7\u05ea \u05d4\u05ea\u05dc\u05d5\u05ea \u05d4\u05d6\u05d5, \u05db\u05dc\u05d5\u05de\u05e8 \u05d4\u05d2\u05d3\u05e8\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d4\u05de\u05d3\u05d5\u05d9\u05d9\u05e7, \u05d9\u05e2\u05e9\u05d4 \u05d1\u05de\u05d7\u05dc\u05e7\u05d4 \u05d0\u05d7\u05e8\u05ea.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d3\u05e8\u05da \u05e0\u05d5\u05e1\u05e4\u05ea \u05dc\u05d4\u05d6\u05e8\u05d9\u05e7 \u05ea\u05dc\u05d5\u05d9\u05d5\u05ea, \u05d0\u05dd \u05db\u05d9 \u05d3\u05e8\u05da \u05d6\u05d5 \u05d4\u05d9\u05d0 \u05e4\u05d7\u05d5\u05ea \u05de\u05e6\u05d5\u05d9\u05d4, \u05d4\u05d9\u05d0 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d9\u05e6\u05d9\u05e8\u05ea Interface \u05e0\u05d5\u05e1\u05e3 \u05d0\u05e9\u05e8 \u05d1\u05d5 \u05d9\u05e9 \u05de\u05ea\u05d5\u05d3\u05ea Inject \u05d5\u05de\u05d9 \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05d5\u05ea\u05d4 (\u05d4\u05de\u05d7\u05dc\u05e7\u05d4 Till \u05d1\u05d3\u05d5\u05d2\u05de\u05d0 \u05e9\u05dc\u05e0\u05d5) \u05d9\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4\u05e9\u05d3\u05d4 \u05d4\u05e8\u05e6\u05d5\u05d9, \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05d6\u05e8\u05e7\u05d4 \u05db\u05de\u05d5 \u05d1\u05d3\u05d5\u05d2\u05de\u05d4 \u05d4\u05e7\u05d5\u05d3\u05de\u05ea (\u05d4\u05d4\u05d1\u05d3\u05dc \u05d4\u05d5\u05d0 \u05e9\u05db\u05d0\u05df \u05d6\u05d4 \u05de\u05ea\u05d1\u05e6\u05e2 \u05d1\u05ea\u05d5\u05da \u05de\u05ea\u05d5\u05d3\u05d4 \u05d9\u05e2\u05d5\u05d3\u05d9\u05ea \u05e9\u05e0\u05db\u05e4\u05ea\u05d4 \u05e2\u05dc\u05d9\u05e0\u05d5 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4Interface).<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05de\u05d4 \u05d7\u05e1\u05e8\u05d5\u05e0\u05d5\u05ea \u05e9\u05dc DI \u05d4\u05dd:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d7\u05d5\u05e9\u05e4\u05d9\u05dd \u05d4\u05d7\u05d5\u05e6\u05d4 \u05db\u05de\u05d4 \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd \u05e9\u05d1\u05d3\u05e8\u05da \u05db\u05dc\u05dc \u05d9\u05d4\u05d9\u05d5 \u05de\u05d5\u05e1\u05ea\u05e8\u05d9\u05dd \u05d1\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05e0\u05d5.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd \u05d0\u05ea \u05d4\u05ea\u05dc\u05d5\u05d9\u05d5\u05ea \u05e9\u05dc\u05e0\u05d5 \u05dc\u05e4\u05e0\u05d9 \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05d1\u05d0\u05de\u05ea \u05e6\u05e8\u05d9\u05db\u05d9\u05dd \u05d0\u05d5\u05ea\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d2. \u05d5\u05d4\u05e0\u05d4 \u05d7\u05e1\u05e8\u05d5\u05df \u05e9\u05d4\u05d5\u05d0 \u05d2\u05dd \u05d9\u05ea\u05e8\u05d5\u05df \u2013 \u05d9\u05d5\u05ea\u05e8 \u05e7\u05dc&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20140919014141\/http:\/\/blogs.microsoft.co.il\/ernan\/2014\/04\/06\/unit-tests-%D7%9E%D7%93%D7%A8%D7%99%D7%9A-%D7%9C%D7%99%D7%97%D7%99%D7%93%D7%95%D7%AA-%D7%91%D7%93%D7%99%D7%A7%D7%94\/\">\u05dc\u05e2\u05e9\u05d5\u05ea unit test<\/a>&nbsp;\u05d1\u05de\u05e7\u05e8\u05d4 \u05e9\u05dc DI \u05d1\u05d2\u05dc\u05dc \u05e9\u05dc Interface \u05d0\u05e4\u05e9\u05e8&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20140919014141\/http:\/\/blogs.microsoft.co.il\/ernan\/2014\/06\/09\/%D7%9E%D7%93%D7%A8%D7%99%D7%9A-%D7%9C%D7%A9%D7%99%D7%9E%D7%95%D7%A9-%D7%91-mock-%D7%91-unit-tests\/\">\u05dc\u05e2\u05e9\u05d5\u05ea Moq,<\/a>&nbsp;\u05d0\u05d1\u05dc \u05d6\u05d4 \u05d2\u05dd \u05d4\u05d7\u05d9\u05e1\u05e8\u05d5\u05df, \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d9\u05ea\u05db\u05df \u05d5\u05dc\u05d0 \u05e0\u05d1\u05d3\u05d5\u05e7 \u05db\u05e8\u05d0\u05d5\u05d9 \u05d0\u05ea \u05de\u05d4 \u05e9\u05ea\u05db\u05e0\u05e0\u05d5 \u05dc\u05d1\u05d3\u05d5\u05e7.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>\u05d1\u05e0\u05d9\u05d9\u05ea IoC<\/strong><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9 \u05e0\u05d9\u05ea\u05df \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8 \u05e9 IoC \u05d4\u05d9\u05d0 \u05ea\u05e9\u05ea\u05d9\u05ea \u05dc\u05e6\u05d5\u05e8\u05da \u05e2\u05d1\u05d5\u05d3\u05d4 \u05e2\u05dd Dependency Injection. \u05de\u05d4\u05e1\u05d9\u05d1\u05d4 \u05d4\u05d6\u05d5 \u05d9\u05e9 \u05db\u05de\u05d4 \u05ea\u05e9\u05ea\u05d9\u05d5\u05ea \u05de\u05d5\u05db\u05e0\u05d5\u05ea \u05db\u05d2\u05d5\u05df UNITY \u05e9\u05dc \u05de\u05d9\u05e7\u05e8\u05d5\u05e1\u05d5\u05e4\u05d8 \u05d0\u05d5 castle of Windsor \u05d0\u05e9\u05e8 \u05d7\u05d5\u05e1\u05db\u05d5\u05ea \u05dc\u05e0\u05d5 \u05dc\u05db\u05ea\u05d5\u05d1 \u05d0\u05ea \u05d4\u05ea\u05e9\u05ea\u05d9\u05ea \u05d1\u05db\u05dc \u05e4\u05e2\u05dd \u05de\u05d7\u05d3\u05e9.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d5\u05dc\u05de\u05e8\u05d5\u05ea \u05e9\u05e0\u05d5\u05d7 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05ea\u05e9\u05ea\u05d9\u05d5\u05ea \u05d0\u05dc\u05d5, \u05d8\u05d5\u05d1 \u05dc\u05d4\u05d1\u05d9\u05df \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9 \u05d0\u05d9\u05da \u05d4\u05df \u05e2\u05d5\u05d1\u05d3\u05d5\u05ea \u05d5\u05de\u05d4 \u05de\u05ea\u05e8\u05d7\u05e9 \u05de\u05d0\u05d7\u05d5\u05e8\u05d9 \u05d4\u05e7\u05dc\u05e2\u05d9\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e0\u05e9\u05ea\u05de\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05de\u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05e9\u05dc DI.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">class<\/span> Program<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span>     <span style=\"color: #0000ff\">static<\/span> <span style=\"color: #0000ff\">void<\/span> Main(<span style=\"color: #0000ff\">string<\/span>[] args)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span>         ITender tender = <span style=\"color: #0000ff\">new<\/span> CreditCard();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span>         Till till = <span style=\"color: #0000ff\">new<\/span> Till(tender);<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum10\" style=\"color: #606060\">  10:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Till<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum11\" style=\"color: #606060\">  11:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum12\" style=\"color: #606060\">  12:<\/span>     <span style=\"color: #0000ff\">private<\/span> <span style=\"color: #0000ff\">readonly<\/span> ITender _tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum13\" style=\"color: #606060\">  13:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum14\" style=\"color: #606060\">  14:<\/span>     <span style=\"color: #0000ff\">public<\/span> Till(ITender tender)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum15\" style=\"color: #606060\">  15:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum16\" style=\"color: #606060\">  16:<\/span>         _tender = tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum17\" style=\"color: #606060\">  17:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum18\" style=\"color: #606060\">  18:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum19\" style=\"color: #606060\">  19:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum20\" style=\"color: #606060\">  20:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> CreditCard : ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum21\" style=\"color: #606060\">  21:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum22\" style=\"color: #606060\">  22:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum23\" style=\"color: #606060\">  23:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum24\" style=\"color: #606060\">  24:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">interface<\/span> ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum25\" style=\"color: #606060\">  25:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum26\" style=\"color: #606060\">  26:<\/span> }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea \u05e0\u05e2\u05e9\u05d4 \u05db\u05de\u05d4 \u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e0\u05d5\u05e1\u05d9\u05e3 \u05de\u05ea\u05d5\u05d3\u05ea Charge \u05d1\u05de\u05d7\u05dc\u05e7\u05d4 Till \u05d5\u05de\u05ea\u05d5\u05d3\u05d4 \u05d6\u05d5 \u05ea\u05e7\u05e8\u05d0 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 \u05d6\u05d4\u05d4 \u05d4\u05e7\u05d9\u05d9\u05de\u05ea \u05d1\u05db\u05dc \u05de\u05d9 \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05ea ITender. \u05de\u05ea\u05d5\u05d3\u05d4 \u05d6\u05d5 \u05de\u05d3\u05e4\u05d9\u05e1\u05d4 \u05d4\u05d5\u05d3\u05e2\u05d4 \u05db\u05dc\u05e9\u05d4\u05d9.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05de\u05d5 \u05db\u05df \u05e0\u05d9\u05e6\u05d5\u05e8 \u05d1\u05e9\u05d1\u05d9\u05dc \u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05e2\u05d5\u05d3 \u05de\u05d7\u05dc\u05e7\u05d4 \u05d1\u05e9\u05dd Cash \u05dc\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05de\u05d6\u05d5\u05de\u05df \u2013 \u05d2\u05dd \u05de\u05d7\u05dc\u05e7\u05d4 \u05d6\u05d5 \u05db\u05de\u05d5\u05d1\u05df \u05d9\u05d5\u05e8\u05e9\u05ea \u05de ITender.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Till<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span>     <span style=\"color: #0000ff\">private<\/span> <span style=\"color: #0000ff\">readonly<\/span> ITender _tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span>     <span style=\"color: #0000ff\">public<\/span> Till(ITender tender)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span>         _tender = tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum10\" style=\"color: #606060\">  10:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">string<\/span> Charge()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum11\" style=\"color: #606060\">  11:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum12\" style=\"color: #606060\">  12:<\/span>         <span style=\"color: #0000ff\">return<\/span> _tender.Charge();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum13\" style=\"color: #606060\">  13:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum14\" style=\"color: #606060\">  14:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum15\" style=\"color: #606060\">  15:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum16\" style=\"color: #606060\">  16:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> CreditCard : ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum17\" style=\"color: #606060\">  17:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum18\" style=\"color: #606060\">  18:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">string<\/span> Charge()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum19\" style=\"color: #606060\">  19:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum20\" style=\"color: #606060\">  20:<\/span>         <span style=\"color: #0000ff\">return<\/span> <span style=\"color: #006080\">\"CreditCard\"<\/span>;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum21\" style=\"color: #606060\">  21:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum22\" style=\"color: #606060\">  22:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum23\" style=\"color: #606060\">  23:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Cash : ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum24\" style=\"color: #606060\">  24:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum25\" style=\"color: #606060\">  25:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">string<\/span> Charge()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum26\" style=\"color: #606060\">  26:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum27\" style=\"color: #606060\">  27:<\/span>         <span style=\"color: #0000ff\">return<\/span> <span style=\"color: #006080\">\"Cash\"<\/span>;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum28\" style=\"color: #606060\">  28:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum29\" style=\"color: #606060\">  29:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum30\" style=\"color: #606060\">  30:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum31\" style=\"color: #606060\">  31:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">interface<\/span> ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum32\" style=\"color: #606060\">  32:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum33\" style=\"color: #606060\">  33:<\/span>     <span style=\"color: #0000ff\">string<\/span> Charge();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum34\" style=\"color: #606060\">  34:<\/span> } <\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea \u05db\u05de\u05d5\u05d1\u05df \u05e9\u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05d7\u05dc\u05d9\u05d8 \u05d4\u05d0\u05dd \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e9\u05d5\u05dc\u05d7\u05d9\u05dd \u05d1Constructor \u05e9\u05dc \u05d4\u05e7\u05d5\u05e4\u05d4 \u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05de\u05d6\u05d5\u05de\u05df \u05d0\u05d5 \u05d1\u05d0\u05e9\u05e8\u05d0\u05d9 \u05d5\u05d4\u05d4\u05d5\u05d3\u05e2\u05d4 \u05ea\u05d5\u05d3\u05e4\u05e1 \u05d1\u05d4\u05ea\u05d0\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0\u05d1\u05dc \u2013 \u05d6\u05d4 \u05e2\u05d3\u05d9\u05d9\u05df \u05dc\u05d0 \u05db\u05dc \u05db\u05da \u05e0\u05d5\u05d7. \u05d4\u05d9\u05d9\u05ea\u05d9 \u05de\u05e2\u05d3\u05d9\u05e3 \u05e9\u05dc\u05d0 \u05dc\u05d4\u05d7\u05dc\u05d9\u05d8 \u05d1\u05ea\u05d5\u05da \u05d4\u05e7\u05d5\u05d3 \u05d1\u05d0\u05d9\u05d6\u05d4 \u05d0\u05de\u05e6\u05e2\u05d9 \u05ea\u05e9\u05dc\u05d5\u05dd \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d0\u05dc\u05d0 \u05e9\u05de\u05d9\u05e9\u05d4\u05d5 \u05d0\u05d7\u05e8 \u05d9\u05e2\u05e9\u05d4 \u05d6\u05d0\u05ea \u05e2\u05d1\u05d5\u05e8\u05d9. \u05e9\u05d0\u05d5\u05db\u05dc \u05dc\u05e7\u05e8\u05d5\u05d0 \u05dc\u05d0\u05d9\u05d6\u05d5\u05e9\u05d4\u05d9 \u05de\u05d7\u05dc\u05e7\u05d4 \u05e2\u05dd \u05de\u05ea\u05d5\u05d3\u05d4 \u05de\u05e1\u05d5\u05d9\u05d9\u05de\u05ea \u05d5\u05d4\u05d9\u05d0 \u05db\u05d1\u05e8 \u05ea\u05d7\u05d6\u05d9\u05e8 \u05dc\u05d9 \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05d3\u05e8\u05da \u05db\u05dc\u05e9\u05d4\u05d9. \u05d5\u05db\u05da \u05d0\u05d5\u05db\u05dc \u05dc\u05de\u05e9\u05dc \u05dc\u05e9\u05de\u05d5\u05e8 \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05e7\u05d5\u05d1\u05e5 XML \u05d0\u05d5 \u05d1\u05d0\u05d5\u05e4\u05df \u05d0\u05d7\u05e8.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0\u05dd \u05db\u05da, \u05d0\u05e0\u05d9 \u05de\u05d9\u05d9\u05e6\u05e8 \u05de\u05d7\u05dc\u05e7\u05d4 \u05d1\u05e9\u05dd Resolver \u05d5\u05d1\u05d4 \u05d9\u05e9 \u05de\u05ea\u05d5\u05d3\u05d4 \u05d1\u05e9\u05dd ResolveTender \u05d4\u05de\u05d7\u05d6\u05d9\u05e8\u05d4 \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05de\u05e1\u05d5\u05d2 ITender.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05e2\u05d5\u05dc\u05dd \u05d4\u05d0\u05de\u05d9\u05ea\u05d9 \u05ea\u05d4\u05d9\u05d4 \u05dc\u05d5\u05d2\u05d9\u05e7\u05d4 \u05d4\u05d2\u05d9\u05d5\u05e0\u05d9\u05ea \u05e9\u05ea\u05d7\u05dc\u05d9\u05d8 \u05de\u05d4 \u05dc\u05d4\u05d7\u05d6\u05d9\u05e8 \u05d0\u05d5 \u05de\u05e7\u05d5\u05e8 \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd \u05db\u05dc\u05e9\u05d4\u05d5, \u05d0\u05d1\u05dc \u05d1\u05e9\u05d1\u05d9\u05dc \u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05db\u05ea\u05d1\u05ea\u05d9 \u05ea\u05e0\u05d0\u05d9 \u05de\u05e9\u05ea\u05e0\u05d4 (\u05d4\u05d0\u05dd \u05d4\u05e9\u05e0\u05d9\u05d9\u05d4 \u05db\u05e8\u05d2\u05e2 \u05d6\u05d5\u05d2\u05d9\u05ea \u05d0\u05d5 \u05d0\u05d9 \u05d6\u05d5\u05d2\u05d9\u05ea) \u05db\u05d0\u05e9\u05e8 \u05d1\u05db\u05dc \u05de\u05e7\u05e8\u05d4 \u05d4\u05d9\u05d0 \u05de\u05d7\u05d6\u05d9\u05e8\u05d4 \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d0\u05d7\u05e8.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e0\u05d9\u05e8\u05d0\u05ea \u05db\u05da:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Resolver<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span>     <span style=\"color: #0000ff\">public<\/span> ITender ResolveTender()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span>         <span style=\"color: #0000ff\">if<\/span> (DateTime.Now.Second % 2 == 0)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span>             <span style=\"color: #0000ff\">return<\/span> <span style=\"color: #0000ff\">new<\/span> CreditCard();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span>         <span style=\"color: #0000ff\">else<\/span><\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum10\" style=\"color: #606060\">  10:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum11\" style=\"color: #606060\">  11:<\/span>             <span style=\"color: #0000ff\">return<\/span> <span style=\"color: #0000ff\">new<\/span> Cash();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum12\" style=\"color: #606060\">  12:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum13\" style=\"color: #606060\">  13:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum14\" style=\"color: #606060\">  14:<\/span> }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05d5\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05d4 \u05d9\u05d4\u05d9\u05d4 \u05db\u05da:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> Resolver resolver = <span style=\"color: #0000ff\">new<\/span> Resolver();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> Till till = <span style=\"color: #0000ff\">new<\/span> Till(resolver.ResolveTender());<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span> var message = till.Charge();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span> Console.WriteLine(message);<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea, \u05d0\u05dd \u05e0\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05d4\u05e7\u05d8\u05e0\u05d4 \u05e9\u05dc\u05e0\u05d5 \u05d4\u05d9\u05d0 \u05ea\u05d3\u05e4\u05d9\u05e1 \u05dc\u05e4\u05e2\u05de\u05d9\u05dd Cash \u05d5\u05dc\u05e4\u05e2\u05de\u05d9\u05dd CreditCard.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d6\u05d4 \u05d4\u05e8\u05e2\u05d9\u05d5\u05df \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9, \u05d0\u05d1\u05dc \u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05d7\u05e4\u05e9\u05d9\u05dd \u05e4\u05d9\u05ea\u05e8\u05d5\u05df \u05d9\u05d5\u05ea\u05e8 \u05d2\u05e0\u05e8\u05d9. \u05d4\u05d9\u05d9\u05e0\u05d5 \u05de\u05e2\u05d3\u05d9\u05e4\u05d9\u05dd \u05d1\u05de\u05e7\u05d5\u05dd \u05d4\u05e9\u05d5\u05e8\u05d4<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> Till till = <span style=\"color: #0000ff\">new<\/span> Till(resolver.ResolveTender());<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05de\u05e9\u05d4\u05d5 \u05e9\u05e0\u05e8\u05d0\u05d4 \u05d9\u05d5\u05ea\u05e8 \u05d3\u05d5\u05de\u05d4 \u05dc\u05d6\u05d4<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> Till till = resolver.Resolve&lt;Till&gt;();<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05e9\u05d1\u05d9\u05dc \u05e9\u05d3\u05d1\u05e8 \u05db\u05d6\u05d4 \u05d9\u05e2\u05d1\u05d5\u05d3 \u05e0\u05e6\u05d8\u05e8\u05da \u05e7\u05e6\u05ea Reflection.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e8\u05d0\u05e9\u05d9\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 Dictionary \u05e9\u05d1\u05e2\u05d6\u05e8\u05ea\u05d5 \u05e0\u05de\u05e4\u05d4 \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05e9\u05dc\u05e0\u05d5.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d4\u05e9\u05d5\u05e8\u05d4 \u05ea\u05d9\u05e8\u05d0\u05d4 \u05db\u05da:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">private<\/span> Dictionary&lt;Type,Type&gt; _map = <span style=\"color: #0000ff\">new<\/span> Dictionary&lt;Type, Type&gt;();<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05d0\u05e9\u05e8 \u05d4Type \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05de\u05e1\u05de\u05df \u05d0\u05ea \u05d4\u05d0\u05d9\u05e0\u05d8\u05e8\u05e4\u05d9\u05d9\u05e1 (ITender \u05d1\u05de\u05e7\u05e8\u05d4 \u05e9\u05dc\u05e0\u05d5)<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d5\u05d4Type \u05d4\u05e9\u05e0\u05d9 \u05de\u05e1\u05de\u05df \u05de\u05d9\u05de\u05d5\u05e9 \u05e7\u05d5\u05e0\u05e7\u05e8\u05d8\u05d9 \u05e9\u05dc\u05d5 (\u05dc\u05de\u05e9\u05dc Cash)<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05ea\u05d5\u05da \u05d4\u05de\u05ea\u05d5\u05d3\u05d4 Resolve \u05e9\u05db\u05d6\u05db\u05d5\u05e8 \u05de\u05e7\u05d1\u05dc\u05ea T \u05db\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d2\u05e0\u05e8\u05d9, \u05e0\u05d9\u05e7\u05e8\u05d0 \u05dc\u05de\u05ea\u05d5\u05d3\u05ea Resolve \u05e0\u05d5\u05e1\u05e4\u05ea, \u05d0\u05d1\u05dc \u05d4\u05e4\u05e2\u05dd \u05e2\u05dd Type \u05e1\u05e4\u05e6\u05d9\u05e4\u05d9.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e0\u05e2\u05e9\u05d4 \u05d0\u05ea \u05d6\u05d4 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1 typeof.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d1\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05d7\u05d3\u05e9\u05d4 \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05e0\u05d1\u05d3\u05d5\u05e7 \u05d0\u05dd \u05d4Type \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5 \u05e0\u05de\u05e6\u05d0 \u05d1\u05ea\u05d5\u05da \u05d4 Dictionary \u05e9\u05dc\u05e0\u05d5 \u05d5\u05d0\u05dd \u05dc\u05d0 \u05e0\u05d6\u05e8\u05d5\u05e7 \u05d4\u05d5\u05d3\u05e2\u05ea \u05e9\u05d2\u05d9\u05d0\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> Type resolvedType = <span style=\"color: #0000ff\">null<\/span>;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> <span style=\"color: #0000ff\">try<\/span><\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>     resolvedType = _map[typeToResolve];<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span> }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span> <span style=\"color: #0000ff\">catch<\/span> (Exception)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span>     <span style=\"color: #0000ff\">throw<\/span> <span style=\"color: #0000ff\">new<\/span> Exception(<span style=\"color: #0000ff\">string<\/span>.Format(<span style=\"color: #006080\">\"Could not find {0}\"<\/span>, typeToResolve.FullName));<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span> }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea \u05e0\u05d9\u05e8\u05e6\u05d4 \u05dc\u05d0\u05ea\u05d7\u05dc \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05de\u05d4Type \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5. \u05d0\u05d1\u05dc \u05e4\u05d4 \u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d1\u05e2\u05d9\u05d4, \u05d1\u05d2\u05dc\u05dc \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05dc\u05d0 \u05d9\u05d5\u05d3\u05e2\u05d9\u05dd \u05d4\u05d0\u05dd \u05d9\u05e9 \u05e9\u05dd Constructor \u05e2\u05dd \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e0\u05ea\u05d7\u05d9\u05dc \u05d1\u05de\u05e7\u05e8\u05d4 \u05d4\u05e4\u05e9\u05d5\u05d8 \u05e9\u05d1\u05d5 \u05d0\u05d9\u05df \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05dc Type \u05d9\u05e9 \u05de\u05ea\u05d5\u05d3\u05d4 \u05d1\u05e9\u05dd GetConstructors \u05e9\u05ea\u05d7\u05d6\u05d9\u05e8 \u05dc\u05e0\u05d5 (\u05d1\u05ea\u05d5\u05e1\u05e4\u05ea First ) \u05d0\u05ea \u05d4Constructor \u05d4\u05e8\u05d0\u05e9\u05d5\u05df. \u05d5\u05d0\u05d6 \u05e0\u05d5\u05db\u05dc \u05dc\u05d1\u05d3\u05d5\u05e7 \u05de\u05d4\u05dd \u05d4\u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 GetParameters.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05e2\u05db\u05e9\u05d9\u05d5 \u05e0\u05d9\u05e6\u05d5\u05e8 \u05ea\u05e0\u05d0\u05d9 \u2013<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0\u05dd \u05d0\u05d9\u05df \u05dc\u05d9 \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05d0\u05d9\u05d9\u05e6\u05e8 \u05de\u05d5\u05e4\u05e2 \u05de\u05d4\u05e1\u05d5\u05d2 \u05e9\u05e7\u05d9\u05d1\u05dc\u05ea\u05d9 \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> Activator.CreateInstance(resolvedType);<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>Activator \u05de\u05d0\u05e4\u05e9\u05e8 \u05dc\u05d9 \u05dc\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9, \u05d1\u05d3\u05d9\u05d5\u05e7 \u05db\u05de\u05d5 \u05d1\u05de\u05d9\u05dc\u05d4 New, \u05d0\u05dc\u05d0 \u05e9\u05d4\u05d9\u05d0 \u05e2\u05d5\u05e9\u05d4 \u05d0\u05ea \u05d6\u05d4 \u05db\u05e0\u05d2\u05d3 Type.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0\u05dd \u05d4Constructor \u05e9\u05dc\u05d9 \u05e6\u05e8\u05d9\u05da \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd, \u05d0\u05e6\u05d5\u05e8 \u05e8\u05e9\u05d9\u05de\u05d4 \u05de\u05e1\u05d5\u05d2 object \u05d4\u05de\u05db\u05d9\u05dc\u05d4 \u05d0\u05ea \u05d4\u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05e9\u05d0\u05e0\u05d9 \u05e6\u05e8\u05d9\u05da \u05d5\u05d6\u05d0\u05ea \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 Resolve \u05e9\u05d0\u05d5\u05ea\u05d4 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d9\u05e6\u05e8\u05e0\u05d5. \u05d5\u05dc\u05db\u05df \u05e0\u05e9\u05dc\u05d7 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d5 \u05dc\u05d0 \u05d0\u05ea \u05d4\u05e4\u05e8\u05de\u05d8\u05e8 \u05d0\u05dc\u05d0 \u05d0\u05ea \u05d4\u05d8\u05d9\u05e4\u05d5\u05e1 \u05e9\u05dc\u05d5.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> IList&lt;<span style=\"color: #0000ff\">object<\/span>&gt; parameters = <span style=\"color: #0000ff\">new<\/span> List&lt;<span style=\"color: #0000ff\">object<\/span>&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> <span style=\"color: #0000ff\">foreach<\/span> (var constructorParameter <span style=\"color: #0000ff\">in<\/span> constructorParameters)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>     parameters.Add(Resolve(constructorParameter.ParameterType));<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span> }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea \u05dc\u05d0 \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1Activator \u05db\u05d3\u05d9 \u05dc\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9 \u05d0\u05dc\u05d0 \u05e0\u05e9\u05ea\u05de\u05e9 \u05d1\u05de\u05ea\u05d5\u05d3\u05ea invoke \u05d4\u05de\u05e7\u05d1\u05dc\u05ea \u05de\u05e2\u05e8\u05da \u05e9\u05dc \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">return<\/span> firstConstructor.Invoke(parameters.ToArray());<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea \u05d9\u05e9 \u05dc\u05e0\u05d5 Container \u05e9\u05dc IoC \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05d1\u05e2\u05e6\u05de\u05e0\u05d5.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d0\u05de\u05e0\u05dd \u05d0\u05dd \u05e0\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d6\u05d4 \u05e2\u05db\u05e9\u05d9\u05d5, \u05d6\u05d4 \u05dc\u05d0 \u05d9\u05e2\u05d1\u05d5\u05d3 \u05d1\u05d2\u05dc\u05dc \u05e9\u05e2\u05d3\u05d9\u05d9\u05df \u05dc\u05d0 \u05de\u05d9\u05e4\u05d9\u05e0\u05d5 \u05d0\u05ea \u05d4\u05de\u05d7\u05dc\u05e7\u05d5\u05ea \u05e9\u05dc\u05e0\u05d5.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05dc\u05e6\u05d5\u05e8\u05da \u05d4\u05de\u05d9\u05e4\u05d5\u05d9 \u05e0\u05d9\u05e6\u05d5\u05e8 \u05d1 IoC \u05e9\u05dc\u05e0\u05d5 \u05de\u05ea\u05d5\u05d3\u05ea Register \u05d4\u05de\u05e7\u05d1\u05dc\u05ea \u05d0\u05ea \u05d4\u05de\u05d9\u05e4\u05d5\u05d9 \u05d5\u05de\u05d5\u05e1\u05d9\u05e4\u05d4 \u05dcDictionary \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">void<\/span> Register&lt;TFrom, TTo&gt;()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span>     _map.Add(<span style=\"color: #0000ff\">typeof<\/span>(TFrom), <span style=\"color: #0000ff\">typeof<\/span>(TTo));<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span> }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05e2\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4 \u05d2\u05dd \u05dc\u05de\u05d7\u05dc\u05e7\u05ea Till \u2013 \u05e9\u05de\u05de\u05d5\u05e4\u05d4 \u05dc\u05e2\u05e6\u05de\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d5\u05db\u05df \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05de\u05e4\u05d5\u05ea \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d4\u05e8\u05e6\u05d5\u05d9 \u05dc Itender<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> resolver.Register&lt;Till, Till&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> resolver.Register&lt;ITender, Cash&gt;()<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05e2\u05ea \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3 \u05d5\u05dc\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05d4\u05e8\u05e6\u05d5\u05d9\u05d4.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05db\u05d0\u05de\u05d5\u05e8 \u2013 \u05dc\u05d0 \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05e2\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4 \u05d1\u05e2\u05e6\u05de\u05e0\u05d5, \u05d9\u05e9 \u05ea\u05e9\u05ea\u05d9\u05d5\u05ea \u05e9\u05e2\u05d5\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4 \u05e2\u05dd \u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e8\u05d1\u05d5\u05ea. \u05d0\u05d1\u05dc \u05d6\u05d4 \u05d4\u05e2\u05d9\u05e7\u05e8\u05d5\u05df \u05e9\u05de\u05d0\u05d7\u05d5\u05e8\u05d9 \u05d4\u05e7\u05dc\u05e2\u05d9\u05dd.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u05d4\u05e7\u05d5\u05d3 \u05d1\u05db\u05dc\u05dc\u05d5\u05ea\u05d5 \u05dc\u05de\u05d9 \u05e9\u05de\u05e2\u05d5\u05e0\u05d9\u05d9\u05df:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:html -->\n<div id=\"codeSnippetWrapper\" style=\"overflow: auto;cursor: text;font-size: 8pt;border-top: silver 1px solid;font-family: 'Courier New', courier, monospace;border-right: silver 1px solid;width: 97.5%;border-bottom: silver 1px solid;padding-bottom: 4px;direction: ltr;text-align: left;padding-top: 4px;padding-left: 4px;margin: 20px 0px 10px;border-left: silver 1px solid;line-height: 12pt;padding-right: 4px;background-color: #f4f4f4\">\n<div id=\"codeSnippet\" style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\">\n<pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">using<\/span> System;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> <span style=\"color: #0000ff\">using<\/span> System.Collections.Generic;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span> <span style=\"color: #0000ff\">using<\/span> System.Linq;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span> <span style=\"color: #0000ff\">namespace<\/span> ConsoleApplication5<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span> {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span>     <span style=\"color: #0000ff\">class<\/span> Program<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span>         <span style=\"color: #0000ff\">static<\/span> <span style=\"color: #0000ff\">void<\/span> Main()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum10\" style=\"color: #606060\">  10:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum11\" style=\"color: #606060\">  11:<\/span>           var resolver = <span style=\"color: #0000ff\">new<\/span> Resolver();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum12\" style=\"color: #606060\">  12:<\/span>             resolver.Register&lt;Till, Till&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum13\" style=\"color: #606060\">  13:<\/span>             resolver.Register&lt;ITender, Cash&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum14\" style=\"color: #606060\">  14:<\/span>             resolver.Register&lt;ITender, CreditCard&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum15\" style=\"color: #606060\">  15:<\/span>             var till = resolver.Resolve&lt;Till&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum16\" style=\"color: #606060\">  16:<\/span>             var message = till.Charge();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum17\" style=\"color: #606060\">  17:<\/span>             Console.WriteLine(message);<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum18\" style=\"color: #606060\">  18:<\/span>             Console.Read();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum19\" style=\"color: #606060\">  19:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum20\" style=\"color: #606060\">  20:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum21\" style=\"color: #606060\">  21:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum22\" style=\"color: #606060\">  22:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum23\" style=\"color: #606060\">  23:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Resolver<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum24\" style=\"color: #606060\">  24:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum25\" style=\"color: #606060\">  25:<\/span>       <span style=\"color: #0000ff\">private<\/span> Dictionary&lt;Type, Type&gt; _map = <span style=\"color: #0000ff\">new<\/span> Dictionary&lt;Type, Type&gt;();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum26\" style=\"color: #606060\">  26:<\/span>         <span style=\"color: #0000ff\">public<\/span> T Resolve&lt;T&gt;()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum27\" style=\"color: #606060\">  27:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum28\" style=\"color: #606060\">  28:<\/span>             <span style=\"color: #0000ff\">return<\/span> (T)Resolve(<span style=\"color: #0000ff\">typeof<\/span>(T));<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum29\" style=\"color: #606060\">  29:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum30\" style=\"color: #606060\">  30:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum31\" style=\"color: #606060\">  31:<\/span>         <span style=\"color: #0000ff\">private<\/span> <span style=\"color: #0000ff\">object<\/span> Resolve(Type typeToResolve)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum32\" style=\"color: #606060\">  32:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum33\" style=\"color: #606060\">  33:<\/span>             Type resolvedType;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum34\" style=\"color: #606060\">  34:<\/span>             <span style=\"color: #0000ff\">try<\/span><\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum35\" style=\"color: #606060\">  35:<\/span>             {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum36\" style=\"color: #606060\">  36:<\/span>                 resolvedType = _map[typeToResolve];<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum37\" style=\"color: #606060\">  37:<\/span>             }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum38\" style=\"color: #606060\">  38:<\/span>             <span style=\"color: #0000ff\">catch<\/span> (Exception)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum39\" style=\"color: #606060\">  39:<\/span>             {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum40\" style=\"color: #606060\">  40:<\/span>                 <span style=\"color: #0000ff\">throw<\/span> <span style=\"color: #0000ff\">new<\/span> Exception(<span style=\"color: #0000ff\">string<\/span>.Format(<span style=\"color: #006080\">\"Could not find {0}\"<\/span>, typeToResolve.FullName));<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum41\" style=\"color: #606060\">  41:<\/span>             }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum42\" style=\"color: #606060\">  42:<\/span>             var firstConstructor = resolvedType.GetConstructors().First();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum43\" style=\"color: #606060\">  43:<\/span>             var constructorParameters = firstConstructor.GetParameters();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum44\" style=\"color: #606060\">  44:<\/span>             <span style=\"color: #0000ff\">if<\/span> (!constructorParameters.Any())<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum45\" style=\"color: #606060\">  45:<\/span>             {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum46\" style=\"color: #606060\">  46:<\/span>                 <span style=\"color: #0000ff\">return<\/span> Activator.CreateInstance(resolvedType);<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum47\" style=\"color: #606060\">  47:<\/span>             }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum48\" style=\"color: #606060\">  48:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum49\" style=\"color: #606060\">  49:<\/span>             IList&lt;<span style=\"color: #0000ff\">object<\/span>&gt; parameters = constructorParameters.Select(constructorParameter =&gt; Resolve(constructorParameter.ParameterType)).ToList();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum50\" style=\"color: #606060\">  50:<\/span>             <span style=\"color: #0000ff\">return<\/span> firstConstructor.Invoke(parameters.ToArray());<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum51\" style=\"color: #606060\">  51:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum52\" style=\"color: #606060\">  52:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum53\" style=\"color: #606060\">  53:<\/span>         <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">void<\/span> Register&lt;TFrom, TTo&gt;()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum54\" style=\"color: #606060\">  54:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum55\" style=\"color: #606060\">  55:<\/span>             _map.Add(<span style=\"color: #0000ff\">typeof<\/span>(TFrom), <span style=\"color: #0000ff\">typeof<\/span>(TTo));<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum56\" style=\"color: #606060\">  56:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum57\" style=\"color: #606060\">  57:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum58\" style=\"color: #606060\">  58:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum59\" style=\"color: #606060\">  59:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Till<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum60\" style=\"color: #606060\">  60:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum61\" style=\"color: #606060\">  61:<\/span>         <span style=\"color: #0000ff\">private<\/span> <span style=\"color: #0000ff\">readonly<\/span> ITender _tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum62\" style=\"color: #606060\">  62:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum63\" style=\"color: #606060\">  63:<\/span>         <span style=\"color: #0000ff\">public<\/span> Till(ITender tender)<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum64\" style=\"color: #606060\">  64:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum65\" style=\"color: #606060\">  65:<\/span>             _tender = tender;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum66\" style=\"color: #606060\">  66:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum67\" style=\"color: #606060\">  67:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum68\" style=\"color: #606060\">  68:<\/span>         <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">string<\/span> Charge()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum69\" style=\"color: #606060\">  69:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum70\" style=\"color: #606060\">  70:<\/span>             <span style=\"color: #0000ff\">return<\/span> _tender.Charge();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum71\" style=\"color: #606060\">  71:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum72\" style=\"color: #606060\">  72:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum73\" style=\"color: #606060\">  73:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum74\" style=\"color: #606060\">  74:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> CreditCard : ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum75\" style=\"color: #606060\">  75:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum76\" style=\"color: #606060\">  76:<\/span>         <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">string<\/span> Charge()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum77\" style=\"color: #606060\">  77:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum78\" style=\"color: #606060\">  78:<\/span>             <span style=\"color: #0000ff\">return<\/span> <span style=\"color: #006080\">\"CreditCard\"<\/span>;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum79\" style=\"color: #606060\">  79:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum80\" style=\"color: #606060\">  80:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum81\" style=\"color: #606060\">  81:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">class<\/span> Cash : ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum82\" style=\"color: #606060\">  82:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum83\" style=\"color: #606060\">  83:<\/span>         <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">string<\/span> Charge()<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum84\" style=\"color: #606060\">  84:<\/span>         {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum85\" style=\"color: #606060\">  85:<\/span>             <span style=\"color: #0000ff\">return<\/span> <span style=\"color: #006080\">\"Cash\"<\/span>;<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum86\" style=\"color: #606060\">  86:<\/span>         }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum87\" style=\"color: #606060\">  87:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum88\" style=\"color: #606060\">  88:<\/span>&nbsp; <\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum89\" style=\"color: #606060\">  89:<\/span>     <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">interface<\/span> ITender<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum90\" style=\"color: #606060\">  90:<\/span>     {<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum91\" style=\"color: #606060\">  91:<\/span>         <span style=\"color: #0000ff\">string<\/span> Charge();<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: #f4f4f4\"><span id=\"lnum92\" style=\"color: #606060\">  92:<\/span>     }<\/pre>\n<p><!--CRLF-->\n<\/p><pre style=\"border-top-style: none;overflow: visible;font-size: 8pt;font-family: 'Courier New', courier, monospace;width: 100%;border-bottom-style: none;color: black;padding-bottom: 0px;direction: ltr;text-align: left;padding-top: 0px;border-right-style: none;padding-left: 0px;margin: 0em;border-left-style: none;line-height: 12pt;padding-right: 0px;background-color: white\"><span id=\"lnum93\" style=\"color: #606060\">  93:<\/span> }<\/pre>\n<p><!--CRLF--><\/p><\/div>\n<\/div>\n<!-- \/wp:html -->\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Inversion of Control (\u05dc\u05d4\u05dc\u05df Ioc), \u05d4\u05d9\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05d0\u05e9\u05e8 \u05e0\u05d9\u05ea\u05df \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8\u05d4 \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9, \u05db\u05d4\u05e2\u05d1\u05e8\u05ea \u05d4\u05e9\u05dc\u05d9\u05d8\u05d4 \u05e2\u05dc \u05ea\u05d4\u05dc\u05d9\u05da \u05db\u05dc\u05e9\u05d4\u05d5, \u05db\u05d2\u05d5\u05df \u05d9\u05e6\u05d9\u05e8\u05ea \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd, \u05d4\u05e8\u05e6\u05ea \u05e7\u05d8\u05e2 \u05e7\u05d5\u05d3 \u05d5\u05db\u05d5&#8217;, \u05de\u05d4\u05d3\u05e8\u05da \u05d4\u05e0\u05e7\u05e8\u05d0\u05ea &#8216;\u05e8\u05d2\u05d9\u05dc\u05d4&#8217;, \u05e2\u05dc \u05d9\u05d3\u05d9 \u05ea\u05d4\u05dc\u05d9\u05da \u05de\u05e8\u05db\u05d6\u05d9 \u05db\u05dc\u05e9\u05d4\u05d5, \u05d0\u05dc \u05e8\u05db\u05d9\u05d1 \u05e7\u05d5\u05d3 \u05d0\u05d7\u05e8 \u05d0\u05e9\u05e8 \u05d9\u05e2\u05e9\u05d4 \u05d4\u05d5\u05d0 \u05d0\u05ea \u05d4\u05e2\u05d1\u05d5\u05d3\u05d4. \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05d9\u05e4\u05d5\u05da \u05e9\u05dc\u05d9\u05d8\u05d4 \u05d6\u05d4 \u05e0\u05e8\u05d5\u05d5\u05d9\u05d7 \u05dc\u05e2\u05d9\u05ea\u05d9\u05dd \u05db\u05de\u05d4 \u05d3\u05d1\u05e8\u05d9\u05dd, \u05db\u05e4\u05d9 \u05e9\u05ea\u05d9\u05db\u05e3 \u05e0\u05d9\u05e8\u05d0\u05d4. \u05d0\u05ea IoC \u05d0\u05e4\u05e9\u05e8 \u05dc\u05de\u05de\u05e9 \u05d1\u05db\u05dc \u05de\u05d9\u05e0\u05d9 \u05d3\u05e8\u05db\u05d9\u05dd \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05ea\u05d4\u05dc\u05d9\u05da \u05e2\u05dc\u05d9\u05d5 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e2\u05d5\u05d1\u05d3\u05d9\u05dd, \u05d0\u05da \u05d4\u05db\u05dc\u05d9 \u05e9\u05d1\u05e2\u05d6\u05e8\u05ea\u05d5 \u05de\u05de\u05de\u05e9\u05d9\u05dd IoC \u05d4\u05d5\u05d0 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05e0\u05d5\u05e1\u05e4\u05ea \u05d1\u05e9\u05dd Dependency Injection. \u05dc\u05e4\u05e2\u05de\u05d9\u05dd \u05e0\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1 IoC \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d0\u05d9\u05e0\u05d8\u05e8\u05e4\u05d9\u05d9\u05e1\u05d9\u05dd, \u05db\u05d0\u05e9\u05e8 \u05d4\u05e8\u05e2\u05d9\u05d5\u05df \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9 \u05d0\u05d5\u05de\u05e8 \u05e9\u05d1\u05de\u05e7\u05d5\u05dd \u05e9\u05ea\u05d4\u05dc\u05d9\u05da \u05db\u05dc\u05e9\u05d4\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05dc\u05d4\u05db\u05d9\u05e8 \u05d0\u05ea \u05d4\u05de\u05d7\u05dc\u05e7\u05d5\u05ea \u05d4\u05de\u05e9\u05ea\u05de\u05e9\u05d5\u05ea \u05d1\u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05d5, \u05d4\u05d5\u05d0 \u05e4\u05e9\u05d5\u05d8 \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8 Interface \u05d0\u05e9\u05e8 \u05e8\u05e7 \u05d0\u05d5\u05ea\u05d5 \u05d4\u05d5\u05d0 \u05de\u05db\u05d9\u05e8, \u05d5\u05db\u05dc \u05de\u05d9 \u05e9\u05d9\u05e8\u05e6\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e9\u05d9\u05e8\u05d5\u05ea\u05d9 \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05d4\u05d6\u05d5 \u05d9\u05e6\u05d8\u05e8\u05da \u05dc\u05de\u05de\u05e9 \u05d0\u05ea \u05d4 Interface \u05d4\u05d6\u05d4. \u05d5\u05dc\u05e4\u05e2\u05de\u05d9\u05dd \u05e0\u05e9\u05ea\u05de\u05e9 \u05d1IoC \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05ea\u05d4\u05dc\u05d9\u05da &#8216;\u05d4\u05e8\u05d2\u05d9\u05dc&#8217; \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4. \u05d1\u05de\u05d9\u05dc\u05d4 &#8216;\u05e8\u05d2\u05d9\u05dc&#8217; \u05d0\u05e0\u05d9 \u05de\u05ea\u05db\u05d5\u05d5\u05df \u05dc\u05ea\u05d4\u05dc\u05d9\u05da \u05e9\u05e2\u05d5\u05d1\u05d3 \u05d1\u05d0\u05d5\u05e4\u05df \u05e4\u05e8\u05d5\u05e6\u05d3\u05d5\u05e8\u05dc\u05d9 \u2013 \u05e0\u05d9\u05ea\u05df \u05dc\u05ea\u05d0\u05e8 \u05d6\u05d0\u05ea \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05d4\u05d1\u05d3\u05dc \u05e9\u05d1\u05d9\u05df Console Application \u05e9\u05d1\u05d4 \u05e0\u05e9\u05d0\u05dc\u05ea \u05e9\u05d0\u05dc\u05d4 \u05d5\u05de\u05ea\u05e7\u05d1\u05dc\u05ea \u05ea\u05e9\u05d5\u05d1\u05d4 \u05d5\u05d7\u05d5\u05d6\u05e8 \u05d7\u05dc\u05d9\u05dc\u05d4, \u05d5\u05e9\u05d4\u05e9\u05dc\u05d9\u05d8\u05d4 \u05e2\u05dc \u05d4\u05ea\u05d4\u05dc\u05d9\u05da \u05d4\u05d9\u05d0 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05e2\u05e6\u05de\u05d4, \u05dc\u05d1\u05d9\u05df WinForm \u05e9\u05d1\u05d5 \u05d9\u05e9 \u05ea\u05d5\u05d5\u05d9\u05d5\u05ea \u05e2\u05dd \u05e9\u05d0\u05dc\u05d5\u05ea \u05d5\u05e9\u05d3\u05d5\u05ea \u05dc\u05d4\u05db\u05e0\u05e1\u05ea \u05ea\u05e9\u05d5\u05d1\u05d5\u05ea \u05d5\u05dc\u05d7\u05d9\u05e6\u05d4 \u05e2\u05dc \u05db\u05e4\u05ea\u05d5\u05e8 \u05e9\u05d1\u05d4 \u05d4\u05de\u05e9\u05ea\u05de\u05e9 \u05d4\u05d5\u05d0 \u05d6\u05d4 \u05e9\u05de\u05e4\u05e2\u05d9\u05dc \u05ea\u05d4\u05dc\u05d9\u05da \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05dc\u05d9\u05d7\u05ea \u05ea\u05e9\u05d5\u05d1\u05d5\u05ea. \u05d3\u05e8\u05da \u05d6\u05d5 \u05d9\u05d3\u05d5\u05e2\u05d4 \u05d1\u05d0\u05d9\u05de\u05e8\u05d4 \u2013 &#8220;Don&#8217;t call us, we&#8217;ll call you!!&#8221; \u05e2\u05d5\u05d3 \u05e9\u05d9\u05de\u05d5\u05e9 \u05e0\u05e4\u05d5\u05e5 \u05d1IoC \u05d4\u05d5\u05d0 \u05d1\u05d9\u05e6\u05d9\u05e8\u05ea \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd. \u05d1\u05de\u05e7\u05d5\u05dd \u05dc\u05d9\u05e6\u05d5\u05e8 \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05d1\u05ea\u05d5\u05da \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05d9, \u05d0\u05e7\u05e8\u05d0 \u05dc\u05de\u05d7\u05dc\u05e7\u05d4 \u05d0\u05d7\u05e8\u05ea \u05d0\u05e9\u05e8 \u05ea\u05d9\u05d9\u05e6\u05e8 \u05d4\u05d9\u05d0 \u05e2\u05d1\u05d5\u05e8\u05d9 \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05d5\u05d1\u05db\u05da \u05d0\u05e0\u05d9 \u05de\u05e7\u05d8\u05d9\u05df \u05d0\u05ea \u05d4\u05ea\u05dc\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05d9 \u05d1\u05de\u05d7\u05dc\u05e7\u05d5\u05ea \u05d0\u05d5\u05ea\u05df \u05d0\u05e0\u05d9 \u05de\u05de\u05de\u05e9. \u05e9\u05d9\u05de\u05d5\u05e9 \u05d6\u05d4 \u05d3\u05d5\u05de\u05d4 \u05dc\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1&nbsp;Factory. Dependency Injection DI (\u05d4\u05d6\u05e8\u05e7\u05ea \u05ea\u05dc\u05d5\u05d9\u05d5\u05ea) \u05d4\u05d5\u05d0 \u05e1\u05d5\u05d2 \u05e9\u05dc IOC \u2013 \u05d6\u05d5\u05d4\u05d9 \u05ea\u05d1\u05e0\u05d9\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05d1\u05d4 \u05d0\u05e0\u05d5 \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd \u05d0\u05d5 \u05de\u05e9\u05d9\u05d9\u05db\u05d9\u05dd \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05e9\u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05e0\u05d5 \u05ea\u05dc\u05d5\u05d9\u05d4 \u05d1\u05d4\u05dd \u2013 \u05de\u05d7\u05d5\u05e5 \u05dc\u05de\u05d7\u05dc\u05e7\u05d4. \u05d1\u05d0\u05d5\u05e4\u05df \u05e6\u05d9\u05d5\u05e8\u05d9 \u05d0\u05e4\u05e9\u05e8 \u05dc\u05ea\u05d0\u05e8 \u05d6\u05d0\u05ea \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0: \u05d1\u05de\u05e7\u05d5\u05dd \u05e9\u05d0\u05d1\u05d9\u05d0 \u05d0\u05ea \u05d0\u05e8\u05d5\u05d7\u05ea \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd \u05e9\u05dc\u05d9 \u05d1\u05e2\u05e6\u05de\u05d9 \u2013 \u05d9\u05d4\u05d9\u05d4 \u05e7\u05d9\u05d9\u05d8\u05e8\u05d9\u05e0\u05d2\u2026.. \u05d1\u05db\u05dc \u05de\u05e7\u05e8\u05d4 \u05d0\u05e0\u05d9 \u05d9\u05d5\u05d3\u05e2 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05d0\u05d5\u05db\u05dc \u05d1\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd, \u05d0\u05d1\u05dc \u05d1\u05de\u05e7\u05d5\u05dd \u05e9\u05d0\u05e0\u05d9 \u05d0\u05d3\u05d0\u05d2 \u05dc\u05d6\u05d4, \u05de\u05d9\u05e9\u05d4\u05d5 \u05d0\u05d7\u05e8 \u05d3\u05d5\u05d0\u05d2 \u05dc\u05d6\u05d4. \u05d1\u05d3\u05e8\u05da \u05db\u05dc\u05dc \u05d4\u05d6\u05e8\u05e7\u05ea \u05d4\u05ea\u05dc\u05d5\u05d9\u05d5\u05ea \u05ea\u05ea\u05e8\u05d7\u05e9 \u05d3\u05e8\u05da \u05d4 Construcor. \u05d3\u05d5\u05d2\u05de\u05d0: \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05de\u05d7\u05dc\u05e7\u05d4 \u05d1\u05e9\u05dd Till \u05d4\u05de\u05ea\u05d0\u05e8\u05ea \u05d4\u05ea\u05e0\u05d4\u05d2\u05d5\u05ea \u05e9\u05dc \u05e7\u05d5\u05e4\u05d4 \u05d1\u05d7\u05e0\u05d5\u05ea, \u05d5\u05d4\u05d9\u05d0 \u05e6\u05e8\u05d9\u05db\u05d4 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05d0\u05de\u05e6\u05e2\u05d9 \u05ea\u05e9\u05dc\u05d5\u05dd. \u05d0\u05e0\u05d9 \u05d9\u05d5\u05e6\u05e8 Interface \u05d1\u05e9\u05dd ITender, \u05d5\u05db\u05dc \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05e9\u05dc\u05d9 \u05de\u05de\u05de\u05e9\u05d9\u05dd \u05d0\u05d5\u05ea\u05d5. \u05d1 Constructor \u05e9\u05dc Till \u05e0\u05e6\u05d8\u05e8\u05da &#8216;\u05dc\u05d4\u05d6\u05e8\u05d9\u05e7&#8217; \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05d5 \u05d0\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d4\u05e9\u05ea\u05de\u05e9. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: 1: ITender tender = new CreditCard(); 2: Till till = new Till(tender); 3: public class Till 4: { 5: private readonly ITender _tender; 6: 7: public Till(ITender tender) 8: { 9: _tender = tender; 10: } 11: } \u05d5\u05db\u05da \u05d1\u05d0\u05d5\u05e4\u05df \u05e4\u05e9\u05d5\u05d8 \u05d1\u05d9\u05d5\u05ea\u05e8 \u05de\u05d9\u05de\u05e9\u05e0\u05d5 DI. \u05d9\u05e9\u05e0\u05d4 \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05de\u05de\u05e9 DI \u05dc\u05d0 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4 Constructor \u05d0\u05dc\u05d0 \u05e2\u05dc \u05d9\u05d3\u05d9 Setter \u05e9\u05dc Property, \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0: 1: ITender tender = new CreditCard(); 2: Till till = new Till(); 3: till.Tender = tender; 4: public class Till 5: { 6: public ITender Tender { get; set; } 7: } 8:&nbsp; \u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05e6\u05e8\u05d9\u05da \u05dc\u05d4\u05d6\u05d4\u05e8 \u05dc\u05d0 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e9\u05d3\u05d4 \u05d4\u05d6\u05d4 \u05dc\u05e4\u05e0\u05d9 \u05e9\u05d4\u05d5\u05d0 \u05d0\u05d5\u05ea\u05d7\u05dc. \u05db\u05e4\u05d9 \u05e9\u05e0\u05d9\u05ea\u05df \u05dc\u05e8\u05d0\u05d5\u05ea, \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 Till \u05dc\u05d0 \u05d9\u05d5\u05d3\u05e2\u05ea \u05e9\u05d5\u05dd \u05d3\u05d1\u05e8 \u05e2\u05dc \u05db\u05e8\u05d8\u05d9\u05e1\u05d9 \u05d0\u05e9\u05e8\u05d0\u05d9, \u05e6&#8217;\u05e7\u05d9\u05dd, \u05de\u05d6\u05d5\u05de\u05df \u05d0\u05d5 \u05db\u05dc \u05d0\u05de\u05e6\u05e2\u05d9 \u05ea\u05e9\u05dc\u05d5\u05dd \u05e9\u05d9\u05de\u05e6\u05d9\u05d0\u05d5 \u05d1\u05e2\u05ea\u05d9\u05d3. \u05d4\u05d9\u05d0 \u05de\u05db\u05d9\u05e8\u05d4 \u05e8\u05e7 \u05d0\u05ea ITender \u05d5\u05e8\u05e7 \u05d1\u05d6\u05d4 \u05d4\u05d9\u05d0 \u05ea\u05dc\u05d5\u05d9\u05d4. \u05d4\u05d6\u05e8\u05e7\u05ea \u05d4\u05ea\u05dc\u05d5\u05ea \u05d4\u05d6\u05d5, \u05db\u05dc\u05d5\u05de\u05e8 \u05d4\u05d2\u05d3\u05e8\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d4\u05de\u05d3\u05d5\u05d9\u05d9\u05e7, \u05d9\u05e2\u05e9\u05d4 \u05d1\u05de\u05d7\u05dc\u05e7\u05d4 \u05d0\u05d7\u05e8\u05ea. \u05d3\u05e8\u05da \u05e0\u05d5\u05e1\u05e4\u05ea \u05dc\u05d4\u05d6\u05e8\u05d9\u05e7 \u05ea\u05dc\u05d5\u05d9\u05d5\u05ea, \u05d0\u05dd \u05db\u05d9 \u05d3\u05e8\u05da \u05d6\u05d5 \u05d4\u05d9\u05d0 \u05e4\u05d7\u05d5\u05ea \u05de\u05e6\u05d5\u05d9\u05d4, \u05d4\u05d9\u05d0 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d9\u05e6\u05d9\u05e8\u05ea Interface \u05e0\u05d5\u05e1\u05e3 \u05d0\u05e9\u05e8 \u05d1\u05d5 \u05d9\u05e9 \u05de\u05ea\u05d5\u05d3\u05ea Inject \u05d5\u05de\u05d9 \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05d5\u05ea\u05d4 (\u05d4\u05de\u05d7\u05dc\u05e7\u05d4 Till \u05d1\u05d3\u05d5\u05d2\u05de\u05d0 \u05e9\u05dc\u05e0\u05d5) \u05d9\u05d0\u05ea\u05d7\u05dc \u05d0\u05ea \u05d4\u05e9\u05d3\u05d4 \u05d4\u05e8\u05e6\u05d5\u05d9, \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05d6\u05e8\u05e7\u05d4 \u05db\u05de\u05d5 \u05d1\u05d3\u05d5\u05d2\u05de\u05d4 \u05d4\u05e7\u05d5\u05d3\u05de\u05ea (\u05d4\u05d4\u05d1\u05d3\u05dc \u05d4\u05d5\u05d0 \u05e9\u05db\u05d0\u05df \u05d6\u05d4 \u05de\u05ea\u05d1\u05e6\u05e2 \u05d1\u05ea\u05d5\u05da \u05de\u05ea\u05d5\u05d3\u05d4 \u05d9\u05e2\u05d5\u05d3\u05d9\u05ea \u05e9\u05e0\u05db\u05e4\u05ea\u05d4 \u05e2\u05dc\u05d9\u05e0\u05d5 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4Interface). \u05db\u05de\u05d4 \u05d7\u05e1\u05e8\u05d5\u05e0\u05d5\u05ea \u05e9\u05dc DI \u05d4\u05dd: \u05d0. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d7\u05d5\u05e9\u05e4\u05d9\u05dd \u05d4\u05d7\u05d5\u05e6\u05d4 \u05db\u05de\u05d4 \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd \u05e9\u05d1\u05d3\u05e8\u05da \u05db\u05dc\u05dc \u05d9\u05d4\u05d9\u05d5 \u05de\u05d5\u05e1\u05ea\u05e8\u05d9\u05dd \u05d1\u05de\u05d7\u05dc\u05e7\u05d4 \u05e9\u05dc\u05e0\u05d5. \u05d1. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd \u05d0\u05ea \u05d4\u05ea\u05dc\u05d5\u05d9\u05d5\u05ea \u05e9\u05dc\u05e0\u05d5 \u05dc\u05e4\u05e0\u05d9 \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05d1\u05d0\u05de\u05ea \u05e6\u05e8\u05d9\u05db\u05d9\u05dd \u05d0\u05d5\u05ea\u05dd. \u05d2. \u05d5\u05d4\u05e0\u05d4 \u05d7\u05e1\u05e8\u05d5\u05df \u05e9\u05d4\u05d5\u05d0 \u05d2\u05dd \u05d9\u05ea\u05e8\u05d5\u05df \u2013 \u05d9\u05d5\u05ea\u05e8 \u05e7\u05dc&nbsp;\u05dc\u05e2\u05e9\u05d5\u05ea unit test&nbsp;\u05d1\u05de\u05e7\u05e8\u05d4 \u05e9\u05dc DI \u05d1\u05d2\u05dc\u05dc \u05e9\u05dc Interface \u05d0\u05e4\u05e9\u05e8&nbsp;\u05dc\u05e2\u05e9\u05d5\u05ea Moq,&nbsp;\u05d0\u05d1\u05dc \u05d6\u05d4 \u05d2\u05dd \u05d4\u05d7\u05d9\u05e1\u05e8\u05d5\u05df, \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d9\u05ea\u05db\u05df \u05d5\u05dc\u05d0 \u05e0\u05d1\u05d3\u05d5\u05e7 \u05db\u05e8\u05d0\u05d5\u05d9 \u05d0\u05ea \u05de\u05d4 \u05e9\u05ea\u05db\u05e0\u05e0\u05d5 \u05dc\u05d1\u05d3\u05d5\u05e7. \u05d1\u05e0\u05d9\u05d9\u05ea IoC \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9 \u05e0\u05d9\u05ea\u05df \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8 \u05e9 IoC \u05d4\u05d9\u05d0 \u05ea\u05e9\u05ea\u05d9\u05ea \u05dc\u05e6\u05d5\u05e8\u05da \u05e2\u05d1\u05d5\u05d3\u05d4 \u05e2\u05dd Dependency Injection. \u05de\u05d4\u05e1\u05d9\u05d1\u05d4 \u05d4\u05d6\u05d5 \u05d9\u05e9 \u05db\u05de\u05d4 \u05ea\u05e9\u05ea\u05d9\u05d5\u05ea \u05de\u05d5\u05db\u05e0\u05d5\u05ea \u05db\u05d2\u05d5\u05df UNITY \u05e9\u05dc \u05de\u05d9\u05e7\u05e8\u05d5\u05e1\u05d5\u05e4\u05d8 \u05d0\u05d5 castle of Windsor \u05d0\u05e9\u05e8 \u05d7\u05d5\u05e1\u05db\u05d5\u05ea \u05dc\u05e0\u05d5 \u05dc\u05db\u05ea\u05d5\u05d1 \u05d0\u05ea \u05d4\u05ea\u05e9\u05ea\u05d9\u05ea \u05d1\u05db\u05dc \u05e4\u05e2\u05dd \u05de\u05d7\u05d3\u05e9. \u05d5\u05dc\u05de\u05e8\u05d5\u05ea \u05e9\u05e0\u05d5\u05d7 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05ea\u05e9\u05ea\u05d9\u05d5\u05ea \u05d0\u05dc\u05d5, \u05d8\u05d5\u05d1 \u05dc\u05d4\u05d1\u05d9\u05df \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9 \u05d0\u05d9\u05da \u05d4\u05df \u05e2\u05d5\u05d1\u05d3\u05d5\u05ea \u05d5\u05de\u05d4 \u05de\u05ea\u05e8\u05d7\u05e9 \u05de\u05d0\u05d7\u05d5\u05e8\u05d9 \u05d4\u05e7\u05dc\u05e2\u05d9\u05dd. \u05e0\u05e9\u05ea\u05de\u05e9 \u05d1\u05e7\u05d5\u05d3 \u05de\u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05e9\u05dc DI. \u05d4\u05e7\u05d5\u05d3 \u05e0\u05e8\u05d0\u05d4 \u05db\u05da: 1: class Program 2: { 3: static void Main(string[] args) 4: { 5: ITender tender = new CreditCard(); 6: Till till = new Till(tender); 7: } 8: } 9:&nbsp; 10: public class Till 11: { 12: private readonly ITender _tender; 13:&nbsp; 14: public Till(ITender tender) 15: { 16: _tender = tender; 17: } 18: } 19:&nbsp; 20: public class CreditCard : ITender 21: { 22: } 23:&nbsp; 24: public interface ITender 25: { 26: } \u05db\u05e2\u05ea \u05e0\u05e2\u05e9\u05d4 \u05db\u05de\u05d4 \u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd. \u05e0\u05d5\u05e1\u05d9\u05e3 \u05de\u05ea\u05d5\u05d3\u05ea Charge \u05d1\u05de\u05d7\u05dc\u05e7\u05d4 Till \u05d5\u05de\u05ea\u05d5\u05d3\u05d4 \u05d6\u05d5 \u05ea\u05e7\u05e8\u05d0 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 \u05d6\u05d4\u05d4 \u05d4\u05e7\u05d9\u05d9\u05de\u05ea \u05d1\u05db\u05dc \u05de\u05d9 \u05e9\u05de\u05de\u05de\u05e9 \u05d0\u05ea ITender. \u05de\u05ea\u05d5\u05d3\u05d4 \u05d6\u05d5 \u05de\u05d3\u05e4\u05d9\u05e1\u05d4 \u05d4\u05d5\u05d3\u05e2\u05d4 \u05db\u05dc\u05e9\u05d4\u05d9. \u05db\u05de\u05d5 \u05db\u05df \u05e0\u05d9\u05e6\u05d5\u05e8 \u05d1\u05e9\u05d1\u05d9\u05dc \u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05e2\u05d5\u05d3 \u05de\u05d7\u05dc\u05e7\u05d4 \u05d1\u05e9\u05dd Cash \u05dc\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05de\u05d6\u05d5\u05de\u05df \u2013 \u05d2\u05dd \u05de\u05d7\u05dc\u05e7\u05d4 \u05d6\u05d5 \u05db\u05de\u05d5\u05d1\u05df \u05d9\u05d5\u05e8\u05e9\u05ea \u05de ITender. 1: public class Till 2: { 3: private readonly ITender _tender; 4:&nbsp; 5: public Till(ITender tender) 6: { 7: _tender = tender; 8: } 9:&nbsp; 10: public string Charge() 11: { 12: return _tender.Charge(); 13: } 14: } 15:&nbsp; 16: public class CreditCard : ITender 17: { 18: public string Charge() 19: { 20: return &#8220;CreditCard&#8221;; 21: } 22: } 23: public class Cash : ITender 24: { 25: public string Charge() 26: { 27: return &#8220;Cash&#8221;; 28: } 29: } 30:&nbsp; 31: public interface ITender 32: { 33: string Charge(); 34: } \u05db\u05e2\u05ea \u05db\u05de\u05d5\u05d1\u05df \u05e9\u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05d7\u05dc\u05d9\u05d8 \u05d4\u05d0\u05dd \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e9\u05d5\u05dc\u05d7\u05d9\u05dd \u05d1Constructor \u05e9\u05dc \u05d4\u05e7\u05d5\u05e4\u05d4 \u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05de\u05d6\u05d5\u05de\u05df \u05d0\u05d5 \u05d1\u05d0\u05e9\u05e8\u05d0\u05d9 \u05d5\u05d4\u05d4\u05d5\u05d3\u05e2\u05d4 \u05ea\u05d5\u05d3\u05e4\u05e1 \u05d1\u05d4\u05ea\u05d0\u05dd. \u05d0\u05d1\u05dc \u2013 \u05d6\u05d4 \u05e2\u05d3\u05d9\u05d9\u05df \u05dc\u05d0 \u05db\u05dc \u05db\u05da \u05e0\u05d5\u05d7. \u05d4\u05d9\u05d9\u05ea\u05d9 \u05de\u05e2\u05d3\u05d9\u05e3 \u05e9\u05dc\u05d0 \u05dc\u05d4\u05d7\u05dc\u05d9\u05d8 \u05d1\u05ea\u05d5\u05da \u05d4\u05e7\u05d5\u05d3 \u05d1\u05d0\u05d9\u05d6\u05d4 \u05d0\u05de\u05e6\u05e2\u05d9 \u05ea\u05e9\u05dc\u05d5\u05dd \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d0\u05dc\u05d0 \u05e9\u05de\u05d9\u05e9\u05d4\u05d5 \u05d0\u05d7\u05e8 \u05d9\u05e2\u05e9\u05d4 \u05d6\u05d0\u05ea \u05e2\u05d1\u05d5\u05e8\u05d9. \u05e9\u05d0\u05d5\u05db\u05dc \u05dc\u05e7\u05e8\u05d5\u05d0 \u05dc\u05d0\u05d9\u05d6\u05d5\u05e9\u05d4\u05d9 \u05de\u05d7\u05dc\u05e7\u05d4 \u05e2\u05dd \u05de\u05ea\u05d5\u05d3\u05d4 \u05de\u05e1\u05d5\u05d9\u05d9\u05de\u05ea \u05d5\u05d4\u05d9\u05d0 \u05db\u05d1\u05e8 \u05ea\u05d7\u05d6\u05d9\u05e8 \u05dc\u05d9 \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05d3\u05e8\u05da \u05db\u05dc\u05e9\u05d4\u05d9. \u05d5\u05db\u05da \u05d0\u05d5\u05db\u05dc \u05dc\u05de\u05e9\u05dc \u05dc\u05e9\u05de\u05d5\u05e8 \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d1\u05e7\u05d5\u05d1\u05e5 XML \u05d0\u05d5 \u05d1\u05d0\u05d5\u05e4\u05df \u05d0\u05d7\u05e8. \u05d0\u05dd \u05db\u05da, \u05d0\u05e0\u05d9 \u05de\u05d9\u05d9\u05e6\u05e8 \u05de\u05d7\u05dc\u05e7\u05d4 \u05d1\u05e9\u05dd Resolver \u05d5\u05d1\u05d4 \u05d9\u05e9 \u05de\u05ea\u05d5\u05d3\u05d4 \u05d1\u05e9\u05dd ResolveTender \u05d4\u05de\u05d7\u05d6\u05d9\u05e8\u05d4 \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05de\u05e1\u05d5\u05d2 ITender. \u05d1\u05e2\u05d5\u05dc\u05dd \u05d4\u05d0\u05de\u05d9\u05ea\u05d9 \u05ea\u05d4\u05d9\u05d4 \u05dc\u05d5\u05d2\u05d9\u05e7\u05d4 \u05d4\u05d2\u05d9\u05d5\u05e0\u05d9\u05ea \u05e9\u05ea\u05d7\u05dc\u05d9\u05d8 \u05de\u05d4 \u05dc\u05d4\u05d7\u05d6\u05d9\u05e8 \u05d0\u05d5 \u05de\u05e7\u05d5\u05e8 \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd \u05db\u05dc\u05e9\u05d4\u05d5, \u05d0\u05d1\u05dc \u05d1\u05e9\u05d1\u05d9\u05dc \u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05db\u05ea\u05d1\u05ea\u05d9 \u05ea\u05e0\u05d0\u05d9 \u05de\u05e9\u05ea\u05e0\u05d4 (\u05d4\u05d0\u05dd \u05d4\u05e9\u05e0\u05d9\u05d9\u05d4 \u05db\u05e8\u05d2\u05e2 \u05d6\u05d5\u05d2\u05d9\u05ea \u05d0\u05d5 \u05d0\u05d9 \u05d6\u05d5\u05d2\u05d9\u05ea) \u05db\u05d0\u05e9\u05e8 \u05d1\u05db\u05dc \u05de\u05e7\u05e8\u05d4 \u05d4\u05d9\u05d0 \u05de\u05d7\u05d6\u05d9\u05e8\u05d4 \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d0\u05d7\u05e8. \u05d4\u05de\u05d7\u05dc\u05e7\u05d4 \u05e0\u05d9\u05e8\u05d0\u05ea \u05db\u05da: 1: public class Resolver 2: { 3: public ITender ResolveTender() 4: { 5: if (DateTime.Now.Second % 2 == 0) 6: { 7: return new CreditCard(); 8: } 9: else 10: { 11: return new Cash(); 12: } 13: } 14: } \u05d5\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05d4 \u05d9\u05d4\u05d9\u05d4 \u05db\u05da: 1: Resolver resolver = new Resolver(); 2: Till till = new Till(resolver.ResolveTender()); 3: var message = till.Charge(); 4: Console.WriteLine(message); \u05db\u05e2\u05ea, \u05d0\u05dd \u05e0\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05e0\u05d4 \u05d4\u05e7\u05d8\u05e0\u05d4 \u05e9\u05dc\u05e0\u05d5 \u05d4\u05d9\u05d0 \u05ea\u05d3\u05e4\u05d9\u05e1 \u05dc\u05e4\u05e2\u05de\u05d9\u05dd Cash \u05d5\u05dc\u05e4\u05e2\u05de\u05d9\u05dd CreditCard. \u05d6\u05d4 \u05d4\u05e8\u05e2\u05d9\u05d5\u05df \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9, \u05d0\u05d1\u05dc \u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05d7\u05e4\u05e9\u05d9\u05dd \u05e4\u05d9\u05ea\u05e8\u05d5\u05df \u05d9\u05d5\u05ea\u05e8 \u05d2\u05e0\u05e8\u05d9. \u05d4\u05d9\u05d9\u05e0\u05d5 \u05de\u05e2\u05d3\u05d9\u05e4\u05d9\u05dd \u05d1\u05de\u05e7\u05d5\u05dd \u05d4\u05e9\u05d5\u05e8\u05d4 1: Till till = new Till(resolver.ResolveTender()); \u05de\u05e9\u05d4\u05d5 \u05e9\u05e0\u05e8\u05d0\u05d4 \u05d9\u05d5\u05ea\u05e8 \u05d3\u05d5\u05de\u05d4 \u05dc\u05d6\u05d4 1: Till till = resolver.Resolve&lt;Till&gt;(); \u05d1\u05e9\u05d1\u05d9\u05dc \u05e9\u05d3\u05d1\u05e8 \u05db\u05d6\u05d4 \u05d9\u05e2\u05d1\u05d5\u05d3 \u05e0\u05e6\u05d8\u05e8\u05da \u05e7\u05e6\u05ea Reflection. \u05e8\u05d0\u05e9\u05d9\u05ea \u05e0\u05d9\u05e6\u05d5\u05e8 Dictionary \u05e9\u05d1\u05e2\u05d6\u05e8\u05ea\u05d5 \u05e0\u05de\u05e4\u05d4 \u05d0\u05ea \u05d4\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8\u05d9\u05dd \u05e9\u05dc\u05e0\u05d5. \u05d4\u05e9\u05d5\u05e8\u05d4 \u05ea\u05d9\u05e8\u05d0\u05d4 \u05db\u05da: 1: private Dictionary&lt;Type,Type&gt; _map = new Dictionary&lt;Type, Type&gt;(); \u05db\u05d0\u05e9\u05e8 \u05d4Type \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05de\u05e1\u05de\u05df \u05d0\u05ea \u05d4\u05d0\u05d9\u05e0\u05d8\u05e8\u05e4\u05d9\u05d9\u05e1 (ITender \u05d1\u05de\u05e7\u05e8\u05d4 \u05e9\u05dc\u05e0\u05d5) \u05d5\u05d4Type \u05d4\u05e9\u05e0\u05d9 \u05de\u05e1\u05de\u05df \u05de\u05d9\u05de\u05d5\u05e9 \u05e7\u05d5\u05e0\u05e7\u05e8\u05d8\u05d9 \u05e9\u05dc\u05d5 (\u05dc\u05de\u05e9\u05dc Cash) \u05d1\u05ea\u05d5\u05da \u05d4\u05de\u05ea\u05d5\u05d3\u05d4 Resolve \u05e9\u05db\u05d6\u05db\u05d5\u05e8 \u05de\u05e7\u05d1\u05dc\u05ea T \u05db\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05d2\u05e0\u05e8\u05d9, \u05e0\u05d9\u05e7\u05e8\u05d0 \u05dc\u05de\u05ea\u05d5\u05d3\u05ea Resolve \u05e0\u05d5\u05e1\u05e4\u05ea, \u05d0\u05d1\u05dc \u05d4\u05e4\u05e2\u05dd \u05e2\u05dd Type \u05e1\u05e4\u05e6\u05d9\u05e4\u05d9. \u05e0\u05e2\u05e9\u05d4 \u05d0\u05ea \u05d6\u05d4 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1 typeof. \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05d7\u05d3\u05e9\u05d4 \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05e0\u05d1\u05d3\u05d5\u05e7 \u05d0\u05dd \u05d4Type \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5 \u05e0\u05de\u05e6\u05d0 \u05d1\u05ea\u05d5\u05da \u05d4 Dictionary \u05e9\u05dc\u05e0\u05d5 \u05d5\u05d0\u05dd \u05dc\u05d0 \u05e0\u05d6\u05e8\u05d5\u05e7 \u05d4\u05d5\u05d3\u05e2\u05ea \u05e9\u05d2\u05d9\u05d0\u05d4. 1: Type resolvedType = null; 2: try 3: { 4: resolvedType = _map[typeToResolve]; 5: } 6: catch (Exception) 7: { 8: throw new Exception(string.Format(&#8220;Could not find {0}&#8221;, typeToResolve.FullName)); 9: } \u05db\u05e2\u05ea \u05e0\u05d9\u05e8\u05e6\u05d4 \u05dc\u05d0\u05ea\u05d7\u05dc \u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8 \u05de\u05d4Type \u05e9\u05e7\u05d9\u05d1\u05dc\u05e0\u05d5. \u05d0\u05d1\u05dc \u05e4\u05d4 \u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d1\u05e2\u05d9\u05d4, \u05d1\u05d2\u05dc\u05dc \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05dc\u05d0 \u05d9\u05d5\u05d3\u05e2\u05d9\u05dd \u05d4\u05d0\u05dd \u05d9\u05e9 \u05e9\u05dd Constructor \u05e2\u05dd \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd. \u05e0\u05ea\u05d7\u05d9\u05dc \u05d1\u05de\u05e7\u05e8\u05d4 \u05d4\u05e4\u05e9\u05d5\u05d8 \u05e9\u05d1\u05d5 \u05d0\u05d9\u05df \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd. \u05dc Type \u05d9\u05e9 \u05de\u05ea\u05d5\u05d3\u05d4 \u05d1\u05e9\u05dd GetConstructors \u05e9\u05ea\u05d7\u05d6\u05d9\u05e8 \u05dc\u05e0\u05d5 (\u05d1\u05ea\u05d5\u05e1\u05e4\u05ea First ) \u05d0\u05ea \u05d4Constructor \u05d4\u05e8\u05d0\u05e9\u05d5\u05df. \u05d5\u05d0\u05d6 \u05e0\u05d5\u05db\u05dc \u05dc\u05d1\u05d3\u05d5\u05e7 \u05de\u05d4\u05dd \u05d4\u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 GetParameters. \u05e2\u05db\u05e9\u05d9\u05d5 \u05e0\u05d9\u05e6\u05d5\u05e8 \u05ea\u05e0\u05d0\u05d9 \u2013 \u05d0\u05dd \u05d0\u05d9\u05df \u05dc\u05d9 \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05d0\u05d9\u05d9\u05e6\u05e8 \u05de\u05d5\u05e4\u05e2 \u05de\u05d4\u05e1\u05d5\u05d2 \u05e9\u05e7\u05d9\u05d1\u05dc\u05ea\u05d9 \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0: 1: Activator.CreateInstance(resolvedType); Activator \u05de\u05d0\u05e4\u05e9\u05e8 \u05dc\u05d9 \u05dc\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9, \u05d1\u05d3\u05d9\u05d5\u05e7 \u05db\u05de\u05d5 \u05d1\u05de\u05d9\u05dc\u05d4 New, \u05d0\u05dc\u05d0 \u05e9\u05d4\u05d9\u05d0 \u05e2\u05d5\u05e9\u05d4 \u05d0\u05ea \u05d6\u05d4 \u05db\u05e0\u05d2\u05d3 Type. \u05d0\u05dd \u05d4Constructor \u05e9\u05dc\u05d9 \u05e6\u05e8\u05d9\u05da \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd, \u05d0\u05e6\u05d5\u05e8 \u05e8\u05e9\u05d9\u05de\u05d4 \u05de\u05e1\u05d5\u05d2 object \u05d4\u05de\u05db\u05d9\u05dc\u05d4 \u05d0\u05ea \u05d4\u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05e9\u05d0\u05e0\u05d9 \u05e6\u05e8\u05d9\u05da \u05d5\u05d6\u05d0\u05ea \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05de\u05ea\u05d5\u05d3\u05d4 Resolve \u05e9\u05d0\u05d5\u05ea\u05d4 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d9\u05e6\u05e8\u05e0\u05d5. \u05d5\u05dc\u05db\u05df \u05e0\u05e9\u05dc\u05d7 \u05dc\u05de\u05ea\u05d5\u05d3\u05d4 \u05d4\u05d6\u05d5 \u05dc\u05d0 \u05d0\u05ea \u05d4\u05e4\u05e8\u05de\u05d8\u05e8 \u05d0\u05dc\u05d0 \u05d0\u05ea \u05d4\u05d8\u05d9\u05e4\u05d5\u05e1 \u05e9\u05dc\u05d5. 1: IList&lt;object&gt; parameters = new List&lt;object&gt;(); 2: foreach (var constructorParameter in constructorParameters) 3: { 4: parameters.Add(Resolve(constructorParameter.ParameterType)); 5: } \u05db\u05e2\u05ea \u05dc\u05d0 \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1Activator \u05db\u05d3\u05d9 \u05dc\u05d9\u05e6\u05d5\u05e8 \u05de\u05d5\u05e4\u05e2 \u05d7\u05d3\u05e9 \u05d0\u05dc\u05d0 \u05e0\u05e9\u05ea\u05de\u05e9 \u05d1\u05de\u05ea\u05d5\u05d3\u05ea invoke \u05d4\u05de\u05e7\u05d1\u05dc\u05ea \u05de\u05e2\u05e8\u05da \u05e9\u05dc \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd. 1: return firstConstructor.Invoke(parameters.ToArray()); \u05db\u05e2\u05ea \u05d9\u05e9 \u05dc\u05e0\u05d5 Container \u05e9\u05dc IoC \u05e9\u05d9\u05e6\u05e8\u05e0\u05d5 \u05d1\u05e2\u05e6\u05de\u05e0\u05d5. \u05d0\u05de\u05e0\u05dd \u05d0\u05dd \u05e0\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d6\u05d4 \u05e2\u05db\u05e9\u05d9\u05d5, \u05d6\u05d4 \u05dc\u05d0 \u05d9\u05e2\u05d1\u05d5\u05d3 \u05d1\u05d2\u05dc\u05dc \u05e9\u05e2\u05d3\u05d9\u05d9\u05df \u05dc\u05d0 \u05de\u05d9\u05e4\u05d9\u05e0\u05d5 \u05d0\u05ea \u05d4\u05de\u05d7\u05dc\u05e7\u05d5\u05ea \u05e9\u05dc\u05e0\u05d5. \u05dc\u05e6\u05d5\u05e8\u05da \u05d4\u05de\u05d9\u05e4\u05d5\u05d9 \u05e0\u05d9\u05e6\u05d5\u05e8 \u05d1 IoC \u05e9\u05dc\u05e0\u05d5 \u05de\u05ea\u05d5\u05d3\u05ea Register \u05d4\u05de\u05e7\u05d1\u05dc\u05ea \u05d0\u05ea \u05d4\u05de\u05d9\u05e4\u05d5\u05d9 \u05d5\u05de\u05d5\u05e1\u05d9\u05e4\u05d4 \u05dcDictionary \u05d1\u05d0\u05d5\u05e4\u05df \u05d4\u05d1\u05d0: 1: public void Register&lt;TFrom, TTo&gt;() 2: { 3: _map.Add(typeof(TFrom), typeof(TTo)); 4: } \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05e2\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4 \u05d2\u05dd \u05dc\u05de\u05d7\u05dc\u05e7\u05ea Till \u2013 \u05e9\u05de\u05de\u05d5\u05e4\u05d4 \u05dc\u05e2\u05e6\u05de\u05d4. \u05d5\u05db\u05df \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05de\u05e4\u05d5\u05ea \u05d0\u05ea \u05d0\u05de\u05e6\u05e2\u05d9 \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd \u05d4\u05e8\u05e6\u05d5\u05d9 \u05dc Itender 1: resolver.Register&lt;Till, Till&gt;(); 2: resolver.Register&lt;ITender, Cash&gt;() \u05db\u05e2\u05ea \u05e0\u05d5\u05db\u05dc \u05dc\u05d4\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3 \u05d5\u05dc\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05d4\u05e8\u05e6\u05d5\u05d9\u05d4. \u05db\u05d0\u05de\u05d5\u05e8 \u2013 \u05dc\u05d0 \u05e0\u05e6\u05d8\u05e8\u05da \u05dc\u05e2\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4 \u05d1\u05e2\u05e6\u05de\u05e0\u05d5, \u05d9\u05e9 \u05ea\u05e9\u05ea\u05d9\u05d5\u05ea \u05e9\u05e2\u05d5\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4 \u05e2\u05dd \u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e8\u05d1\u05d5\u05ea. \u05d0\u05d1\u05dc \u05d6\u05d4 \u05d4\u05e2\u05d9\u05e7\u05e8\u05d5\u05df \u05e9\u05de\u05d0\u05d7\u05d5\u05e8\u05d9 \u05d4\u05e7\u05dc\u05e2\u05d9\u05dd. \u05d4\u05e7\u05d5\u05d3 \u05d1\u05db\u05dc\u05dc\u05d5\u05ea\u05d5 \u05dc\u05de\u05d9 \u05e9\u05de\u05e2\u05d5\u05e0\u05d9\u05d9\u05df: 1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4:&nbsp; 5: namespace ConsoleApplication5 6: { 7: class Program 8: { 9: static void Main() 10: { 11: var resolver = new Resolver(); 12: resolver.Register&lt;Till, Till&gt;(); 13: resolver.Register&lt;ITender, Cash&gt;(); 14: resolver.Register&lt;ITender, CreditCard&gt;(); 15: var till = resolver.Resolve&lt;Till&gt;(); 16: var message = till.Charge(); 17: Console.WriteLine(message); 18: Console.Read(); 19:&nbsp; 20: } 21: } 22:&nbsp; 23: public class Resolver 24: { 25: private Dictionary&lt;Type, Type&gt; _map = new Dictionary&lt;Type, Type&gt;(); 26: public T Resolve&lt;T&gt;() 27: { 28: return (T)Resolve(typeof(T)); 29: } 30:&nbsp; 31: private object Resolve(Type typeToResolve) 32: { 33: Type resolvedType; 34: try 35: { 36: resolvedType = _map[typeToResolve]; 37: } 38: catch (Exception) 39: { 40: throw new Exception(string.Format(&#8220;Could not find {0}&#8221;, typeToResolve.FullName)); 41: } 42: var firstConstructor = resolvedType.GetConstructors().First(); 43: var constructorParameters = firstConstructor.GetParameters(); 44: if (!constructorParameters.Any()) 45: { 46: return Activator.CreateInstance(resolvedType); 47: } 48:&nbsp; 49: IList&lt;object&gt; parameters = constructorParameters.Select(constructorParameter =&gt; Resolve(constructorParameter.ParameterType)).ToList(); 50: return firstConstructor.Invoke(parameters.ToArray()); 51: } 52:&nbsp; 53: public void Register&lt;TFrom, TTo&gt;() 54: { 55: _map.Add(typeof(TFrom), typeof(TTo)); 56: } 57: } 58:&nbsp; 59: public class Till 60: { 61: private readonly ITender _tender; 62:&nbsp; 63: public Till(ITender tender) 64: { 65: _tender = tender; 66: } 67:&nbsp; 68: public string Charge() 69: { 70: return _tender.Charge(); 71: } 72: } 73:&nbsp; 74: public class CreditCard : ITender 75: { 76: public string Charge() 77: { 78: return &#8220;CreditCard&#8221;; 79: } 80: } 81: public class Cash : ITender 82: { 83: public string Charge() 84: { 85: return &#8220;Cash&#8221;; 86: } 87: } 88:&nbsp; 89: public interface ITender 90: { 91: string Charge(); 92: } 93: }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-designpatterns"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Inversion of Control \u05d5 Dependency Injection - Design for Living<\/title>\n<meta name=\"description\" content=\"Design for Living Inversion of Control \u05d5 Dependency Injection\" \/>\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=144\" \/>\n<meta property=\"og:locale\" content=\"he_IL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Inversion of Control \u05d5 Dependency Injection - Design for Living\" \/>\n<meta property=\"og:description\" content=\"Design for Living Inversion of Control \u05d5 Dependency Injection\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hernan-yehuda.net\/?p=144\" \/>\n<meta property=\"og:site_name\" content=\"Design for Living\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-05T07:26:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-08T13:49:08+00:00\" \/>\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=\"8 \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=144#article\",\"isPartOf\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=144\"},\"author\":{\"name\":\"Hernan\",\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64\"},\"headline\":\"Inversion of Control \u05d5 Dependency Injection\",\"datePublished\":\"2021-07-05T07:26:02+00:00\",\"dateModified\":\"2021-07-08T13:49:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=144\"},\"wordCount\":126,\"publisher\":{\"@id\":\"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64\"},\"articleSection\":[\"Design Patterns\"],\"inLanguage\":\"he-IL\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hernan-yehuda.net\/?p=144\",\"url\":\"https:\/\/hernan-yehuda.net\/?p=144\",\"name\":\"Inversion of Control \u05d5 Dependency Injection - Design for Living\",\"isPartOf\":{\"@id\":\"https:\/\/hernan-yehuda.net\/#website\"},\"datePublished\":\"2021-07-05T07:26:02+00:00\",\"dateModified\":\"2021-07-08T13:49:08+00:00\",\"description\":\"Design for Living Inversion of Control \u05d5 Dependency Injection\",\"breadcrumb\":{\"@id\":\"https:\/\/hernan-yehuda.net\/?p=144#breadcrumb\"},\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hernan-yehuda.net\/?p=144\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hernan-yehuda.net\/?p=144#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea\",\"item\":\"https:\/\/hernan-yehuda.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Inversion of Control \u05d5 Dependency Injection\"}]},{\"@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":"Inversion of Control \u05d5 Dependency Injection - Design for Living","description":"Design for Living Inversion of Control \u05d5 Dependency Injection","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=144","og_locale":"he_IL","og_type":"article","og_title":"Inversion of Control \u05d5 Dependency Injection - Design for Living","og_description":"Design for Living Inversion of Control \u05d5 Dependency Injection","og_url":"https:\/\/hernan-yehuda.net\/?p=144","og_site_name":"Design for Living","article_published_time":"2021-07-05T07:26:02+00:00","article_modified_time":"2021-07-08T13:49:08+00:00","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":"8 \u05d3\u05e7\u05d5\u05ea"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hernan-yehuda.net\/?p=144#article","isPartOf":{"@id":"https:\/\/hernan-yehuda.net\/?p=144"},"author":{"name":"Hernan","@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64"},"headline":"Inversion of Control \u05d5 Dependency Injection","datePublished":"2021-07-05T07:26:02+00:00","dateModified":"2021-07-08T13:49:08+00:00","mainEntityOfPage":{"@id":"https:\/\/hernan-yehuda.net\/?p=144"},"wordCount":126,"publisher":{"@id":"https:\/\/hernan-yehuda.net\/#\/schema\/person\/0f06727fd57f92683c3ad425a9ecaf64"},"articleSection":["Design Patterns"],"inLanguage":"he-IL"},{"@type":"WebPage","@id":"https:\/\/hernan-yehuda.net\/?p=144","url":"https:\/\/hernan-yehuda.net\/?p=144","name":"Inversion of Control \u05d5 Dependency Injection - Design for Living","isPartOf":{"@id":"https:\/\/hernan-yehuda.net\/#website"},"datePublished":"2021-07-05T07:26:02+00:00","dateModified":"2021-07-08T13:49:08+00:00","description":"Design for Living Inversion of Control \u05d5 Dependency Injection","breadcrumb":{"@id":"https:\/\/hernan-yehuda.net\/?p=144#breadcrumb"},"inLanguage":"he-IL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hernan-yehuda.net\/?p=144"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hernan-yehuda.net\/?p=144#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea","item":"https:\/\/hernan-yehuda.net\/"},{"@type":"ListItem","position":2,"name":"Inversion of Control \u05d5 Dependency Injection"}]},{"@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\/144","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=144"}],"version-history":[{"count":5,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":149,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions\/149"}],"wp:attachment":[{"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hernan-yehuda.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}