Skip to content

Commit 727abed

Browse files
committed
add client sample code.
1 parent e68b98e commit 727abed

File tree

342 files changed

+30477
-0
lines changed

Some content is hidden

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

342 files changed

+30477
-0
lines changed

Client/.editorconfig

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# This was taken from Avalonia
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default settings:
7+
# A newline ending every file
8+
# Use 4 spaces as indentation
9+
[*]
10+
insert_final_newline = true
11+
indent_style = space
12+
indent_size = 4
13+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
14+
tab_width = 4
15+
end_of_line = crlf
16+
dotnet_style_coalesce_expression = true:suggestion
17+
dotnet_style_null_propagation = true:suggestion
18+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
19+
dotnet_style_prefer_auto_properties = true:silent
20+
dotnet_style_object_initializer = true:suggestion
21+
dotnet_style_collection_initializer = true:suggestion
22+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
23+
dotnet_style_namespace_match_folder = true:suggestion
24+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
25+
dotnet_style_prefer_conditional_expression_over_return = true:silent
26+
dotnet_style_explicit_tuple_names = true:suggestion
27+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
28+
29+
# C# files
30+
[*.cs]
31+
# New line preferences
32+
csharp_new_line_before_open_brace = all
33+
csharp_new_line_before_else = true
34+
csharp_new_line_before_catch = true
35+
csharp_new_line_before_finally = true
36+
csharp_new_line_before_members_in_object_initializers = true
37+
csharp_new_line_before_members_in_anonymous_types = true
38+
csharp_new_line_between_query_expression_clauses = true
39+
40+
# Indentation preferences
41+
csharp_indent_block_contents = true
42+
csharp_indent_braces = false
43+
csharp_indent_case_contents = true
44+
csharp_indent_switch_labels = true
45+
csharp_indent_labels = one_less_than_current
46+
47+
# avoid this. unless absolutely necessary
48+
dotnet_style_qualification_for_field = false:suggestion
49+
dotnet_style_qualification_for_property = false:suggestion
50+
dotnet_style_qualification_for_method = false:suggestion
51+
dotnet_style_qualification_for_event = false:suggestion
52+
53+
# prefer var
54+
csharp_style_var_for_built_in_types = true
55+
csharp_style_var_when_type_is_apparent = true
56+
csharp_style_var_elsewhere = true:suggestion
57+
58+
# use language keywords instead of BCL types
59+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
60+
dotnet_style_predefined_type_for_member_access = true:suggestion
61+
62+
# name all constant fields using PascalCase
63+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
64+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
65+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
66+
67+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
68+
dotnet_naming_symbols.constant_fields.required_modifiers = const
69+
70+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
71+
72+
# private static fields should have s_ prefix
73+
dotnet_naming_rule.private_static_fields_should_have_prefix.severity = suggestion
74+
dotnet_naming_rule.private_static_fields_should_have_prefix.symbols = private_static_fields
75+
dotnet_naming_rule.private_static_fields_should_have_prefix.style = private_static_prefix_style
76+
77+
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
78+
dotnet_naming_symbols.private_static_fields.required_modifiers = static
79+
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private
80+
81+
dotnet_naming_style.private_static_prefix_style.required_prefix = s_
82+
dotnet_naming_style.private_static_prefix_style.capitalization = camel_case
83+
84+
# internal and private fields should be _camelCase
85+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
86+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
87+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
88+
89+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
90+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
91+
92+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
93+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
94+
95+
# use accessibility modifiers
96+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
97+
98+
# Code style defaults
99+
dotnet_sort_system_directives_first = true
100+
csharp_preserve_single_line_blocks = true
101+
csharp_preserve_single_line_statements = false
102+
103+
# Expression-level preferences
104+
dotnet_style_object_initializer = true:suggestion
105+
dotnet_style_collection_initializer = true:suggestion
106+
dotnet_style_explicit_tuple_names = true:suggestion
107+
dotnet_style_coalesce_expression = true:suggestion
108+
dotnet_style_null_propagation = true:suggestion
109+
110+
# Expression-bodied members
111+
csharp_style_expression_bodied_methods = false:none
112+
csharp_style_expression_bodied_constructors = false:none
113+
csharp_style_expression_bodied_operators = false:none
114+
csharp_style_expression_bodied_properties = true:none
115+
csharp_style_expression_bodied_indexers = true:none
116+
csharp_style_expression_bodied_accessors = true:none
117+
118+
# Pattern matching
119+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
120+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
121+
csharp_style_inlined_variable_declaration = true:suggestion
122+
123+
# Null checking preferences
124+
csharp_style_throw_expression = true:suggestion
125+
csharp_style_conditional_delegate_call = true:suggestion
126+
127+
# Space preferences
128+
csharp_space_after_cast = false
129+
csharp_space_after_colon_in_inheritance_clause = true
130+
csharp_space_after_comma = true
131+
csharp_space_after_dot = false
132+
csharp_space_after_keywords_in_control_flow_statements = true
133+
csharp_space_after_semicolon_in_for_statement = true
134+
csharp_space_around_binary_operators = before_and_after
135+
csharp_space_around_declaration_statements = do_not_ignore
136+
csharp_space_before_colon_in_inheritance_clause = true
137+
csharp_space_before_comma = false
138+
csharp_space_before_dot = false
139+
csharp_space_before_open_square_brackets = false
140+
csharp_space_before_semicolon_in_for_statement = false
141+
csharp_space_between_empty_square_brackets = false
142+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
143+
csharp_space_between_method_call_name_and_opening_parenthesis = false
144+
csharp_space_between_method_call_parameter_list_parentheses = false
145+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
146+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
147+
csharp_space_between_method_declaration_parameter_list_parentheses = false
148+
csharp_space_between_parentheses = false
149+
csharp_space_between_square_brackets = false
150+
space_within_single_line_array_initializer_braces = true
151+
152+
# Wrapping preferences
153+
csharp_wrap_before_ternary_opsigns = false
154+
csharp_prefer_braces= when_multiline:silent
155+
csharp_using_directive_placement = outside_namespace:silent
156+
csharp_prefer_simple_using_statement = true:suggestion
157+
csharp_style_namespace_declarations = file_scoped:warning
158+
csharp_style_prefer_method_group_conversion = true:silent
159+
csharp_style_prefer_top_level_statements = true:silent
160+
csharp_style_expression_bodied_lambdas = true:silent
161+
csharp_style_expression_bodied_local_functions = false:silent
162+
163+
# Xaml files
164+
[*.xaml]
165+
indent_size = 2
166+
167+
# Xml project files
168+
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
169+
indent_size = 2
170+
171+
# Xml build files
172+
[*.builds]
173+
indent_size = 2
174+
175+
# Xml files
176+
[*.{xml,stylecop,resx,ruleset}]
177+
indent_size = 2
178+
179+
# Xml config files
180+
[*.{props,targets,config,nuspec}]
181+
indent_size = 2
182+
183+
[*.json]
184+
indent_size = 2
185+
186+
# Shell scripts
187+
[*.sh]
188+
end_of_line = lf
189+
[*.{cmd, bat}]
190+
end_of_line = crlf

Client/.gitattributes

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
64+
65+
#Try force .axaml files to display with xaml syntax highlighting
66+
*.axaml linguist-language=xml

0 commit comments

Comments
 (0)