File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed
src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
using Discord . Utils ;
2
+
3
+ using System ;
2
4
using System . Collections . Generic ;
5
+ using System . Diagnostics ;
3
6
using System . Linq ;
4
- using System ;
5
7
6
8
namespace Discord ;
7
9
8
10
/// <summary>
9
11
/// Represents a class used to build Action rows.
10
12
/// </summary>
13
+ [ DebuggerDisplay ( @"{DebuggerDisplay,nq}" ) ]
11
14
public class ActionRowBuilder : IMessageComponentBuilder , IInteractableComponentContainer
12
15
{
13
16
/// <inheritdoc />
@@ -239,4 +242,6 @@ internal bool CanTakeComponent(IMessageComponentBuilder component)
239
242
240
243
/// <inheritdoc />
241
244
IComponentContainer IComponentContainer . WithComponents ( IEnumerable < IMessageComponentBuilder > components ) => WithComponents ( components ) ;
245
+
246
+ private string DebuggerDisplay => $ "{ nameof ( ActionRowBuilder ) } : { this . ComponentCount ( ) } child components.";
242
247
}
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Diagnostics ;
3
4
using System . Linq ;
4
5
5
6
namespace Discord ;
6
7
8
+
9
+ [ DebuggerDisplay ( @"{DebuggerDisplay,nq}" ) ]
7
10
public class ComponentBuilderV2 : IStaticComponentContainer
8
11
{
9
12
/// <summary>
@@ -98,4 +101,6 @@ and not SeparatorBuilder
98
101
99
102
/// <inheritdoc/>
100
103
IComponentContainer IComponentContainer . WithComponents ( IEnumerable < IMessageComponentBuilder > components ) => WithComponents ( components ) ;
104
+
105
+ private string DebuggerDisplay => $ "{ nameof ( ComponentBuilderV2 ) } : { this . ComponentCount ( ) } child components.";
101
106
}
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Collections . Immutable ;
4
+ using System . Diagnostics ;
4
5
using System . Linq ;
5
6
6
7
namespace Discord ;
7
8
9
+ [ DebuggerDisplay ( @"{DebuggerDisplay,nq}" ) ]
8
10
public class ContainerBuilder : IMessageComponentBuilder , IStaticComponentContainer
9
11
{
10
12
/// <inheritdoc />
@@ -125,4 +127,6 @@ and not SeparatorBuilder
125
127
IComponentContainer IComponentContainer . AddComponents ( params IMessageComponentBuilder [ ] components ) => AddComponents ( components ) ;
126
128
/// <inheritdoc />
127
129
IComponentContainer IComponentContainer . WithComponents ( IEnumerable < IMessageComponentBuilder > components ) => WithComponents ( components ) ;
130
+
131
+ private string DebuggerDisplay => $ "{ nameof ( ContainerBuilder ) } : { this . ComponentCount ( ) } child components.";
128
132
}
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Collections . Immutable ;
4
+ using System . Diagnostics ;
4
5
using System . Linq ;
5
6
6
7
namespace Discord ;
7
8
9
+
10
+ [ DebuggerDisplay ( @"{DebuggerDisplay,nq}" ) ]
8
11
public class SectionBuilder : IMessageComponentBuilder , IStaticComponentContainer
9
12
{
10
13
/// <summary>
@@ -128,4 +131,6 @@ public SectionComponent Build()
128
131
IComponentContainer IComponentContainer . AddComponents ( params IMessageComponentBuilder [ ] components ) => AddComponents ( components ) ;
129
132
/// <inheritdoc/>
130
133
IComponentContainer IComponentContainer . WithComponents ( IEnumerable < IMessageComponentBuilder > components ) => WithComponents ( components . ToList ( ) ) ;
134
+
135
+ private string DebuggerDisplay => $ "{ nameof ( SectionBuilder ) } : { this . ComponentCount ( ) } child components.";
131
136
}
You can’t perform that action at this time.
0 commit comments