AA>C# не особо дружит с макросами, хоть в коре и появилась , но боюсь я такой путь не осилю. не хочется нарушать принцип KISS.
Я не про аспекты говорил, а про что-то типа такого.
IDocument.cs
public interface IDocument {
string Number {get; set;}
string Title {get; set;}
string Description {get; set;}
string[] Notes { get; set;}
}
GenericProcessor.cs
public class GenericProcessor.cs {
void Process(IDocument document) { ... }
}
Generated1.cs — сгенерированный код
partial class Generated1 { ... }
Generated1.partial.cs — добавляем руками
partial class Generated1 : IDocument { }
Generated2.cs — сгенерированный код
partial class Generated2 { ... }
Generated2.partial.cs — добавляем руками
partial class Generated2 : IDocument { }