Beispiel #1
0
    public static void Main()
    {
        CustomClassAttribute attribute          = (CustomClassAttribute)typeof(StartUp).GetCustomAttributes(false).FirstOrDefault();
        CommandInterpreter   commandInterpreter = new CommandInterpreter(attribute);

        commandInterpreter.Run();
    }
    public override void Execute()
    {
        CustomClassAttribute customAttribute = (CustomClassAttribute)typeof(Weapon)
                                               .GetCustomAttributes(typeof(CustomClassAttribute))
                                               .First();

        this.outputWriter.WriteLine($"Revision: {customAttribute.Revision}");
    }
Beispiel #3
0
    public override void Execute()
    {
        CustomClassAttribute customAttribute = (CustomClassAttribute)typeof(Weapon)
                                               .GetCustomAttributes(typeof(CustomClassAttribute))
                                               .First();

        this.outputWriter.WriteLine($"Reviewers: {string.Join(", ", customAttribute.Reviewers)}");
    }
Beispiel #4
0
 public CommandInterpreter(CustomClassAttribute attribute)
 {
     this.attribute = attribute;
 }