Skip to content

Commit 617eac0

Browse files
committed
Namespaces reshuffling (breaking changes)
1 parent 469c794 commit 617eac0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+7092
-7322
lines changed

.editorconfig

Lines changed: 118 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[*]
2-
end_of_line = lf
3-
indent_style=tab
4-
dotnet_style_predefined_type_for_locals_parameters_members= true:error
5-
dotnet_style_predefined_type_for_member_access= true:error
6-
dotnet_diagnostic.CA1021.severity=silent
7-
dotnet_diagnostic.CA1310.severity=suggestion
2+
end_of_line = lf
3+
indent_style=tab
4+
dotnet_style_predefined_type_for_locals_parameters_members= true:error
5+
dotnet_style_predefined_type_for_member_access= true:error
6+
dotnet_diagnostic.CA1021.severity=silent
7+
dotnet_diagnostic.CA1310.severity=suggestion
88
dotnet_style_allow_multiple_blank_lines_experimental= false:suggestion
99

1010
[*.xml]
@@ -13,6 +13,7 @@ indent_style = space
1313
[*.cs]
1414
indent_style = space
1515
indent_size = 4
16+
tab_width = 4
1617
trim_trailing_whitespace=true
1718
dotnet_sort_system_directives_first=true
1819
csharp_new_line_before_else=false
@@ -29,122 +30,114 @@ csharp_style_expression_bodied_indexers= true:suggestion
2930
csharp_style_expression_bodied_properties= true:suggestion
3031
csharp_style_var_when_type_is_apparent= true:suggestion
3132
csharp_style_deconstructed_variable_declaration= true:suggestion
32-
33-
# IDE0056: Use index operator
34-
csharp_style_prefer_index_operator = false:suggestion
35-
csharp_style_namespace_declarations= file_scoped:warning
36-
csharp_style_prefer_pattern_matching= true:suggestion
37-
csharp_style_allow_blank_lines_between_consecutive_braces_experimental= false:suggestion
38-
csharp_indent_labels = one_less_than_current
39-
csharp_using_directive_placement = outside_namespace:silent
40-
csharp_prefer_simple_using_statement = true:suggestion
41-
csharp_style_prefer_method_group_conversion = true:suggestion
42-
csharp_style_prefer_top_level_statements = true:silent
43-
csharp_style_expression_bodied_lambdas = true:suggestion
44-
csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion
45-
csharp_space_around_binary_operators = before_and_after
46-
csharp_style_throw_expression = true:suggestion
47-
csharp_style_prefer_null_check_over_type_check = true:suggestion
48-
csharp_style_prefer_local_over_anonymous_function = true:suggestion
49-
csharp_style_prefer_range_operator = true:suggestion
50-
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
51-
csharp_style_prefer_tuple_swap = true:suggestion
52-
csharp_style_prefer_utf8_string_literals = true:suggestion
53-
csharp_style_inlined_variable_declaration = true:suggestion
54-
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
55-
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
56-
csharp_prefer_static_local_function = true:suggestion
57-
csharp_style_allow_embedded_statements_on_same_line_experimental = true:suggestion
58-
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:suggestion
59-
csharp_style_conditional_delegate_call = true:suggestion
60-
csharp_style_prefer_switch_expression = true:suggestion
61-
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
62-
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
63-
csharp_style_prefer_not_pattern = true:suggestion
64-
csharp_style_prefer_extended_property_pattern = true:suggestion
65-
csharp_style_var_for_built_in_types = false:suggestion
66-
csharp_style_var_elsewhere = false:suggestion
67-
dotnet_diagnostic.CA1001.severity = warning
68-
dotnet_diagnostic.CA1309.severity = suggestion
69-
dotnet_diagnostic.CA1805.severity = suggestion
70-
71-
[*.{cs,vb}]
72-
#### Naming styles ####
73-
74-
# Naming rules
75-
76-
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
77-
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
78-
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
79-
80-
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
81-
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
82-
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
83-
84-
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
85-
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
86-
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
87-
88-
# Symbol specifications
89-
90-
dotnet_naming_symbols.interface.applicable_kinds = interface
91-
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
92-
dotnet_naming_symbols.interface.required_modifiers =
93-
94-
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
95-
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
96-
dotnet_naming_symbols.types.required_modifiers =
97-
98-
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
99-
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
100-
dotnet_naming_symbols.non_field_members.required_modifiers =
101-
102-
# Naming styles
103-
104-
dotnet_naming_style.begins_with_i.required_prefix = I
105-
dotnet_naming_style.begins_with_i.required_suffix =
106-
dotnet_naming_style.begins_with_i.word_separator =
107-
dotnet_naming_style.begins_with_i.capitalization = pascal_case
108-
109-
dotnet_naming_style.pascal_case.required_prefix =
110-
dotnet_naming_style.pascal_case.required_suffix =
111-
dotnet_naming_style.pascal_case.word_separator =
112-
dotnet_naming_style.pascal_case.capitalization = pascal_case
113-
114-
dotnet_naming_style.pascal_case.required_prefix =
115-
dotnet_naming_style.pascal_case.required_suffix =
116-
dotnet_naming_style.pascal_case.word_separator =
117-
dotnet_naming_style.pascal_case.capitalization = pascal_case
118-
dotnet_style_operator_placement_when_wrapping = beginning_of_line
119-
tab_width = 4
120-
indent_size = 4
121-
dotnet_style_coalesce_expression = true:suggestion
122-
dotnet_style_null_propagation = true:suggestion
123-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
124-
dotnet_style_prefer_auto_properties = true:suggestion
125-
dotnet_style_object_initializer = true:suggestion
126-
dotnet_style_collection_initializer = true:suggestion
127-
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
128-
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
129-
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
130-
dotnet_style_explicit_tuple_names = true:suggestion
131-
dotnet_style_prefer_inferred_tuple_names = true:suggestion
132-
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
133-
dotnet_style_prefer_compound_assignment = true:suggestion
134-
dotnet_style_prefer_simplified_interpolation = true:suggestion
135-
dotnet_style_namespace_match_folder = true:suggestion
136-
dotnet_style_readonly_field = true:suggestion
137-
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
138-
dotnet_style_allow_statement_immediately_after_block_experimental = true:suggestion
139-
dotnet_code_quality_unused_parameters = non_public:suggestion
140-
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
141-
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
142-
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
143-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
144-
dotnet_style_qualification_for_field = false:silent
145-
dotnet_style_qualification_for_property = false:silent
146-
dotnet_style_qualification_for_method = false:silent
147-
dotnet_style_qualification_for_event = false:silent
148-
dotnet_diagnostic.CA1712.severity = warning
149-
dotnet_diagnostic.CA1725.severity = suggestion
150-
dotnet_diagnostic.CA2011.severity = warning
33+
csharp_style_prefer_index_operator = false:suggestion
34+
csharp_style_namespace_declarations= file_scoped:warning
35+
csharp_style_prefer_pattern_matching= true:suggestion
36+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental= false:suggestion
37+
csharp_indent_labels = one_less_than_current
38+
csharp_using_directive_placement = outside_namespace:silent
39+
csharp_prefer_simple_using_statement = true:suggestion
40+
csharp_style_prefer_method_group_conversion = true:suggestion
41+
csharp_style_prefer_top_level_statements = true:silent
42+
csharp_style_expression_bodied_lambdas = true:suggestion
43+
csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion
44+
csharp_space_around_binary_operators = before_and_after
45+
csharp_style_throw_expression = true:suggestion
46+
csharp_style_prefer_null_check_over_type_check = true:suggestion
47+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
48+
csharp_style_prefer_range_operator = true:suggestion
49+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
50+
csharp_style_prefer_tuple_swap = true:suggestion
51+
csharp_style_prefer_utf8_string_literals = true:suggestion
52+
csharp_style_inlined_variable_declaration = true:suggestion
53+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
54+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
55+
csharp_prefer_static_local_function = true:suggestion
56+
csharp_style_allow_embedded_statements_on_same_line_experimental = true:suggestion
57+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:suggestion
58+
csharp_style_conditional_delegate_call = true:suggestion
59+
csharp_style_prefer_switch_expression = true:suggestion
60+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
61+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
62+
csharp_style_prefer_not_pattern = true:suggestion
63+
csharp_style_prefer_extended_property_pattern = true:suggestion
64+
csharp_style_var_for_built_in_types = false:suggestion
65+
csharp_style_var_elsewhere = false:suggestion
66+
dotnet_diagnostic.CA1001.severity = warning
67+
dotnet_diagnostic.CA1309.severity = suggestion
68+
dotnet_diagnostic.CA1805.severity = suggestion
69+
70+
#### Naming styles ####
71+
# Naming rules
72+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
73+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
74+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
75+
76+
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
77+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
78+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
79+
80+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
81+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
82+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
83+
84+
# Symbol specifications
85+
dotnet_naming_symbols.interface.applicable_kinds = interface
86+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
87+
dotnet_naming_symbols.interface.required_modifiers =
88+
89+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
90+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
91+
dotnet_naming_symbols.types.required_modifiers =
92+
93+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
94+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
95+
dotnet_naming_symbols.non_field_members.required_modifiers =
96+
97+
# Naming styles
98+
dotnet_naming_style.begins_with_i.required_prefix = I
99+
dotnet_naming_style.begins_with_i.required_suffix =
100+
dotnet_naming_style.begins_with_i.word_separator =
101+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
102+
103+
dotnet_naming_style.pascal_case.required_prefix =
104+
dotnet_naming_style.pascal_case.required_suffix =
105+
dotnet_naming_style.pascal_case.word_separator =
106+
dotnet_naming_style.pascal_case.capitalization = pascal_case
107+
108+
dotnet_naming_style.pascal_case.required_prefix =
109+
dotnet_naming_style.pascal_case.required_suffix =
110+
dotnet_naming_style.pascal_case.word_separator =
111+
dotnet_naming_style.pascal_case.capitalization = pascal_case
112+
113+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
114+
dotnet_style_coalesce_expression = true:suggestion
115+
dotnet_style_null_propagation = true:suggestion
116+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
117+
dotnet_style_prefer_auto_properties = true:suggestion
118+
dotnet_style_object_initializer = true:suggestion
119+
dotnet_style_collection_initializer = true:suggestion
120+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
121+
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
122+
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
123+
dotnet_style_explicit_tuple_names = true:suggestion
124+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
125+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
126+
dotnet_style_prefer_compound_assignment = true:suggestion
127+
dotnet_style_prefer_simplified_interpolation = true:suggestion
128+
dotnet_style_namespace_match_folder = true:suggestion
129+
dotnet_style_readonly_field = true:suggestion
130+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
131+
dotnet_style_allow_statement_immediately_after_block_experimental = true:suggestion
132+
dotnet_code_quality_unused_parameters = non_public:suggestion
133+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
134+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
135+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
136+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
137+
dotnet_style_qualification_for_field = false:silent
138+
dotnet_style_qualification_for_property = false:silent
139+
dotnet_style_qualification_for_method = false:silent
140+
dotnet_style_qualification_for_event = false:silent
141+
dotnet_diagnostic.CA1712.severity = warning
142+
dotnet_diagnostic.CA1725.severity = suggestion
143+
dotnet_diagnostic.CA2011.severity = warning

