public void OpenProject(string path) { var artefacts = new IArtefact[4] { new Artefact("Main"), new Artefact("Demo"), new Artefact("EmailClient"), new Artefact("EmailProvider"), }; // We can apply multiple decorators artefacts[0] = new ErrorArtefact(new MainArtefact(artefacts[0])); artefacts[2] = new ErrorArtefact(artefacts[2]); // In the future, we can create a SourceControlDecorator that adds // a special marker to the icon if artefacts are not committed to the repository. foreach (var artefact in artefacts) { Console.WriteLine(artefact.Render()); } }
public UncommittedDecorator(IArtefact artefact) { _artefact = artefact; }
public MainDecorator(IArtefact artefact) { this.artefact = artefact; }
public ErrorArtefact(IArtefact artefact) { this.artefact = artefact; }
public ErrorDecorator(IArtefact artefact) { this.artefact = artefact; }
public MainArtefact(IArtefact artefact) { this.artefact = artefact; }
public MainDecorator(IArtefact artefact) { _artefact = artefact; }
public ErrorDecorator(IArtefact artefact) { _artefact = artefact; }