This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services.AddDataProtection() | |
| .SetApplicationName(appConfig.Name) | |
| .PersistKeysToRedis(redisConnection, appConfig.DataProtection); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 8080; | |
| location / { | |
| proxy_pass http://originfarmexampleapp; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http { | |
| upstream originfarmexampleapp { | |
| server farmexampleapp1:1905; | |
| server farmexampleapp2:1905; | |
| server farmexampleapp3:1905; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "2" | |
| services: | |
| ################################################ | |
| farmexampleapp_1: | |
| image: selcukusta/farm-example-app:1.0.0 | |
| environment: | |
| - ASPNETCORE_URLS=http://*:1905 | |
| - X_BACKEND_SERVER=SRV01 | |
| depends_on: | |
| - sessiondb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| BookWorm worm = new BookWorm(new EBook()); | |
| //ya da | |
| worm = new BookWorm(new PrintedBook()); | |
| worm.FullName = "Selçuk Usta"; | |
| Console.WriteLine(worm.SayMotto()); | |
| Console.ReadKey(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BookWorm | |
| { | |
| public string FullName { get; set; } | |
| public IBook MyBook { get; private set; } | |
| public BookWorm(IBook book) | |
| { | |
| MyBook = book; | |
| } | |
| public string SayMotto() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface IBook | |
| { | |
| string Motto { get; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EBook | |
| { | |
| internal string Motto => "Kitabı çizmeden not alabiliyorum, notlarımı anlık paylaşabiliyorum, anlık çeviri yapabiliyorum. Daha ne olsun!"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BookWorm | |
| { | |
| public string FullName { get; set; } | |
| public PrintedBook MyBook { get; private set; } | |
| public BookWorm(PrintedBook book) | |
| { | |
| MyBook = book; | |
| } | |
| public string SayMotto() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PrintedBook | |
| { | |
| internal string Motto => "Basılı kitap okumanın en güzel yanı, saman kağıdının benzersiz kokusu..."; | |
| } |