{"id":202776,"date":"2013-11-19T19:06:03","date_gmt":"2013-11-19T15:06:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=202776"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=202776","title":{"rendered":"<span class=\"post_title\">\u041f\u043b\u0430\u0433\u0438\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 MVC. \u0418\u043b\u0438 \u0441\u0430\u0439\u0442 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438, \u043c\u0430\u0434\u0435\u043c\u0443\u0430\u0437\u0435\u043b\u044f\u043c\u0438 \u0438 \u043f\u0440\u0435\u0444\u0435\u0440\u0430\u043d\u0441\u043e\u043c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/94b\/1a1\/5cb\/94b1a15cbb76b3b6eb117f9fb9c961e3.png\" alt=\"image\"\/><\/p>\n<h4>\u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u044f<\/h4>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0441\u0431\u043e\u0440\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0435\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0434\u0435\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b.<br \/>  \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439. \u041d\u043e \u0435\u0441\u043b\u0438 \u0442\u0435\u0431\u0435, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 $habrauser$, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043c\u0438\u043b\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0432\u0435\u0434\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0430\u0441\u0442\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0440\u0430\u0437\u0431\u0438\u0442\u0430 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430 2 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u043e\u043a\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b\u043e 2 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u043d\u043e\u0439 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0437\u0440\u043e\u0441\u043b\u0430\u0441\u044c \u0434\u043e \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438 \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u0430\u043a \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u0437\u043e\u043e\u043f\u0430\u0440\u043a \u043d\u0430\u0434\u043e \u0434\u0440\u043e\u0431\u0438\u0442\u044c \u043d\u0430 \u0447\u0430\u0441\u0442\u0438. \u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 ASP.NET MVC \u0441\u0430\u0439\u0442 \u0432 \u0438\u043d\u0442\u0440\u0430\u0441\u0435\u0442\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438 \u0444\u0438\u0440\u043c\u044b. \u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u044f\u0442\u044c-\u0441\u0435\u043c\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0434\u0432\u0430-\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0440\u043e\u0441\u043b\u0438 \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u043a\u0443\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0430\u043b\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<h5>\u041f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438. \u0421\u0440\u0430\u0437\u0443 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445(Areas). \u041d\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d \u0441\u0440\u0430\u0437\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0440\u043e\u0431\u0438\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0447\u0442\u043e \u043d\u0435 \u0440\u0435\u0448\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0432\u0441\u0435 \u00ab\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435\u00bb \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u0442\u0430\u043c \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u0438\u0447\u0435\u0433\u043e, \u0447\u0442\u043e \u043c\u0435\u043d\u044f \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u043b\u043e. <br \/>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0438\u043a\u0430\u043a \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0418 \u0441\u0430\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u0440\u0443\u0434\u043d\u0435\u0435 \u0447\u0435\u043c \u043f\u0430\u0440\u0430 \u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u044b\u0448\u043a\u0438.<\/p>\n<h5>\u041f\u043e\u0434\u0445\u043e\u0434 \u043f\u0435\u0440\u0432\u044b\u0439<\/h5>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0410\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u043d\u0435\u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0435\u043a\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439, \u0438 \u0434\u0430\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u0433\u043e\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043b\u0430\u0433\u0438\u043d\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u00ab\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f\u00bb (\u0437\u0434\u0435\u0441\u044c \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a. \u0414\u0430\u043b\u0435\u0435 \u044f \u043d\u0430\u043f\u0438\u0448\u0443 \u043f\u043e\u0447\u0435\u043c\u0443) \u043a \u0441\u0430\u0439\u0442\u0443. \u042f \u0443\u0436\u0435 \u0431\u044b\u043b \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u043e\u0442 \u0440\u0430\u0434\u043e\u0441\u0442\u0438, \u043d\u043e\u2026 \u0412\u043e\u0442 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u041d\u041e, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0436\u0434\u0430\u043b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f. \u0412 \u043d\u0438\u0445 \u0431\u044b\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0441\u0442-\u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439(Areas) \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0441\u0430\u0439\u0442\u043e\u043c. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u00ab\u0443\u0434\u043e\u0431\u043d\u0443\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443\u00bb. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b \u043f\u043e\u0438\u0441\u043a\u0438. \u0418, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u044d\u0442\u043e\u0442 \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0443\u0441\u043f\u0435\u0445\u043e\u043c.<\/p>\n<h5>\u041f\u043e\u0434\u0445\u043e\u0434 \u043d\u043e\u043c\u0435\u0440 \u0434\u0432\u0430<\/h5>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0444\u043e\u0440\u0443\u043c\u043e\u0432 \u044f \u043d\u0430\u0448\u0435\u043b \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0435 \u0431\u0443\u0434\u0443 \u0434\u043e\u043b\u0433\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043d\u0430\u0448\u0435\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0438\u0441\u043a\u0430\u043b. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0441 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c dll&#8217;\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u044f \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<h4>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u043c Visual Studio \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 Web Application MVC 4(\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0435\u0440\u0441\u0438\u044f MVC \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0439 \u0440\u043e\u043b\u0438). \u041d\u043e \u043a\u0438\u0434\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Class Library \u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e Infrastructure.<br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b.<br \/>  \u041a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043e \u043d\u0435\u043c \u044f \u043d\u0435 \u0431\u0443\u0434\u0443.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">IModule<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">namespace EkzoPlugin.Infrastructure {     public interface IModule     {         \/\/\/ &lt;summary&gt;         \/\/\/ \u0418\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435         \/\/\/ &lt;\/summary&gt;         string Title { get; }          \/\/\/ &lt;summary&gt;         \/\/\/ \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430         \/\/\/ &lt;\/summary&gt;         string Name { get; }          \/\/\/ &lt;summary&gt;         \/\/\/ \u0412\u0435\u0440\u0441\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430         \/\/\/ &lt;\/summary&gt;         Version Version { get; }          \/\/\/ &lt;summary&gt;         \/\/\/ \u0418\u043c\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b         \/\/\/ &lt;\/summary&gt;         string EntryControllerName { get; }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 Class Library, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e PluginManager. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<br \/>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">PluginManager<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">namespace EkzoPlugin.PluginManager {     public class PluginManager     {         public PluginManager()         {             Modules = new Dictionary&lt;IModule, Assembly&gt;();         }          private static PluginManager _current;         public static PluginManager Current          {  \t        get { return _current ?? (_current = new PluginManager()); }         }      \tinternal Dictionary&lt;IModule, Assembly&gt; Modules { get; set; }         \/\/\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438         public IEnumerable&lt;IModule&gt; GetModules()         {             return Modules.Select(m =&gt; m.Key).ToList();         }         \/\/\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e \u0438\u043c\u0435\u043d\u0438         public IModule GetModule(string name)         {             return GetModules().Where(m =&gt; m.Name == name).FirstOrDefault();         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e PreApplicationInit. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f \u043c\u0430\u0433\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0417\u0430 \u00ab\u043c\u0430\u0433\u0438\u044e\u00bb \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 PreApplicationStartMethod (\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.web.preapplicationstartmethodattribute(v=vs.100).aspx\">\u0442\u0443\u0442<\/a>). \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u043c\u0435\u0442\u043e\u0434, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u0436\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u0447\u0435\u043c Application_Start. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">PreApplicationInit<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\"> [assembly: PreApplicationStartMethod(typeof(EkzoPlugin.PluginManager.PreApplicationInit), &quot;InitializePlugins&quot;)]  namespace EkzoPlugin.PluginManager {     public class PreApplicationInit     {         static PreApplicationInit()         {             \/\/\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438             string pluginsPath = HostingEnvironment.MapPath(&quot;~\/plugins&quot;);             \/\/\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b             string pluginsTempPath = HostingEnvironment.MapPath(&quot;~\/plugins\/temp&quot;);             \/\/\u0415\u0441\u043b\u0438 \u043f\u0430\u043f\u043a\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435             if (pluginsPath == null || pluginsTempPath == null) \t            throw new DirectoryNotFoundException(&quot;plugins&quot;);              PluginFolder = new DirectoryInfo(pluginsPath);             TempPluginFolder = new DirectoryInfo(pluginsTempPath);         }          \/\/\/ &lt;summary&gt;         \/\/\/ \u041f\u0430\u043f\u043a\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432         \/\/\/ &lt;\/summary&gt;         \/\/\/ &lt;remarks&gt;         \/\/\/ \u041f\u0430\u043f\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c         \/\/\/ &lt;\/remarks&gt;         private static readonly DirectoryInfo PluginFolder;          \/\/\/ &lt;summary&gt;         \/\/\/ \u041f\u0430\u043f\u043a\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u044b         \/\/\/ \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d, \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438         \/\/\/ &lt;\/summary&gt;         private static readonly DirectoryInfo TempPluginFolder;          \/\/\/ &lt;summary&gt;         \/\/\/ Initialize method that registers all plugins         \/\/\/ &lt;\/summary&gt;         public static void InitializePlugins()         {                         Directory.CreateDirectory(TempPluginFolder.FullName);              \/\/\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435             foreach (var f in TempPluginFolder.GetFiles(&quot;*.dll&quot;, SearchOption.AllDirectories))             {                 try                 {                     f.Delete();                 }                 catch (Exception)                 {                                      }                              }                          \/\/\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u044b             foreach (var plug in PluginFolder.GetFiles(&quot;*.dll&quot;, SearchOption.AllDirectories))             {                 try                 {                     var di = Directory.CreateDirectory(TempPluginFolder.FullName);                     File.Copy(plug.FullName, Path.Combine(di.FullName, plug.Name), true);                 }                 catch (Exception)                 {                  }             }              \/\/ * \u041f\u043e\u043b\u043e\u0436\u0438\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 'Load'             \/\/ \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c 'probing' \u043f\u0430\u043f\u043a\u0443 \u0432 web.config             \/\/ \u0442\u0430\u043a: &lt;probing privatePath=&quot;plugins\/temp&quot; \/&gt;             var assemblies = TempPluginFolder.GetFiles(&quot;*.dll&quot;, SearchOption.AllDirectories)                     .Select(x =&gt; AssemblyName.GetAssemblyName(x.FullName))                     .Select(x =&gt; Assembly.Load(x.FullName));              foreach (var assembly in assemblies)             {                 Type type = assembly.GetTypes().Where(t =&gt; t.GetInterface(typeof(IModule).Name) != null).FirstOrDefault();                 if (type != null)                 {                     \/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d \u043a\u0430\u043a \u0441\u0441\u044b\u043b\u043a\u0443 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443                     BuildManager.AddReferencedAssembly(assembly);                      \/\/\u041a\u043b\u0430\u0434\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439                     var module = (IModule)Activator.CreateInstance(type);                     PluginManager.Current.Modules.Add(module, assembly);                 }             }         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0422\u0435\u043f\u0435\u0440\u044c <a href=\"https:\/\/github.com\/csteeg\/BoC\/tree\/master\/Src\/Commons.Web.PrecompiledViews\">\u0441\u043a\u0430\u0447\u0430\u0435\u043c<\/a> \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u0451 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<br \/>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0434, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">namespace EkzoPlugin.PluginManager {     public static class PluginBootstrapper     {     \tpublic static void Initialize()         {             foreach (var asmbl in PluginManager.Current.Modules.Values) \t        {                 BoC.Web.Mvc.PrecompiledViews.ApplicationPartRegistry.Register(asmbl); \t        }         }     } }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u044b\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0451 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043e\u0442\u043a\u0440\u043e\u0435\u043c web.config \u0444\u0430\u0439\u043b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b runtime  <\/p>\n<pre><code class=\"xml\">  &lt;runtime&gt;     &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;       &lt;probing privatePath=&quot;plugins\/temp&quot; \/&gt;       <\/code><\/pre>\n<p>  \u0411\u0435\u0437 \u044d\u0442\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443\u0442.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 EkzoPlugin.PluginManager.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Global.asax \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u041f\u0435\u0440\u0432\u043e\u0439 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d EkzoPlugin.PluginManager  <\/p>\n<pre><code class=\"cs\">using EkzoPlugin.PluginManager; <\/code><\/pre>\n<p>  \u0410 \u0432\u0442\u043e\u0440\u0443\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432 Applicaton_Start()  <\/p>\n<pre><code class=\"cs\">       protected void ApplicationStart()        {          PluginBootstrapper.Initialize(); <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u044e. \u041f\u043e\u043c\u043d\u0438\u0442\u0435 PreApplicationInit \u0430\u0442\u0440\u0438\u0431\u0443\u0442? \u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a ApplicationStart \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u0410 \u043a\u043e\u0433\u0434\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 ApplicationStart \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u043d\u0430\u043b\u0430 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043a \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c.<br \/>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. \u041d\u0430\u0448\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e. \u041e\u043d\u043e \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 plugins.<\/p>\n<h4>\u041f\u0438\u0448\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d<\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b. \u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d Plugin(\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0436\u0435\u0441\u0442\u043a\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0435\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439). \u042d\u0442\u0430 \u0442\u0430 \u0446\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c.<br \/>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 Web Application MVC. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 Controllers \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e SampleMvcController.<br \/>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Visual Studio \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044d\u043a\u0448\u0435\u043d\u043e\u043c Index(). \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0435\u0433\u043e \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u043b\u0430\u0433\u0438\u043d.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"html\">&lt;h3&gt;Sample Mvc Plugin&lt;\/h3&gt; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439 Visual Studio \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c RazorGenerator. \u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 dll \u0444\u0430\u0439\u043b.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 index.cshtml \u0432 solution explorer&#8217;\u0435 \u0438 \u0432 \u043e\u043a\u043d\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<br \/>  Build Action: EmbeddedResource<br \/>  Custom Tool: RazorGenerator<br \/>  \u042d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0430\u044e\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<br \/>  \u041c\u044b \u043f\u043e\u0447\u0442\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u041d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0448\u0430\u0433\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u043f\u043b\u0430\u0433\u0438\u043d \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<br \/>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 EkzoPlugin.Infrastructure, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e SampleMVCModule.cs  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SampleMVCModule<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using EkzoPlugin.Infrastructure;  namespace EkzoPlugin.Plugins.SampleMVC {     public class SampleMVCModule : IModule     {         public string Title         {             get { return &quot;SampleMVCPlugin&quot;; }         }          public string Name         {             get { return Assembly.GetAssembly(GetType()).GetName().Name; }         }          public Version Version         {             get { return new Version(1, 0, 0, 0); }         }          public string EntryControllerName         {             get { return &quot;SampleMVC&quot;; }         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. \u041f\u043b\u0430\u0433\u0438\u043d \u0433\u043e\u0442\u043e\u0432. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? <br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0432 \u043f\u0430\u043f\u043a\u0443 plugins \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0444\u0430\u0439\u043b _Layout.cshtml \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438  <\/p>\n<pre><code class=\"cs\">@using EkzoPlugin.Infrastructure @using EkzoPlugin.PluginManager @{     IEnumerable&lt;IModule&gt; modules = PluginManager.Current.GetModules();     Func&lt;string, IModule&gt; getModule = name =&gt; PluginManager.Current.GetModule(name); } &lt;html ...... &lt;head&gt;....&lt;\/head&gt; &lt;body&gt; &lt;ul id=&quot;pluginsNavigation&quot;&gt;                         &lt;li class=&quot;MenuItem&quot;&gt;@Html.ActionLink(&quot;Home&quot;,&quot;Index&quot;,&quot;Home&quot;,null,null)&lt;\/li&gt;                         @foreach (IModule module in modules)                         {                             &lt;li class=&quot;MenuItem&quot;&gt;@Html.ActionLink(module.Title, &quot;Index&quot;, module.EntryControllerName)&lt;\/li&gt;                         }                     &lt;\/ul&gt; ... &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438.<\/p>\n<h4>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0412\u043e\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043d\u0430 ASP.NET MVC. \u041d\u0435 \u0432\u0441\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043d\u0435 \u0432\u0441\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d. \u041d\u043e \u0441\u0432\u043e\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442. \u0425\u043e\u0447\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u043e\u0441\u0442\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0430\u043c\u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<br \/>  \u0422\u0430\u043a\u0436\u0435 \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<br \/>  \u0415\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043b\u0430\u0433\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u043f\u043a\u0430\u0445 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 (\u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0441\u0442\u0438\u043b\u0435\u0439, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u0442.\u0434.).<br \/>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 bin \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u0418\u043d\u0430\u0447\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443.<br \/>  \u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u0432\u0430\u0448 \u043f\u043b\u0430\u0433\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 web.config \u0444\u0430\u0439\u043b\u043e\u043c \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f, \u0447\u0438\u0442\u0430\u0435\u043c\u0430\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0451.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430.<\/p>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 GitHub \u2014 <a href=\"https:\/\/github.com\/EkzoMan\/EkzoPluginsSystem\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/202776\/\"> http:\/\/habrahabr.ru\/post\/202776\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/94b\/1a1\/5cb\/94b1a15cbb76b3b6eb117f9fb9c961e3.png\" alt=\"image\"\/><\/p>\n<h4>\u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u044f<\/h4>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0441\u0431\u043e\u0440\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0435\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0434\u0435\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b.<br \/>  \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439. \u041d\u043e \u0435\u0441\u043b\u0438 \u0442\u0435\u0431\u0435, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 $habrauser$, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043c\u0438\u043b\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-202776","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/202776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=202776"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/202776\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=202776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=202776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}