File tree Expand file tree Collapse file tree 1 file changed +24
-10
lines changed
src/PowerShellEditorServices.Protocol/Server Expand file tree Collapse file tree 1 file changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,33 @@ public void Update(
92
92
}
93
93
}
94
94
95
- public class CodeFormattingSettings
95
+ public class AbstractSettings
96
+ {
97
+ public AbstractSettings ( )
98
+ {
99
+
100
+ }
101
+
102
+ public AbstractSettings ( AbstractSettings abstractSettings )
103
+ {
104
+ if ( abstractSettings == null )
105
+ {
106
+ throw new ArgumentNullException ( nameof ( abstractSettings ) ) ;
107
+ }
108
+
109
+ foreach ( var prop in this . GetType ( ) . GetProperties ( BindingFlags . Public | BindingFlags . Instance ) )
110
+ {
111
+ prop . SetValue ( this , prop . GetValue ( abstractSettings ) ) ;
112
+ }
113
+ }
114
+ }
115
+
116
+ public class CodeFormattingSettings : AbstractSettings
96
117
{
97
118
/// <summary>
98
119
/// Default constructor.
99
120
/// </summary>
100
- public CodeFormattingSettings ( )
121
+ public CodeFormattingSettings ( ) : base ( )
101
122
{
102
123
103
124
}
@@ -107,16 +128,9 @@ public CodeFormattingSettings()
107
128
/// </summary>
108
129
/// <param name="codeFormattingSettings">An instance of type CodeFormattingSettings.</param>
109
130
public CodeFormattingSettings ( CodeFormattingSettings codeFormattingSettings )
131
+ : base ( codeFormattingSettings )
110
132
{
111
- if ( codeFormattingSettings == null )
112
- {
113
- throw new ArgumentNullException ( nameof ( codeFormattingSettings ) ) ;
114
- }
115
133
116
- foreach ( var prop in this . GetType ( ) . GetProperties ( BindingFlags . Public | BindingFlags . Instance ) )
117
- {
118
- prop . SetValue ( this , prop . GetValue ( codeFormattingSettings ) ) ;
119
- }
120
134
}
121
135
122
136
public bool OpenBraceOnSameLine { get ; set ; }
You can’t perform that action at this time.
0 commit comments