SvgDocTest/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Copyright © 2003 RiskCare Ltd. All rights reserved.
33
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved.
4-
Copyright © 2015-2019 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors
4+
Copyright © 2015-2022 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors
55
66
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more
77
*/
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyConfiguration("")]
1414
[assembly: AssemblyCompany("RiskCare Ltd, SvgNet and SvgGdi Bridge Project, Rafael Teixeira, Mojmír Němeček")]
1515
[assembly: AssemblyProduct("SvgNet")]
16-
[assembly: AssemblyCopyright("Copyright 2003, 2010, 2015-2019 RiskCare Ltd, SvgNet and SvgGdi Bridge Project, Rafael Teixeira, Mojmír Němeček, Benjamin Peterson")]
16+
[assembly: AssemblyCopyright("Copyright 2003, 2010, 2015-2022 RiskCare Ltd, SvgNet and SvgGdi Bridge Project, Rafael Teixeira, Mojmír Němeček, Benjamin Peterson")]
1717
[assembly: AssemblyTrademark("")]
1818
[assembly: AssemblyCulture("")]
1919
[assembly: AssemblyVersion("1.0.0")]

SvgDocTest/Assert.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
2-
Copyright © 2003 RiskCare Ltd. All rights reserved.
3-
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved.
4-
Copyright © 2015-2019 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors
2+
Copyright © 2003 RiskCare Ltd. All rights reserved.
3+
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved.
4+
Copyright © 2015-2022 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors
55
6-
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more
6+
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more
77
*/
88

