Skip to content

Commit

Permalink
Updated to initialize field once with getter instead of re-initializi…
Browse files Browse the repository at this point in the history
…ng with each call.

Signed-off-by: Whit Waldo <[email protected]>
  • Loading branch information
WhitWaldo committed Sep 26, 2024
1 parent 6362301 commit d6e88d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Dapr.Jobs/Models/DaprJobSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,32 +91,32 @@ public static DaprJobSchedule FromDuration(TimeSpan duration)
/// <summary>
/// Specifies a schedule in which the job is triggered to run once a year.
/// </summary>
public static DaprJobSchedule Yearly => new DaprJobSchedule("@yearly");
public static DaprJobSchedule Yearly { get; } = new DaprJobSchedule("@yearly");

/// <summary>
/// Specifies a schedule in which the job is triggered monthly.
/// </summary>
public static DaprJobSchedule Monthly => new DaprJobSchedule("@monthly");
public static DaprJobSchedule Monthly { get; } = new DaprJobSchedule("@monthly");

/// <summary>
/// Specifies a schedule in which the job is triggered weekly.
/// </summary>
public static DaprJobSchedule Weekly => new DaprJobSchedule("@weekly");
public static DaprJobSchedule Weekly { get; } =new DaprJobSchedule("@weekly");

/// <summary>
/// Specifies a schedule in which the job is triggered daily.
/// </summary>
public static DaprJobSchedule Daily => new DaprJobSchedule("@daily");
public static DaprJobSchedule Daily { get; } = new DaprJobSchedule("@daily");

/// <summary>
/// Specifies a schedule in which the job is triggered once a day at midnight.
/// </summary>
public static DaprJobSchedule Midnight => new DaprJobSchedule("@midnight");
public static DaprJobSchedule Midnight { get; } = new DaprJobSchedule("@midnight");

/// <summary>
/// Specifies a schedule in which the job is triggered at the top of every hour.
/// </summary>
public static DaprJobSchedule Hourly => new DaprJobSchedule("@hourly");
public static DaprJobSchedule Hourly { get; } = new DaprJobSchedule("@hourly");

/// <summary>
/// Reflects that the schedule represents a prefixed period expression.
Expand Down

0 comments on commit d6e88d2

Please sign in to comment.