Skip to content

Commit 8c95150

Browse files
I've added explicit public modifiers to class members (fields, constructors, and methods) in TypeScript files within the src/CrystalQuartz.Application.Client2/src directory (excluding sub-directories which I handled previously).
This is part of an ongoing effort to improve code clarity and explicitness throughout your application. I modified the following files: - `src/CrystalQuartz.Application.Client2/src/application-model.ts` - `src/CrystalQuartz.Application.Client2/src/command-action.ts` - `src/CrystalQuartz.Application.Client2/src/data-loader.ts` - `src/CrystalQuartz.Application.Client2/src/global-activities-synchronizer.ts` - `src/CrystalQuartz.Application.Client2/src/scheduler-state-service.ts`
1 parent 7443b3d commit 8c95150

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

src/CrystalQuartz.Application.Client2/src/application-model.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ import { SchedulerExplorer } from './scheduler-explorer';
66
export class ApplicationModel implements SchedulerExplorer {
77
private _currentData: SchedulerData | null = null;
88

9-
schedulerName = new ObservableValue<string>('');
10-
autoUpdateMessage = new ObservableValue<string>('');
11-
isOffline = new ObservableValue<boolean>(false);
9+
public schedulerName = new ObservableValue<string>('');
10+
public autoUpdateMessage = new ObservableValue<string>('');
11+
public isOffline = new ObservableValue<boolean>(false);
1212

13-
inProgressCount = new ObservableValue<number>(0);
13+
public inProgressCount = new ObservableValue<number>(0);
1414

15-
onDataChanged = new Event<SchedulerData>();
16-
onDataInvalidate = new Event<any>();
15+
public onDataChanged = new Event<SchedulerData>();
16+
public onDataInvalidate = new Event<any>();
1717

18-
offlineSince: number | null = null;
18+
public offlineSince: number | null = null;
1919

20-
setData(data: SchedulerData) {
20+
public setData(data: SchedulerData) {
2121
this._currentData = data;
2222

2323
this.onDataChanged.trigger(data);
@@ -31,18 +31,18 @@ export class ApplicationModel implements SchedulerExplorer {
3131
}
3232
}
3333

34-
getData() {
34+
public getData() {
3535
return this._currentData;
3636
}
3737

3838
/**
3939
* Causes application to reload all job gorups, jobs and triggers.
4040
*/
41-
invalidateData() {
41+
public invalidateData() {
4242
this.onDataInvalidate.trigger(null);
4343
}
4444

45-
goOffline() {
45+
public goOffline() {
4646
this.offlineSince = new Date().getTime();
4747
if (!this.isOffline.getValue()) {
4848
this.isOffline.setValue(true);
@@ -51,14 +51,14 @@ export class ApplicationModel implements SchedulerExplorer {
5151
this.autoUpdateMessage.setValue('offline');
5252
}
5353

54-
goOnline() {
54+
public goOnline() {
5555
this.offlineSince = null;
5656
if (this.isOffline.getValue()) {
5757
this.isOffline.setValue(false);
5858
}
5959
}
6060

61-
listGroups(): JobGroup[] {
61+
public listGroups(): JobGroup[] {
6262
if (this._currentData) {
6363
return this._currentData.JobGroups;
6464
}

src/CrystalQuartz.Application.Client2/src/command-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Action from './global/actions/action';
55
import { CommandService } from './services';
66

77
export default class CommandAction extends Action {
8-
constructor(
8+
public constructor(
99
application: ApplicationModel,
1010
commandService: CommandService,
1111
title: string,

src/CrystalQuartz.Application.Client2/src/data-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class DataLoader {
1212

1313
private _autoUpdateTimer = new Timer();
1414

15-
constructor(
15+
public constructor(
1616
private applicationModel: ApplicationModel,
1717
private commandService: CommandService
1818
) {
@@ -25,7 +25,7 @@ export class DataLoader {
2525
});
2626
}
2727

28-
start() {
28+
public start() {
2929
this.updateData();
3030
}
3131

src/CrystalQuartz.Application.Client2/src/global-activities-synchronizer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export default class GlobalActivitiesSynchronizer {
77
private _currentData: SchedulerData | null = null;
88
private _currentFlatData: { scope: number; key: string; size: number }[] | null = null;
99

10-
constructor(private timeline: Timeline) {}
10+
public constructor(private timeline: Timeline) {}
1111

12-
updateFrom(data: SchedulerData) {
12+
public updateFrom(data: SchedulerData) {
1313
this._currentData = data;
1414
this._currentFlatData = null;
1515

@@ -24,7 +24,7 @@ export default class GlobalActivitiesSynchronizer {
2424
}
2525
}
2626

27-
updateActivity(activity: TimelineGlobalActivity) {
27+
public updateActivity(activity: TimelineGlobalActivity) {
2828
if (!this._currentData) {
2929
return;
3030
}
@@ -33,7 +33,7 @@ export default class GlobalActivitiesSynchronizer {
3333
this.internalUpdateActivity(activity);
3434
}
3535

36-
getSlotIndex(slot: TimelineSlot, reverse?: boolean) {
36+
public getSlotIndex(slot: TimelineSlot, reverse?: boolean) {
3737
this.ensureHaveFlattenData();
3838

3939
const totalItems = this._currentFlatData === null ? 0 : this._currentFlatData.length;
@@ -48,7 +48,7 @@ export default class GlobalActivitiesSynchronizer {
4848
return null;
4949
}
5050

51-
makeSlotKey(scope: SchedulerEventScope, key: string) {
51+
public makeSlotKey(scope: SchedulerEventScope, key: string) {
5252
return scope + ':' + key;
5353
}
5454

src/CrystalQuartz.Application.Client2/src/scheduler-state-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export interface ISchedulerStateService {
2222
export class SchedulerStateService implements ISchedulerStateService {
2323
private _currentInProgress: ITriggersHashSet = {};
2424

25-
realtimeBus = new Event<IRealtimeTriggerEvent>();
25+
public realtimeBus = new Event<IRealtimeTriggerEvent>();
2626

27-
synsFrom(data: SchedulerData) {
27+
public synsFrom(data: SchedulerData) {
2828
if (data.InProgress) {
2929
const nextInProgress: ITriggersHashSet = {};
3030

0 commit comments

Comments
 (0)