99
using System;

SvgDocTest/DocForm.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
using System;
22
using System.IO;
33
using System.Windows.Forms;
4+
45
using SvgNet;
5-
using SvgNet.SvgElements;
6-
using SvgNet.SvgTypes;
6+
using SvgNet.Elements;
7+
using SvgNet.Types;
78

89
namespace SvgDocTest {
910
public partial class DocForm : Form {
1011
public DocForm() => InitializeComponent();
1112

1213
private static readonly string _tempFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "foo.svg");
1314

14-
1515
/// <summary>
1616
/// The main entry point for the application.
1717
/// </summary>
@@ -43,7 +43,7 @@ private void Button2_Click(object sender, EventArgs e) {
4343

4444
//adding multiple children
4545

46-
root.AddChildren(
46+
_ = root.AddChildren(
4747
new SvgRectElement(5, 5, 5, 5),
4848
new SvgEllipseElement(20, 20, 8, 12) {
4949
Style = "fill:yellow;stroke:red"
@@ -79,7 +79,7 @@ private void Button2_Click(object sender, EventArgs e) {
7979

8080
//cloning and style arithmetic
8181

82-
grp.AddChildren(ell, pathy);
82+
_ = grp.AddChildren(ell, pathy);
8383

8484
grp.Style.Set("fill", "blue");
8585

@@ -128,7 +128,7 @@ private void Button3_Click(object sender, EventArgs e) {
128128
Assert.Equals(f[1].Abs, true);
129129
Assert.Equals(f[2].Data[3], 10f);
130130

131-
MessageBox.Show("Tests completed Ok");
131+
_ = MessageBox.Show("Tests completed Ok");
132132
}
133133
private void ProcessSvgFile(string svgFileName) {
134134
tbIn.Text = svgFileName.LoadText();
@@ -137,6 +137,5 @@ private void ProcessSvgFile(string svgFileName) {
137137
File.WriteAllText(_tempFileName, tbOut.Text);
138138
RefreshBrowserFrom(svgOut, _tempFileName);
139139
}
140-
141140
}
142141
}

SvgDocTest/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Copyright © 2003 RiskCare Ltd. All rights reserved.
33
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved.
4-
Copyright © 2015-2019 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors
4+
Copyright © 2015-2022 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors
55
66
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more
77
*/

SvgDotNetCoreTest/Program.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
using System;
22
using System.Drawing;
3+
34
using SvgNet;
4-
using SvgNet.SvgGdi;
5+
using SvgNet.Interfaces;
56

6-
namespace SvgDotNetCoreTest {
7-
public static class Program {
8-
public static void Main(string[] args) {
9-
foreach (System.Collections.Generic.KeyValuePair<string, Action<IGraphics>> pair in TestShared.Renderers) {
10-
var ig = new SvgGraphics(Color.WhiteSmoke);
11-
Console.WriteLine($"=== Renderer {pair.Key}");
12-
pair.Value(ig);
13-
Console.WriteLine(ig.WriteSVGString());
14-
}
7+
namespace SvgDotNetCoreTest;
8+
public static class Program {
9+
public static void Main(string[] args) {
10+
foreach (System.Collections.Generic.KeyValuePair<string, Action<IGraphics>> pair in TestShared.Renderers) {
11+
using var ig = new SvgGraphics(Color.WhiteSmoke);
12+
Console.WriteLine($"=== Renderer {pair.Key}");
13+
pair.Value(ig);
14+
Console.WriteLine(ig.WriteSVGString());
1515
}
1616
}
1717
}

SvgGdiTest/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyConfiguration("")]
1414
[assembly: AssemblyCompany("RiskCare Ltd, SvgNet and SvgGdi Bridge Project, Rafael Teixeira, Mojmír Němeček, Benjamin Peterson")]
1515
[assembly: AssemblyProduct("SvgNet")]
16-
[assembly: AssemblyCopyright("Copyright 2003, 2010, 2015-2019 RiskCare Ltd, SvgNet and SvgGdi Bridge Project, Rafael Teixeira, Mojmír Němeček, Benjamin Peterson")]
16+
[assembly: AssemblyCopyright("Copyright 2003, 2010, 2015-2022 RiskCare Ltd, SvgNet and SvgGdi Bridge Project, Rafael Teixeira, Mojmír Němeček, Benjamin Peterson")]
1717
[assembly: AssemblyTrademark("")]
1818
[assembly: AssemblyCulture("")]
1919
[assembly: AssemblyVersion("1.0.0")]

0 commit comments

Comments
 (0)