| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- unit GroupShareConfig;
- interface
- uses
- BaseConfig, InterfaceConfig, TypInfo;
- type
- TGroupShareConfig = class(TBaseConfig, IGroupShareConfig)
- private
- public
- function GetHost: string;
- function GetVersion: TGroupShareVersion;
- constructor Create(); override;
- property Host: string read GetHost;
- property Version: TGroupShareVersion read GetVersion;
- end;
- implementation
- { TGroupShareConfig }
- constructor TGroupShareConfig.Create;
- begin
- ConfigType := ctPublic;
- FileName := 'groupShare.json';
- inherited;
- end;
- function TGroupShareConfig.GetHost: string;
- begin
- Result := Data.S['host']
- end;
- function TGroupShareConfig.GetVersion: TGroupShareVersion;
- begin
- Result := TGroupShareVersion(GetEnumValue(TypeInfo(TGroupShareVersion), Data.S['version']));
- end;
- end.
|