Esempio n. 1
0
        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());
            }
        }
Esempio n. 2
0
 public UncommittedDecorator(IArtefact artefact)
 {
     _artefact = artefact;
 }
Esempio n. 3
0
 public MainDecorator(IArtefact artefact)
 {
     this.artefact = artefact;
 }
Esempio n. 4
0
 public ErrorArtefact(IArtefact artefact)
 {
     this.artefact = artefact;
 }
Esempio n. 5
0
 public ErrorDecorator(IArtefact artefact)
 {
     this.artefact = artefact;
 }
Esempio n. 6
0
 public MainArtefact(IArtefact artefact)
 {
     this.artefact = artefact;
 }
 public MainDecorator(IArtefact artefact)
 {
     _artefact = artefact;
 }
 public ErrorDecorator(IArtefact artefact)
 {
     _artefact = artefact;
 }