Once the component is removed (issue #1) the enumerator callback type definitions apply only to TPJEnvironmentVars. It would therefore make sense to move them inside the class. We could also take the opportunity to rename them. E.g.
type
TPJEnvironmentVars = class(TObject)
// ...
public
type
TEnumNamesCallback = reference to procedure(const VarName: string; Data: Pointer);
TEnumVarsCallback = reference to procedure(const EnvVar: TPJEnvironmentVar; Data: Pointer);
// ...
class procedure EnumNames(Callback: TEnumNamesCallback; Data: Pointer);
class procedure EnumVars(Callback: TEnumVarsCallback; Data: Pointer);
end;
The old TPJEnvVarsEnum and TPJEnvVarsEnumEx types could either be removed or be deprecated and redefined as follows (after TPJEnvironmentVars):
type
TPJEnvVarsEnum = TPJEnvironmentVars.TEnumNamesCallback deprecated;
TPJEnvVarsEnumEx = TPJEnvironmentVars.TEnumVarsCallback deprecated;
Once the component is removed (issue #1) the enumerator callback type definitions apply only to
TPJEnvironmentVars
. It would therefore make sense to move them inside the class. We could also take the opportunity to rename them. E.g.The old
TPJEnvVarsEnum
andTPJEnvVarsEnumEx
types could either be removed or be deprecated and redefined as follows (afterTPJEnvironmentVars
):