Exemple #1
0
        public override void Ecexute()
        {
            string author = typeof(Weapon)
                            .GetCustomAttributes(false)
                            .Select(atr => (MyCustomAttribute)atr)
                            .Select(a => a.Author)
                            .First();

            OutputConsoleWriter.AddReportLine("Author: " + author);
        }
Exemple #2
0
        public override void Ecexute()
        {
            string[] reviewers = typeof(Weapon)
                                 .GetCustomAttributes(false)
                                 .Select(atr => (MyCustomAttribute)atr)
                                 .Select(r => r.Reviewers)
                                 .First();

            OutputConsoleWriter.AddReportLine("Reviewers: " + string.Join(", ", reviewers));
        }
        public override void Ecexute()
        {
            int revision = typeof(Weapon)
                           .GetCustomAttributes(false)
                           .Select(atr => (MyCustomAttribute)atr)
                           .Select(r => r.Revision)
                           .First();

            OutputConsoleWriter.AddReportLine("Revision: " + revision.ToString());
        }
Exemple #4
0
        public override void Ecexute()
        {
            string description = typeof(Weapon)
                                 .GetCustomAttributes(false)
                                 .Select(atr => (MyCustomAttribute)atr)
                                 .Select(d => d.Description)
                                 .First();

            OutputConsoleWriter.AddReportLine("Class description: " + description);
        }
 public void Print()
 {
     OutputConsoleWriter.AddReportLine(this.ToString());
 }