Skip to content

Commit e7ef6cc

Browse files
authored
Merge pull request #11 from rabbitmq/lukebakken/misc-20240701
Update README with test instructions
2 parents 6421cdb + 5feabb7 commit e7ef6cc

File tree

14 files changed

+402
-135
lines changed

14 files changed

+402
-135
lines changed

.ci/ubuntu/gha-log-check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -o pipefail
55
set -o xtrace
66
set -o nounset
77

8-
readonly docker_name_prefix='rabbitmq-dotnet-client'
8+
readonly docker_name_prefix='rabbitmq-amqp-dotnet-client'
99

1010
declare -r rabbitmq_docker_name="$docker_name_prefix-rabbitmq"
1111

.ci/ubuntu/gha-setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ set -o nounset
4444
declare -r rabbitmq_docker_name="$docker_name_prefix-rabbitmq"
4545
declare -r toxiproxy_docker_name="$docker_name_prefix-toxiproxy"
4646

47+
if [[ $1 == 'stop' ]]
48+
then
49+
docker stop "$rabbitmq_docker_name"
50+
docker stop "$toxiproxy_docker_name"
51+
exit 0
52+
fi
53+
4754
function start_toxiproxy
4855
{
4956
if [[ $run_toxiproxy == 'true' ]]

.editorconfig

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
root = true
2+
3+
trim_trailing_whitespace = true
4+
5+
[*]
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
10+
[*.cs]
11+
# New line preferences
12+
csharp_new_line_before_open_brace = all
13+
csharp_new_line_before_else = true
14+
csharp_new_line_before_catch = true
15+
csharp_new_line_before_finally = true
16+
csharp_new_line_before_members_in_object_initializers = true
17+
csharp_new_line_before_members_in_anonymous_types = true
18+
csharp_new_line_between_query_expression_clauses = true
19+
20+
# Indentation preferences
21+
csharp_indent_block_contents = true
22+
csharp_indent_braces = false
23+
csharp_indent_case_contents = true
24+
csharp_indent_case_contents_when_block = true
25+
csharp_indent_switch_labels = true
26+
csharp_indent_labels = one_less_than_current
27+
28+
# Modifier preferences
29+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
30+
31+
# avoid this. unless absolutely necessary
32+
dotnet_style_qualification_for_field = false:suggestion
33+
dotnet_style_qualification_for_property = false:suggestion
34+
dotnet_style_qualification_for_method = false:suggestion
35+
dotnet_style_qualification_for_event = false:suggestion
36+
37+
# Types: use keywords instead of BCL types, and permit var only when the type is clear
38+
csharp_style_var_for_built_in_types = false:suggestion
39+
csharp_style_var_when_type_is_apparent = false:none
40+
csharp_style_var_elsewhere = false:suggestion
41+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
42+
dotnet_style_predefined_type_for_member_access = true:suggestion
43+
44+
# name all constant fields using PascalCase
45+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
46+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
47+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
48+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
49+
dotnet_naming_symbols.constant_fields.required_modifiers = const
50+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
51+
52+
# static fields should have s_ prefix
53+
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
54+
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
55+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
56+
dotnet_naming_symbols.static_fields.applicable_kinds = field
57+
dotnet_naming_symbols.static_fields.required_modifiers = static
58+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
59+
dotnet_naming_style.static_prefix_style.required_prefix = s_
60+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
61+
62+
# internal and private fields should be _camelCase
63+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
64+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
65+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
66+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
67+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
68+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
69+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
70+
71+
# Code style defaults
72+
csharp_using_directive_placement = outside_namespace:suggestion
73+
dotnet_sort_system_directives_first = true
74+
csharp_prefer_braces = true:error
75+
csharp_preserve_single_line_blocks = true:none
76+
csharp_preserve_single_line_statements = false:none
77+
csharp_prefer_static_local_function = true:suggestion
78+
csharp_prefer_simple_using_statement = false:none
79+
csharp_style_prefer_switch_expression = true:suggestion
80+
81+
# Code quality
82+
dotnet_style_readonly_field = true:suggestion
83+
dotnet_code_quality_unused_parameters = non_public:suggestion
84+
85+
# Expression-level preferences
86+
dotnet_style_object_initializer = true:suggestion
87+
dotnet_style_collection_initializer = true:suggestion
88+
dotnet_style_explicit_tuple_names = true:suggestion
89+
dotnet_style_coalesce_expression = true:suggestion
90+
dotnet_style_null_propagation = true:suggestion
91+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
92+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
93+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
94+
dotnet_style_prefer_auto_properties = true:suggestion
95+
dotnet_style_prefer_conditional_expression_over_assignment = true:refactoring
96+
dotnet_style_prefer_conditional_expression_over_return = true:refactoring
97+
csharp_prefer_simple_default_expression = true:suggestion
98+
99+
# Expression-bodied members
100+
csharp_style_expression_bodied_methods = true:refactoring
101+
csharp_style_expression_bodied_constructors = true:refactoring
102+
csharp_style_expression_bodied_operators = true:refactoring
103+
csharp_style_expression_bodied_properties = true:refactoring
104+
csharp_style_expression_bodied_indexers = true:refactoring
105+
csharp_style_expression_bodied_accessors = true:refactoring
106+
csharp_style_expression_bodied_lambdas = true:refactoring
107+
csharp_style_expression_bodied_local_functions = true:refactoring
108+
109+
# Pattern matching
110+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
111+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
112+
csharp_style_inlined_variable_declaration = true:suggestion
113+
114+
# Null checking preferences
115+
csharp_style_throw_expression = true:suggestion
116+
csharp_style_conditional_delegate_call = true:suggestion
117+
118+
# Async methods should have "Async" suffix
119+
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
120+
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
121+
dotnet_naming_rule.async_methods_end_in_async.severity = warning
122+
123+
dotnet_naming_symbols.any_async_methods.applicable_kinds = method
124+
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
125+
dotnet_naming_symbols.any_async_methods.required_modifiers = async
126+
127+
dotnet_naming_style.end_in_async.required_suffix = Async
128+
dotnet_naming_style.end_in_async.capitalization = pascal_case_style
129+
130+
# Other features
131+
csharp_style_prefer_index_operator = false:none
132+
csharp_style_prefer_range_operator = false:none
133+
csharp_style_pattern_local_over_anonymous_function = false:none
134+
csharp_style_unused_value_expression_statement_preference = discard_variable:none
135+
136+
# Space preferences
137+
csharp_space_after_cast = false
138+
csharp_space_after_colon_in_inheritance_clause = true
139+
csharp_space_after_comma = true
140+
csharp_space_after_dot = false
141+
csharp_space_after_keywords_in_control_flow_statements = true
142+
csharp_space_after_semicolon_in_for_statement = true
143+
csharp_space_around_binary_operators = before_and_after
144+
csharp_space_around_declaration_statements = do_not_ignore
145+
csharp_space_before_colon_in_inheritance_clause = true
146+
csharp_space_before_comma = false
147+
csharp_space_before_dot = false
148+
csharp_space_before_open_square_brackets = false
149+
csharp_space_before_semicolon_in_for_statement = false
150+
csharp_space_between_empty_square_brackets = false
151+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
152+
csharp_space_between_method_call_name_and_opening_parenthesis = false
153+
csharp_space_between_method_call_parameter_list_parentheses = false
154+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
155+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
156+
csharp_space_between_method_declaration_parameter_list_parentheses = false
157+
csharp_space_between_parentheses = false
158+
csharp_space_between_square_brackets = false
159+
160+
# Analyzers
161+
dotnet_code_quality.api_surface = public
162+
dotnet_code_quality.ca1802.api_surface = private, internal
163+
164+
dotnet_public_api_analyzer.require_api_files = true
165+
166+
dotnet_diagnostic.RS0026.severity = none
167+
dotnet_diagnostic.RS0027.severity = none
168+
dotnet_diagnostic.RS0036.severity = none
169+
dotnet_diagnostic.RS0041.severity = none
170+
dotnet_diagnostic.RS0051.severity = error
171+
172+
dotnet_diagnostic.CA2007.severity = error
173+
174+
# C++ Files
175+
[*.{cpp,h,in}]
176+
curly_bracket_next_line = true
177+
indent_brace_style = Allman
178+
179+
# Xml project files
180+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
181+
indent_size = 2
182+
183+
# Xml build files
184+
[*.builds]
185+
indent_size = 2
186+
187+
# Xml files
188+
[*.{xml,stylecop,resx,ruleset}]
189+
indent_size = 2
190+
191+
# Xml config files
192+
[*.{props,targets,config,nuspec}]
193+
indent_size = 2
194+
195+
[*.sh]
196+
end_of_line = lf
197+
[*.{cmd, bat}]
198+
end_of_line = crlf
199+
200+
[*.json]
201+
indent_size = 2
202+
203+
[*.yml]
204+
indent_size = 2

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# RabbitMQ AMQP 1.0 DotNet Client
1+
# RabbitMQ AMQP 1.0 .NET Client
22

3-
4-
This library is in early stages of development.
5-
It is meant to be used with RabbitMQ 4.0.
3+
This library is in early stages of development. It is meant to be used with RabbitMQ 4.0.
64

75
## How to Run
8-
- start the broker with `ci/start-broker.sh`
9-
- run the tests with ` dotnet test ./Build.csproj --logger "console;verbosity=detailed" /p:AltCover=true`
6+
7+
- Start the broker with `./.ci/ubuntu/gha-setup.sh`. Note that this has been tested on Ubuntu 22 with docker.
8+
- Run the tests with ` dotnet test ./Build.csproj --logger "console;verbosity=detailed" /p:AltCover=true`
9+
- Stop RabbitMQ with `./.ci/ubuntu/gha-setup.sh stop`
1010

1111
## Getting Started
12-
You can find an example in: `docs/Examples/GettingStarted`
1312

13+
You can find an example in: `docs/Examples/GettingStarted`
1414

1515
## TODO
1616

RabbitMQ.AMQP.Client/IEntities.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ public interface IEntityInfo
44
{
55
}
66

7-
87
/// <summary>
98
/// Generic interface for declaring entities
109
/// </summary>
@@ -39,10 +38,8 @@ public interface IQueueSpecification : IEntityDeclaration<IQueueInfo>
3938
// IQueueSpecification Queue();
4039
// }
4140

42-
4341
public interface IQueueDeletion
4442
{
4543
// TODO consider returning a QueueStatus object with some info after deletion
4644
Task<IEntityInfo> Delete(string name);
4745
}
48-

0 commit comments

Comments
 (0)