public GetDescription ( DescriptionTypeEnum type ) : string | ||
type | DescriptionTypeEnum | Which part(s) of the expression to describe |
return | string |
/// <summary> /// Generates a human readable string for the Cron Expression /// </summary> /// <param name="expression">The cron expression string</param> /// <param name="options">Options to control the output description</param> /// <returns>The cron expression description</returns> public static string GetDescription(string expression, Options options) { ExpressionDescriptor descripter = new ExpressionDescriptor(expression, options); return descripter.GetDescription(DescriptionTypeEnum.FULL); }
public void TestTitleCasing() { ExpressionDescriptor ceh = new ExpressionDescriptor("* * * * *", new Options() { CasingType = CasingTypeEnum.Title }); Assert.AreEqual("Every Minute", ceh.GetDescription(DescriptionTypeEnum.FULL)); }
public void TestLowerCasing() { ExpressionDescriptor ceh = new ExpressionDescriptor("* * * * *", new Options() { CasingType = CasingTypeEnum.LowerCase }); Assert.AreEqual("every minute", ceh.GetDescription(DescriptionTypeEnum.FULL)); }
/// <summary> /// Generates a human readable string for the Cron Expression /// </summary> /// <param name="expression">The cron expression string</param> /// <param name="options">Options to control the output description</param> /// <returns>The cron expression description</returns> public static string GetDescription(string expression, Options options) { ExpressionDescriptor descripter = new ExpressionDescriptor(expression, options); return(descripter.GetDescription(DescriptionTypeEnum.FULL)); }