File tree Expand file tree Collapse file tree 4 files changed +47
-31
lines changed
Expand file tree Collapse file tree 4 files changed +47
-31
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ public interface IBlockElement
55 string Type { get ; }
66}
77
8- public abstract class BlockElement : IBlockElement
8+ public abstract class BlockElement ( string type ) : IBlockElement
99{
10- protected BlockElement ( string type ) => Type = type ;
11-
12- public string Type { get ; }
10+ public string Type { get ; } = type ;
1311}
Original file line number Diff line number Diff line change @@ -11,32 +11,5 @@ public class ContextActionsBlock() : Block("context_actions")
1111public abstract class ContextActionsElement ( string type )
1212{
1313 public string Type { get ; set ; } = type ;
14- }
15-
16- [ SlackType ( "feedback_buttons" ) ]
17- public class FeedbackButtons ( ) : ContextActionsElement ( "feedback_buttons" )
18- {
19- public FeedbackButton PositiveButton { get ; set ; } = new ( ) ;
20- public FeedbackButton NegativeButton { get ; set ; } = new ( ) ;
21- public string ActionId { get ; set ; }
22- }
23-
24- public class FeedbackButton
25- {
26- public PlainText Text { get ; set ; }
27- public string Value { get ; set ; }
28- public string AccessibilityLabel { get ; set ; }
29- }
30-
31- [ SlackType ( "icon_button" ) ]
32- public class IconButton ( ) : ContextActionsElement ( "icon_button" )
33- {
34- public string Icon { get ; set ; }
35- public PlainText Text { get ; set ; }
3614 public string ActionId { get ; set ; }
37- public string Value { get ; set ; }
38- public ConfirmationDialog Confirm { get ; set ; }
39- public string AccessibilityLabel { get ; set ; }
40- [ IgnoreIfEmpty ]
41- public IList < string > VisibleToUserIds { get ; set ; } = [ ] ;
4215}
Original file line number Diff line number Diff line change 1+ namespace SlackNet . Blocks ;
2+
3+ [ SlackType ( "feedback_buttons" ) ]
4+ public class FeedbackButtons ( ) : ContextActionsElement ( "feedback_buttons" )
5+ {
6+ public FeedbackButton PositiveButton { get ; set ; } = new ( ) ;
7+ public FeedbackButton NegativeButton { get ; set ; } = new ( ) ;
8+ }
9+
10+ public class FeedbackButton
11+ {
12+ public PlainText Text { get ; set ; }
13+ public string Value { get ; set ; }
14+ public string AccessibilityLabel { get ; set ; }
15+ }
16+
17+ [ SlackType ( "feedback_buttons" ) ]
18+ public class FeedbackButtonsAction : BlockAction
19+ {
20+ public PlainText Text { get ; set ; }
21+ public string Value { get ; set ; }
22+ }
Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+
3+ namespace SlackNet . Blocks ;
4+
5+ [ SlackType ( "icon_button" ) ]
6+ public class IconButton ( ) : ContextActionsElement ( "icon_button" )
7+ {
8+ public string Icon { get ; set ; }
9+ public PlainText Text { get ; set ; }
10+ public string Value { get ; set ; }
11+ public ConfirmationDialog Confirm { get ; set ; }
12+ public string AccessibilityLabel { get ; set ; }
13+ [ IgnoreIfEmpty ]
14+ public IList < string > VisibleToUserIds { get ; set ; } = [ ] ;
15+ }
16+
17+ [ SlackType ( "icon_button" ) ]
18+ public class IconButtonAction : BlockAction
19+ {
20+ public string Icon { get ; set ; }
21+ public PlainText Text { get ; set ; }
22+ public string Value { get ; set ; }
23+ }
You can’t perform that action at this time.
0 commit comments