forked from LucasCancio/design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1274bed
commit 8ed8a29
Showing
7 changed files
with
104 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Facade | ||
{ | ||
public class Facade | ||
{ | ||
private SubSistemaUm um; | ||
|
||
private SubSistemaDois dois; | ||
|
||
private SubSistemaTres tres; | ||
|
||
public Facade() | ||
{ | ||
this.um = new SubSistemaUm(); | ||
this.dois = new SubSistemaDois(); | ||
this.tres = new SubSistemaTres(); | ||
} | ||
|
||
public void MetodoA() | ||
{ | ||
Console.WriteLine("\nMétodoA() -----"); | ||
this.dois.MetodoDois(); | ||
this.tres.MetodoTres(); | ||
} | ||
|
||
public void MetodoB() | ||
{ | ||
Console.WriteLine("\nMétodoB() -----"); | ||
this.um.MetodoUm(); | ||
this.tres.MetodoTres(); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
|
||
namespace Facade | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Facade facade = new Facade(); | ||
facade.MetodoA(); | ||
facade.MetodoB(); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace Facade | ||
{ | ||
public class SubSistemaDois | ||
{ | ||
public void MetodoDois() | ||
{ | ||
Console.WriteLine("Método do Subsistema Dois"); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace Facade | ||
{ | ||
public class SubSistemaTres | ||
{ | ||
public void MetodoTres() | ||
{ | ||
Console.WriteLine("Método do Subsistema Tres"); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace Facade | ||
{ | ||
public class SubSistemaUm | ||
{ | ||
public void MetodoUm() | ||
{ | ||
Console.WriteLine("Método do Subsistema Um"); | ||
} | ||
} | ||
} |
This file contains 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