November 2019
Beginner to intermediate
674 pages
15h
English
Armed with this information, we can now re-implement the marker interface by using attributes.
The Customer.Attributes unit defines a normal customer class as shown here in full:
type TNormalCustomer = class strict protected FAddress: string; FEmail: string; FName: string; public property Address: string read FAddress write FAddress; property Email: string read FEmail write FEmail; property Name: string read FName write FName; end;
As we are no longer using interfaces, we can implement a customer as a normal class, and properties can access storage fields directly, without using getters and setters. This allows for much shorter implementation and simplifies compatibility with a legacy code.
The same unit implements ...
Read now
Unlock full access