File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed
src/ServerlessWorkflow.Sdk Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ namespace ServerlessWorkflow.Sdk.Models
29
29
public class ScheduleDefinition
30
30
{
31
31
32
+ /// <summary>
33
+ /// Gets the <see cref="ScheduleDefinition"/>'s type
34
+ /// </summary>
35
+ [ Newtonsoft . Json . JsonIgnore ]
36
+ [ System . Text . Json . Serialization . JsonIgnore ]
37
+ [ YamlIgnore ]
38
+ public virtual ScheduleDefinitionType Type => this . Cron == null ? ScheduleDefinitionType . Interval : ScheduleDefinitionType . Cron ;
39
+
32
40
/// <summary>
33
41
/// Gets/sets the time interval (ISO 8601 format) describing when workflow instances can be created.
34
42
/// </summary>
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2021-Present The Serverless Workflow Specification Authors
3
+ * <p>
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ * <p>
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ * <p>
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ namespace ServerlessWorkflow . Sdk
19
+ {
20
+ /// <summary>
21
+ /// Enumerates all types of schedule definitions
22
+ /// </summary>
23
+ [ Newtonsoft . Json . JsonConverter ( typeof ( Newtonsoft . Json . Converters . StringEnumConverter ) ) ]
24
+ [ System . Text . Json . Serialization . JsonConverter ( typeof ( System . Text . Json . Serialization . StringEnumConverterFactory ) ) ]
25
+ public enum ScheduleDefinitionType
26
+ {
27
+ /// <summary>
28
+ /// Indicates the definition of a CRON expression based schedule
29
+ /// </summary>
30
+ [ EnumMember ( Value = "cron" ) ]
31
+ Cron = 1 ,
32
+ /// <summary>
33
+ /// Indicates the definition of an interval based schedule
34
+ /// </summary>
35
+ [ EnumMember ( Value = "interval" ) ]
36
+ Interval = 2
37
+ }
38
+
39
+ }
Original file line number Diff line number Diff line change 4
4
<TargetFramework >net6.0</TargetFramework >
5
5
<Nullable >enable</Nullable >
6
6
<NeutralLanguage >en</NeutralLanguage >
7
- <AssemblyVersion >0.8.3 </AssemblyVersion >
8
- <FileVersion >0.8.3 </FileVersion >
9
- <Version >0.8.3 </Version >
7
+ <AssemblyVersion >0.8.4 </AssemblyVersion >
8
+ <FileVersion >0.8.4 </FileVersion >
9
+ <Version >0.8.4 </Version >
10
10
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
11
11
<PackageRequireLicenseAcceptance >true</PackageRequireLicenseAcceptance >
12
12
<PackageLicenseFile >LICENSE</PackageLicenseFile >
You can’t perform that action at this time.
0 commit comments