1- // Copyright (c) 2021 , Phoenix Contact GmbH & Co. KG
1+ // Copyright (c) 2025 , Phoenix Contact GmbH & Co. KG
22// Licensed under the Apache License, Version 2.0
33
44namespace Moryx . Orders . Restrictions
@@ -11,6 +11,8 @@ public class BeginRestriction : IOperationRestriction
1111 /// <summary>
1212 /// Creates a new instance of <see cref="BeginRestriction"/>
1313 /// </summary>
14+ /// <param name="canBegin">Indicates whether this restriction still allows to begin the operation</param>
15+ /// <param name="description">Provides a <see cref="RestrictionDescription"/> for the restriction</param>
1416 public BeginRestriction ( bool canBegin , RestrictionDescription description )
1517 {
1618 CanBegin = canBegin ;
@@ -20,19 +22,59 @@ public BeginRestriction(bool canBegin, RestrictionDescription description)
2022 /// <summary>
2123 /// Creates a new instance of <see cref="BeginRestriction"/>
2224 /// </summary>
25+ /// <param name="canBegin">Indicates whether this restriction still allows to begin the operation</param>
26+ /// <param name="text">Provides a textual description for the restriction</param>
27+ /// <param name="severity">Sets the severity of the restriction</param>
2328 public BeginRestriction ( bool canBegin , string text , RestrictionSeverity severity )
2429 : this ( canBegin , new RestrictionDescription ( text , severity ) )
2530 {
2631 }
2732
33+ /// <summary>
34+ /// Creates a new <see cref="BeginRestriction"/>
35+ /// </summary>
36+ /// <param name="canBegin">Indicates whether this restriction still allows to begin the operation</param>
37+ /// <param name="canReduce">Indicates whether this restriction still allows to reduce the target amount of the operation</param>
38+ /// <param name="minimalTargetAmount">Provides the minimal target amount that can be set in the adjustment</param>
39+ /// <param name="description">Provides a <see cref="RestrictionDescription"/> for the restriction</param>
40+ public BeginRestriction ( bool canBegin , bool canReduce , int minimalTargetAmount , RestrictionDescription description )
41+ : this ( canBegin , description )
42+ {
43+ CanReduce = canReduce ;
44+ MinimalTargetAmount = minimalTargetAmount ;
45+ }
46+
47+ /// <summary>
48+ /// Creates a new <see cref="BeginRestriction"/>
49+ /// </summary>
50+ /// <param name="canBegin">Indicates whether this restriction still allows to begin the operation</param>
51+ /// <param name="canReduce">Indicates whether this restriction still allows to reduce the target amount of the operation</param>
52+ /// <param name="minimalTargetAmount">Provides the minimal target amount that can be set in the adjustment</param>
53+ /// <param name="description">Provides a textual description for the restriction</param>
54+ /// <param name="severity">Sets the severity of the restriction</param>
55+ public BeginRestriction ( bool canBegin , bool canReduce , int minimalTargetAmount , string description , RestrictionSeverity severity )
56+ : this ( canBegin , canReduce , minimalTargetAmount , new RestrictionDescription ( description , severity ) )
57+ {
58+ }
59+
2860 /// <summary>
2961 /// Indicator if a begin is possible
3062 /// </summary>
3163 public bool CanBegin { get ; }
3264
65+ /// <summary>
66+ /// Indicator if an adjustement of the operation is possible
67+ /// </summary>
68+ public bool CanReduce { get ; }
69+
70+ /// <summary>
71+ /// Minimal target amount that can be set in the adjustement
72+ /// </summary>
73+ public int MinimalTargetAmount { get ; }
74+
3375 /// <summary>
3476 /// Description of the Result why the rule was not complied
3577 /// </summary>
3678 public RestrictionDescription Description { get ; }
3779 }
38- }
80+ }
0 commit comments