├── .config └── dotnet-tools.json ├── .editorconfig ├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE.md ├── NuGet.config ├── README.md ├── assets └── logo.png ├── azure-pipelines.yml ├── build.cake ├── release.config.js └── src ├── Directory.Build.props ├── Reference.AzurePipelines.Tests ├── GlobalSuppressions.cs ├── Reference.AzurePipelines.Tests.csproj └── StarWarsNamesSpecs.cs ├── Reference.AzurePipelines.sln ├── Reference.AzurePipelines.snk └── Reference.AzurePipelines ├── Reference.AzurePipelines.csproj └── StarWarsNames.cs /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "cake.tool": { 6 | "version": "0.38.4", 7 | "commands": [ 8 | "dotnet-cake" 9 | ] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Version: 1.3.0 (Using https://semver.org/) 2 | # Updated: 2019-08-04 3 | # See https://github.com/RehanSaeed/EditorConfig/releases for release notes. 4 | # See https://github.com/RehanSaeed/EditorConfig for updates to this file. 5 | # See http://EditorConfig.org for more information about .editorconfig files. 6 | 7 | # I have changed the following from the original 8 | # dotnet_style_qualification_for_field = false:warning 9 | # dotnet_style_qualification_for_property = false:warning 10 | # dotnet_style_qualification_for_method = false:warning 11 | # dotnet_style_qualification_for_event = false:warning 12 | 13 | ########################################## 14 | # Common Settings 15 | ########################################## 16 | 17 | # This file is the top-most EditorConfig file 18 | root = true 19 | 20 | # All Files 21 | [*] 22 | charset = utf-8 23 | indent_style = space 24 | indent_size = 4 25 | insert_final_newline = true 26 | trim_trailing_whitespace = true 27 | 28 | ########################################## 29 | # File Extension Settings 30 | ########################################## 31 | 32 | # Visual Studio Solution Files 33 | [*.sln] 34 | indent_style = tab 35 | 36 | # Visual Studio XML Project Files 37 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] 38 | indent_size = 2 39 | 40 | # Various XML Configuration Files 41 | [*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}] 42 | indent_size = 2 43 | 44 | # JSON Files 45 | [*.{json,json5}] 46 | indent_size = 2 47 | 48 | # YAML Files 49 | [*.{yml,yaml}] 50 | indent_size = 2 51 | 52 | # Markdown Files 53 | [*.md] 54 | trim_trailing_whitespace = false 55 | 56 | # Web Files 57 | [*.{htm,html,js,ts,tsx,css,sass,scss,less,svg,vue}] 58 | indent_size = 2 59 | 60 | # Batch Files 61 | [*.{cmd,bat}] 62 | 63 | # Bash Files 64 | [*.sh] 65 | end_of_line = lf 66 | 67 | ########################################## 68 | # .NET Language Conventions 69 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions 70 | ########################################## 71 | 72 | # .NET Code Style Settings 73 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings 74 | [*.{cs,csx,cake,vb}] 75 | # "this." and "Me." qualifiers 76 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#this-and-me 77 | dotnet_style_qualification_for_field = false:warning 78 | dotnet_style_qualification_for_property = false:warning 79 | dotnet_style_qualification_for_method = false:warning 80 | dotnet_style_qualification_for_event = false:warning 81 | # Language keywords instead of framework type names for type references 82 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#language-keywords 83 | dotnet_style_predefined_type_for_locals_parameters_members = true:warning 84 | dotnet_style_predefined_type_for_member_access = true:warning 85 | # Modifier preferences 86 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers 87 | dotnet_style_require_accessibility_modifiers = always:warning 88 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async 89 | visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async 90 | dotnet_style_readonly_field = true:warning 91 | # Parentheses preferences 92 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences 93 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning 94 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning 95 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning 96 | dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion 97 | # Expression-level preferences 98 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences 99 | dotnet_style_object_initializer = true:warning 100 | dotnet_style_collection_initializer = true:warning 101 | dotnet_style_explicit_tuple_names = true:warning 102 | dotnet_style_prefer_inferred_tuple_names = true:warning 103 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning 104 | dotnet_style_prefer_auto_properties = true:warning 105 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning 106 | dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion 107 | dotnet_style_prefer_conditional_expression_over_return = false:suggestion 108 | dotnet_style_prefer_compound_assignment = true:warning 109 | # Null-checking preferences 110 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences 111 | dotnet_style_coalesce_expression = true:warning 112 | dotnet_style_null_propagation = true:warning 113 | # Parameter preferences 114 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#parameter-preferences 115 | dotnet_code_quality_unused_parameters = all:warning 116 | # More style options (Undocumented) 117 | # https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641 118 | dotnet_style_operator_placement_when_wrapping = end_of_line 119 | 120 | # C# Code Style Settings 121 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings 122 | [*.{cs,csx,cake}] 123 | # Implicit and explicit types 124 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types 125 | csharp_style_var_for_built_in_types = true:warning 126 | csharp_style_var_when_type_is_apparent = true:warning 127 | csharp_style_var_elsewhere = true:warning 128 | # Expression-bodied members 129 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members 130 | csharp_style_expression_bodied_methods = true:warning 131 | csharp_style_expression_bodied_constructors = true:warning 132 | csharp_style_expression_bodied_operators = true:warning 133 | csharp_style_expression_bodied_properties = true:warning 134 | csharp_style_expression_bodied_indexers = true:warning 135 | csharp_style_expression_bodied_accessors = true:warning 136 | csharp_style_expression_bodied_lambdas = true:warning 137 | csharp_style_expression_bodied_local_functions = true:warning 138 | # Pattern matching 139 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#pattern-matching 140 | csharp_style_pattern_matching_over_is_with_cast_check = true:warning 141 | csharp_style_pattern_matching_over_as_with_null_check = true:warning 142 | # Inlined variable declarations 143 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations 144 | csharp_style_inlined_variable_declaration = true:warning 145 | # Expression-level preferences 146 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences 147 | csharp_prefer_simple_default_expression = true:warning 148 | # "Null" checking preferences 149 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences 150 | csharp_style_throw_expression = true:warning 151 | csharp_style_conditional_delegate_call = true:warning 152 | # Code block preferences 153 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#code-block-preferences 154 | csharp_prefer_braces = true:warning 155 | # Unused value preferences 156 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences 157 | csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion 158 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 159 | # Index and range preferences 160 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences 161 | csharp_style_prefer_index_operator = true:warning 162 | csharp_style_prefer_range_operator = true:warning 163 | # Miscellaneous preferences 164 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences 165 | csharp_style_deconstructed_variable_declaration = true:warning 166 | csharp_style_pattern_local_over_anonymous_function = true:warning 167 | csharp_using_directive_placement = inside_namespace:warning 168 | csharp_prefer_static_local_function = true:warning 169 | csharp_prefer_simple_using_statement = false:warning 170 | 171 | ########################################## 172 | # .NET Formatting Conventions 173 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions 174 | ########################################## 175 | 176 | # Organize usings 177 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions#organize-using-directives 178 | dotnet_sort_system_directives_first = true 179 | # Newline options 180 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions#new-line-options 181 | csharp_new_line_before_open_brace = all 182 | csharp_new_line_before_else = true 183 | csharp_new_line_before_catch = true 184 | csharp_new_line_before_finally = true 185 | csharp_new_line_before_members_in_object_initializers = true 186 | csharp_new_line_before_members_in_anonymous_types = true 187 | csharp_new_line_between_query_expression_clauses = true 188 | # Indentation options 189 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions#indentation-options 190 | csharp_indent_case_contents = true 191 | csharp_indent_switch_labels = true 192 | csharp_indent_labels = no_change 193 | csharp_indent_block_contents = true 194 | csharp_indent_braces = false 195 | csharp_indent_case_contents_when_block = false 196 | # Spacing options 197 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions#spacing-options 198 | csharp_space_after_cast = false 199 | csharp_space_after_keywords_in_control_flow_statements = true 200 | csharp_space_between_parentheses = false 201 | csharp_space_before_colon_in_inheritance_clause = true 202 | csharp_space_after_colon_in_inheritance_clause = true 203 | csharp_space_around_binary_operators = before_and_after 204 | csharp_space_between_method_declaration_parameter_list_parentheses = false 205 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 206 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 207 | csharp_space_between_method_call_parameter_list_parentheses = false 208 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 209 | csharp_space_between_method_call_name_and_opening_parenthesis = false 210 | csharp_space_after_comma = true 211 | csharp_space_before_comma = false 212 | csharp_space_after_dot = false 213 | csharp_space_before_dot = false 214 | csharp_space_after_semicolon_in_for_statement = true 215 | csharp_space_before_semicolon_in_for_statement = false 216 | csharp_space_around_declaration_statements = false 217 | csharp_space_before_open_square_brackets = false 218 | csharp_space_between_empty_square_brackets = false 219 | csharp_space_between_square_brackets = false 220 | # Wrapping options 221 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions#wrap-options 222 | csharp_preserve_single_line_statements = false 223 | csharp_preserve_single_line_blocks = true 224 | 225 | ########################################## 226 | # .NET Naming Conventions 227 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions 228 | ########################################## 229 | 230 | [*.{cs,csx,cake,vb}] 231 | 232 | ########################################## 233 | # Styles 234 | ########################################## 235 | 236 | # camel_case_style - Define the camelCase style 237 | dotnet_naming_style.camel_case_style.capitalization = camel_case 238 | # pascal_case_style - Define the Pascal_case style 239 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case 240 | # first_upper_style - The first character must start with an upper-case character 241 | dotnet_naming_style.first_upper_style.capitalization = first_word_upper 242 | # prefix_interface_with_i_style - Interfaces must be PascalCase and the first character of an interface must be an 'I' 243 | dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case 244 | dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I 245 | # prefix_type_parameters_with_t_style - Generic Type Parameters must be PascalCase and the first character must be a 'T' 246 | dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_case 247 | dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T 248 | # disallowed_style - Anything that has this style applied is marked as disallowed 249 | dotnet_naming_style.disallowed_style.capitalization = pascal_case 250 | dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____ 251 | dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____ 252 | # internal_error_style - This style should never occur... if it does, it's indicates a bug in file or in the parser using the file 253 | dotnet_naming_style.internal_error_style.capitalization = pascal_case 254 | dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____ 255 | dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR____ 256 | 257 | ########################################## 258 | # .NET Design Guideline Field Naming Rules 259 | # Naming rules for fields follow the .NET Framework design guidelines 260 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/index 261 | ########################################## 262 | 263 | # All public/protected/protected_internal constant fields must be PascalCase 264 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/field 265 | dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal 266 | dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const 267 | dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field 268 | dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group 269 | dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.style = pascal_case_style 270 | dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.severity = warning 271 | 272 | # All public/protected/protected_internal static readonly fields must be PascalCase 273 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/field 274 | dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_accessibilities = public, protected, protected_internal 275 | dotnet_naming_symbols.public_protected_static_readonly_fields_group.required_modifiers = static, readonly 276 | dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_kinds = field 277 | dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.symbols = public_protected_static_readonly_fields_group 278 | dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style 279 | dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.severity = warning 280 | 281 | # No other public/protected/protected_internal fields are allowed 282 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/field 283 | dotnet_naming_symbols.other_public_protected_fields_group.applicable_accessibilities = public, protected, protected_internal 284 | dotnet_naming_symbols.other_public_protected_fields_group.applicable_kinds = field 285 | dotnet_naming_rule.other_public_protected_fields_disallowed_rule.symbols = other_public_protected_fields_group 286 | dotnet_naming_rule.other_public_protected_fields_disallowed_rule.style = disallowed_style 287 | dotnet_naming_rule.other_public_protected_fields_disallowed_rule.severity = error 288 | 289 | ########################################## 290 | # StyleCop Field Naming Rules 291 | # Naming rules for fields follow the StyleCop analyzers 292 | # This does not override any rules using disallowed_style above 293 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers 294 | ########################################## 295 | 296 | # All constant fields must be PascalCase 297 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md 298 | dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private 299 | dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const 300 | dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field 301 | dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group 302 | dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style 303 | dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.severity = warning 304 | 305 | # All static readonly fields must be PascalCase 306 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md 307 | dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private 308 | dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly 309 | dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field 310 | dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group 311 | dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style 312 | dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.severity = warning 313 | 314 | # No non-private instance fields are allowed 315 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md 316 | dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected 317 | dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field 318 | dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group 319 | dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style 320 | dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.severity = error 321 | 322 | # Private fields must be camelCase 323 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1306.md 324 | dotnet_naming_symbols.stylecop_private_fields_group.applicable_accessibilities = private 325 | dotnet_naming_symbols.stylecop_private_fields_group.applicable_kinds = field 326 | dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.symbols = stylecop_private_fields_group 327 | dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.style = camel_case_style 328 | dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.severity = warning 329 | 330 | # Local variables must be camelCase 331 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md 332 | dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local 333 | dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local 334 | dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group 335 | dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style 336 | dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.severity = silent 337 | 338 | # This rule should never fire. However, it's included for at least two purposes: 339 | # First, it helps to understand, reason about, and root-case certain types of issues, such as bugs in .editorconfig parsers. 340 | # Second, it helps to raise immediate awareness if a new field type is added (as occurred recently in C#). 341 | dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_accessibilities = * 342 | dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_kinds = field 343 | dotnet_naming_rule.sanity_check_uncovered_field_case_rule.symbols = sanity_check_uncovered_field_case_group 344 | dotnet_naming_rule.sanity_check_uncovered_field_case_rule.style = internal_error_style 345 | dotnet_naming_rule.sanity_check_uncovered_field_case_rule.severity = error 346 | 347 | 348 | ########################################## 349 | # Other Naming Rules 350 | ########################################## 351 | 352 | # All of the following must be PascalCase: 353 | # - Namespaces 354 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces 355 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md 356 | # - Classes and Enumerations 357 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces 358 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md 359 | # - Delegates 360 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces#names-of-common-types 361 | # - Constructors, Properties, Events, Methods 362 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-type-members 363 | dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property 364 | dotnet_naming_rule.element_rule.symbols = element_group 365 | dotnet_naming_rule.element_rule.style = pascal_case_style 366 | dotnet_naming_rule.element_rule.severity = warning 367 | 368 | # Interfaces use PascalCase and are prefixed with uppercase 'I' 369 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces 370 | dotnet_naming_symbols.interface_group.applicable_kinds = interface 371 | dotnet_naming_rule.interface_rule.symbols = interface_group 372 | dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style 373 | dotnet_naming_rule.interface_rule.severity = warning 374 | 375 | # Generics Type Parameters use PascalCase and are prefixed with uppercase 'T' 376 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces 377 | dotnet_naming_symbols.type_parameter_group.applicable_kinds = type_parameter 378 | dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_group 379 | dotnet_naming_rule.type_parameter_rule.style = prefix_type_parameters_with_t_style 380 | dotnet_naming_rule.type_parameter_rule.severity = warning 381 | 382 | # Function parameters use camelCase 383 | # https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-parameters 384 | dotnet_naming_symbols.parameters_group.applicable_kinds = parameter 385 | dotnet_naming_rule.parameters_rule.symbols = parameters_group 386 | dotnet_naming_rule.parameters_rule.style = camel_case_style 387 | dotnet_naming_rule.parameters_rule.severity = warning 388 | 389 | ########################################## 390 | # License 391 | ########################################## 392 | # The following applies as to the .editorconfig file ONLY, and is 393 | # included below for reference, per the requirements of the license 394 | # corresponding to this .editorconfig file. 395 | # See: https://github.com/RehanSaeed/EditorConfig 396 | # 397 | # MIT License 398 | # 399 | # Copyright (c) 2017-2019 Muhammad Rehan Saeed 400 | # Copyright (c) 2019 Henry Gabryjelski 401 | # 402 | # Permission is hereby granted, free of charge, to any 403 | # person obtaining a copy of this software and associated 404 | # documentation files (the "Software"), to deal in the 405 | # Software without restriction, including without limitation 406 | # the rights to use, copy, modify, merge, publish, distribute, 407 | # sublicense, and/or sell copies of the Software, and to permit 408 | # persons to whom the Software is furnished to do so, subject 409 | # to the following conditions: 410 | # 411 | # The above copyright notice and this permission notice shall be 412 | # included in all copies or substantial portions of the Software. 413 | # 414 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 415 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 416 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 417 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 418 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 419 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 420 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 421 | # OTHER DEALINGS IN THE SOFTWARE. 422 | ########################################## 423 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################### 2 | # Git Line Endings # 3 | ############################### 4 | 5 | # Set default behavior to automatically normalize line endings. 6 | * text=auto 7 | 8 | # Force bash scripts to always use lf line endings so that if a repo is accessed 9 | # in Unix via a file share from Windows, the scripts will work. 10 | *.sh text eol=lf 11 | 12 | ############################### 13 | # Git Large File System (LFS) # 14 | ############################### 15 | 16 | # Archives 17 | *.7z filter=lfs diff=lfs merge=lfs -text 18 | *.br filter=lfs diff=lfs merge=lfs -text 19 | *.gz filter=lfs diff=lfs merge=lfs -text 20 | *.tar filter=lfs diff=lfs merge=lfs -text 21 | *.zip filter=lfs diff=lfs merge=lfs -text 22 | 23 | # Documents 24 | *.pdf filter=lfs diff=lfs merge=lfs -text 25 | 26 | # Images 27 | *.gif filter=lfs diff=lfs merge=lfs -text 28 | *.ico filter=lfs diff=lfs merge=lfs -text 29 | *.jpg filter=lfs diff=lfs merge=lfs -text 30 | *.pdf filter=lfs diff=lfs merge=lfs -text 31 | *.png filter=lfs diff=lfs merge=lfs -text 32 | *.psd filter=lfs diff=lfs merge=lfs -text 33 | *.webp filter=lfs diff=lfs merge=lfs -text 34 | 35 | # Fonts 36 | *.woff2 filter=lfs diff=lfs merge=lfs -text 37 | 38 | # Other 39 | *.exe filter=lfs diff=lfs merge=lfs -text 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | 33 | # Visual Studio 2015/2017 cache/options directory 34 | .vs/ 35 | # Uncomment if you have tasks that create the project's static files in wwwroot 36 | #wwwroot/ 37 | 38 | # Visual Studio 2017 auto generated files 39 | Generated\ Files/ 40 | 41 | # MSTest test Results 42 | [Tt]est[Rr]esult*/ 43 | [Bb]uild[Ll]og.* 44 | 45 | # NUnit 46 | *.VisualState.xml 47 | TestResult.xml 48 | nunit-*.xml 49 | 50 | # Build Results of an ATL Project 51 | [Dd]ebugPS/ 52 | [Rr]eleasePS/ 53 | dlldata.c 54 | 55 | # Benchmark Results 56 | BenchmarkDotNet.Artifacts/ 57 | 58 | # .NET Core 59 | project.lock.json 60 | project.fragment.lock.json 61 | artifacts/ 62 | 63 | # StyleCop 64 | StyleCopReport.xml 65 | 66 | # Files built by Visual Studio 67 | *_i.c 68 | *_p.c 69 | *_h.h 70 | *.ilk 71 | *.meta 72 | *.obj 73 | *.iobj 74 | *.pch 75 | *.pdb 76 | *.ipdb 77 | *.pgc 78 | *.pgd 79 | *.rsp 80 | *.sbr 81 | *.tlb 82 | *.tli 83 | *.tlh 84 | *.tmp 85 | *.tmp_proj 86 | *_wpftmp.csproj 87 | *.log 88 | *.vspscc 89 | *.vssscc 90 | .builds 91 | *.pidb 92 | *.svclog 93 | *.scc 94 | 95 | # Chutzpah Test files 96 | _Chutzpah* 97 | 98 | # Visual C++ cache files 99 | ipch/ 100 | *.aps 101 | *.ncb 102 | *.opendb 103 | *.opensdf 104 | *.sdf 105 | *.cachefile 106 | *.VC.db 107 | *.VC.VC.opendb 108 | 109 | # Visual Studio profiler 110 | *.psess 111 | *.vsp 112 | *.vspx 113 | *.sap 114 | 115 | # Visual Studio Trace Files 116 | *.e2e 117 | 118 | # TFS 2012 Local Workspace 119 | $tf/ 120 | 121 | # Guidance Automation Toolkit 122 | *.gpState 123 | 124 | # ReSharper is a .NET coding add-in 125 | _ReSharper*/ 126 | *.[Rr]e[Ss]harper 127 | *.DotSettings.user 128 | 129 | # JustCode is a .NET coding add-in 130 | .JustCode 131 | 132 | # TeamCity is a build add-in 133 | _TeamCity* 134 | 135 | # DotCover is a Code Coverage Tool 136 | *.dotCover 137 | 138 | # AxoCover is a Code Coverage Tool 139 | .axoCover/* 140 | !.axoCover/settings.json 141 | 142 | # Visual Studio code coverage results 143 | *.coverage 144 | *.coveragexml 145 | 146 | # NCrunch 147 | _NCrunch_* 148 | .*crunch*.local.xml 149 | nCrunchTemp_* 150 | 151 | # MightyMoose 152 | *.mm.* 153 | AutoTest.Net/ 154 | 155 | # Web workbench (sass) 156 | .sass-cache/ 157 | 158 | # Installshield output folder 159 | [Ee]xpress/ 160 | 161 | # DocProject is a documentation generator add-in 162 | DocProject/buildhelp/ 163 | DocProject/Help/*.HxT 164 | DocProject/Help/*.HxC 165 | DocProject/Help/*.hhc 166 | DocProject/Help/*.hhk 167 | DocProject/Help/*.hhp 168 | DocProject/Help/Html2 169 | DocProject/Help/html 170 | 171 | # Click-Once directory 172 | publish/ 173 | 174 | # Publish Web Output 175 | *.[Pp]ublish.xml 176 | *.azurePubxml 177 | # Note: Comment the next line if you want to checkin your web deploy settings, 178 | # but database connection strings (with potential passwords) will be unencrypted 179 | *.pubxml 180 | *.publishproj 181 | 182 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 183 | # checkin your Azure Web App publish settings, but sensitive information contained 184 | # in these scripts will be unencrypted 185 | PublishScripts/ 186 | 187 | # NuGet Packages 188 | *.nupkg 189 | # NuGet Symbol Packages 190 | *.snupkg 191 | # The packages folder can be ignored because of Package Restore 192 | **/[Pp]ackages/* 193 | # except build/, which is used as an MSBuild target. 194 | !**/[Pp]ackages/build/ 195 | # Uncomment if necessary however generally it will be regenerated when needed 196 | #!**/[Pp]ackages/repositories.config 197 | # NuGet v3's project.json files produces more ignorable files 198 | *.nuget.props 199 | *.nuget.targets 200 | 201 | # Microsoft Azure Build Output 202 | csx/ 203 | *.build.csdef 204 | 205 | # Microsoft Azure Emulator 206 | ecf/ 207 | rcf/ 208 | 209 | # Windows Store app package directories and files 210 | AppPackages/ 211 | BundleArtifacts/ 212 | Package.StoreAssociation.xml 213 | _pkginfo.txt 214 | *.appx 215 | *.appxbundle 216 | *.appxupload 217 | 218 | # Visual Studio cache files 219 | # files ending in .cache can be ignored 220 | *.[Cc]ache 221 | # but keep track of directories ending in .cache 222 | !?*.[Cc]ache/ 223 | 224 | # Others 225 | ClientBin/ 226 | ~$* 227 | *~ 228 | *.dbmdl 229 | *.dbproj.schemaview 230 | *.jfm 231 | *.pfx 232 | *.publishsettings 233 | orleans.codegen.cs 234 | 235 | # Including strong name files can present a security risk 236 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 237 | #*.snk 238 | 239 | # Since there are multiple workflows, uncomment next line to ignore bower_components 240 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 241 | #bower_components/ 242 | 243 | # RIA/Silverlight projects 244 | Generated_Code/ 245 | 246 | # Backup & report files from converting an old project file 247 | # to a newer Visual Studio version. Backup files are not needed, 248 | # because we have git ;-) 249 | _UpgradeReport_Files/ 250 | Backup*/ 251 | UpgradeLog*.XML 252 | UpgradeLog*.htm 253 | ServiceFabricBackup/ 254 | *.rptproj.bak 255 | 256 | # SQL Server files 257 | *.mdf 258 | *.ldf 259 | *.ndf 260 | 261 | # Business Intelligence projects 262 | *.rdl.data 263 | *.bim.layout 264 | *.bim_*.settings 265 | *.rptproj.rsuser 266 | *- [Bb]ackup.rdl 267 | *- [Bb]ackup ([0-9]).rdl 268 | *- [Bb]ackup ([0-9][0-9]).rdl 269 | 270 | # Microsoft Fakes 271 | FakesAssemblies/ 272 | 273 | # GhostDoc plugin setting file 274 | *.GhostDoc.xml 275 | 276 | # Node.js Tools for Visual Studio 277 | .ntvs_analysis.dat 278 | node_modules/ 279 | 280 | # Visual Studio 6 build log 281 | *.plg 282 | 283 | # Visual Studio 6 workspace options file 284 | *.opt 285 | 286 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 287 | *.vbw 288 | 289 | # Visual Studio LightSwitch build output 290 | **/*.HTMLClient/GeneratedArtifacts 291 | **/*.DesktopClient/GeneratedArtifacts 292 | **/*.DesktopClient/ModelManifest.xml 293 | **/*.Server/GeneratedArtifacts 294 | **/*.Server/ModelManifest.xml 295 | _Pvt_Extensions 296 | 297 | # Paket dependency manager 298 | .paket/paket.exe 299 | paket-files/ 300 | 301 | # FAKE - F# Make 302 | .fake/ 303 | 304 | # CodeRush personal settings 305 | .cr/personal 306 | 307 | # Python Tools for Visual Studio (PTVS) 308 | __pycache__/ 309 | *.pyc 310 | 311 | # Cake - Uncomment if you are using it 312 | # tools/** 313 | # !tools/packages.config 314 | 315 | # Tabs Studio 316 | *.tss 317 | 318 | # Telerik's JustMock configuration file 319 | *.jmconfig 320 | 321 | # BizTalk build output 322 | *.btp.cs 323 | *.btm.cs 324 | *.odx.cs 325 | *.xsd.cs 326 | 327 | # OpenCover UI analysis results 328 | OpenCover/ 329 | 330 | # Azure Stream Analytics local run output 331 | ASALocalRun/ 332 | 333 | # MSBuild Binary and Structured Log 334 | *.binlog 335 | 336 | # NVidia Nsight GPU debugger configuration file 337 | *.nvuser 338 | 339 | # MFractors (Xamarin productivity tool) working folder 340 | .mfractor/ 341 | 342 | # Local History for Visual Studio 343 | .localhistory/ 344 | 345 | # BeatPulse healthcheck temp database 346 | healthchecksdb 347 | 348 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 349 | MigrationBackup/ 350 | 351 | # Ionide (cross platform F# VS Code tools) working folder 352 | .ionide/ 353 | 354 | # rider 355 | .idea/ 356 | 357 | # Dependency directories 358 | node_modules/ 359 | 360 | # Cake 361 | tools/ 362 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # [2.7.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.6.0...v2.7.0) (2020-06-13) 2 | 3 | 4 | ### Features 5 | 6 | * Add character 'Mara Jade' ([c1e02af](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/c1e02af6e66a42b8f078abbaf056419042be956b)) 7 | 8 | # [2.6.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.5.0...v2.6.0) (2020-06-13) 9 | 10 | 11 | ### Features 12 | 13 | * Add character 'Baby Yoda' ([8b8fe35](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/8b8fe3502444a5fa3c4cb79ef1a0dd339bb72110)) 14 | 15 | # [2.5.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.4.0...v2.5.0) (2019-12-22) 16 | 17 | 18 | ### Features 19 | 20 | * Add character 'Baby Yoda' ([d3ef3ac](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/d3ef3ac40bb1efccbf0bd42af4f71f5f9e43d6b9)) 21 | 22 | # [2.4.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.3.0...v2.4.0) (2019-10-02) 23 | 24 | 25 | ### Features 26 | 27 | * Use .NET Core SDK 3.0 allowing running cake as a local tool ([098d904](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/098d904)) 28 | 29 | # [2.3.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.2.0...v2.3.0) (2019-08-30) 30 | 31 | 32 | ### Features 33 | 34 | * Add symbol packages ([e7fa295](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/e7fa295)) 35 | 36 | # [2.2.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.1.0...v2.2.0) (2018-12-17) 37 | 38 | 39 | ### Features 40 | 41 | * Add character 'Sio Bibble' ([cae725b](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/cae725b)) 42 | 43 | # [2.1.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.0.1...v2.1.0) (2018-12-17) 44 | 45 | 46 | ### Features 47 | 48 | * Add character 'Hardcase' ([5c337fc](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/5c337fc)) 49 | 50 | ## [2.0.1](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v2.0.0...v2.0.1) (2018-12-16) 51 | 52 | 53 | ### Bug Fixes 54 | 55 | * The 'licenseUrl' element will be deprecated ([45c15d5](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/45c15d5)) 56 | 57 | # [2.0.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v1.1.0...v2.0.0) (2018-10-15) 58 | 59 | 60 | ### Features 61 | 62 | * Add strong naming as per Microsoft's new guidance ([1e2b964](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/1e2b964)) 63 | 64 | 65 | ### BREAKING CHANGES 66 | 67 | * Adding strong naming is a breaking change. 68 | For more details on the changed guidance see 69 | https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming#create-strong-named-net-libraries 70 | 71 | # [1.1.0](https://github.com/michael-wolfenden/Reference.AzurePipelines/compare/v1.0.0...v1.1.0) (2018-09-26) 72 | 73 | 74 | ### Features 75 | 76 | * Add character '2-1B' ([7e9d14d](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/7e9d14d)) 77 | 78 | # 1.0.0 (2018-09-26) 79 | 80 | 81 | ### Features 82 | 83 | * Initial commit ([4b7e11c](https://github.com/michael-wolfenden/Reference.AzurePipelines/commit/4b7e11c)) 84 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | education, socio-economic status, nationality, personal appearance, race, 10 | religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at michael.wolfenden@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Michael Wolfenden 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reference.AzurePipelines 2 | 3 | [![Build Status](https://michaelwolfenden.visualstudio.com/Reference.AzurePipelines/_apis/build/status/Reference.AzurePipelines-CI?branchName=master)](https://michaelwolfenden.visualstudio.com/Reference.AzurePipelines/_build/latest?definitionId=4) 4 | [![nuget](https://img.shields.io/nuget/v/Reference.AzurePipelines.svg)](https://www.nuget.org/packages/Reference.AzurePipelines/) 5 | [![nuget downloads](https://img.shields.io/nuget/dt/Reference.AzurePipelines.svg)](https://www.nuget.org/packages/Reference.AzurePipelines/) 6 | [![github last commit](https://img.shields.io/github/last-commit/michael-wolfenden/Reference.AzurePipelines.svg)](https://github.com/michael-wolfenden/Reference.AzurePipelines) 7 | [![github license](https://img.shields.io/github/license/michael-wolfenden/Reference.AzurePipelines.svg)](https://github.com/michael-wolfenden/Reference.AzurePipelines/blob/master/LICENSE) 8 | [![Code of Conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg)](https://github.com/michael-wolfenden/Reference.AzurePipelines/blob/master/CODE_OF_CONDUCT.md) 9 | [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) 10 | [![dependabot](https://img.shields.io/badge/Dependabot-enabled-green.svg?logo=dependabot&style=flat)](https://dependabot.com/) 11 | 12 | NET Standard library reference implementation built via Azure Pipelines. 13 | 14 | ![Reference.AzurePipelines](assets/logo.png) 15 | 16 | ## Motivation 17 | 18 | To serve as a reference for building a NET Standard library with a [CI/CD](https://en.wikipedia.org/wiki/CI/CD) pipeline provided by [Azure Pipleines](https://azure.microsoft.com/en-au/services/devops/pipelines/). 19 | 20 | ### Features 21 | 22 | - [x] Automatic Versioning, [Publishing](https://github.com/michael-wolfenden/Reference.AzurePipelines/releases) and [Changelog](https://github.com/michael-wolfenden/Reference.AzurePipelines/blob/master/CHANGELOG.md) generation using [semantic-release](https://github.com/semantic-release/semantic-release) 23 | - [x] [Strong Naming](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming#create-strong-named-net-libraries) 24 | - [x] [SourceLink](https://github.com/dotnet/sourcelink/) support 25 | - [x] Performs Windows, Linux and macOS builds using [Azure Pipelines](https://azure.microsoft.com/en-au/services/devops/pipelines/) and [Cake](https://cakebuild.net/) 26 | - [x] Testing via [xUnit.net](https://xunit.github.io/) 27 | - [x] [EditorConfig](https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options) support 28 | - [x] Follows Microsoft's [open-source library guidance](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/) 29 | 30 | ## Access tokens 31 | 32 | `semantic-release` requires both a **GitHub** and **NuGet** authentication token to be made available via the `GITHUB_TOKEN` and `NUGET_TOKEN` environment variables 33 | 34 | ### GITHUB_TOKEN 35 | This token is used to authenticate with GitHub to read repository information, publish a GitHub release and upload files. 36 | 37 | Create a [new personal access token](https://github.com/settings/tokens/new) with following scopes: 38 | 39 | ![access token scopes](https://i.imgur.com/vWIB1iQ.png "access token scopes") 40 | 41 | ### NUGET_TOKEN 42 | This token is used to authenticate with NuGet to push packages. 43 | 44 | Create a [new api key](https://www.nuget.org/account/apikeys) with following scopes: 45 | 46 | ![api key scopes](https://i.imgur.com/0iNGQ6V.png "api key scopes") 47 | 48 | ### Using the tokens with Azure Pipelines 49 | 50 | Once you have both tokens, you can add `GITHUB_TOKEN` and `NUGET_TOKEN` as [secret Pipeline variables]( 51 | https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=vsts&tabs=yaml%2Cbatch#secret-variables) in your PipeLine's settings. They will automatically be decrypted in the `azure-pipelines.yml` script. 52 | 53 | ## Versioning 54 | 55 | We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/michael-wolfenden/Reference.AzurePipelines/tags). 56 | 57 | ## License 58 | 59 | This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/michael-wolfenden/Reference.AzurePipelines/blob/master/LICENSE.md) file for details 60 | 61 | ## Acknowledgments 62 | 63 | * This is a port of the [original project](https://github.com/kentcdodds/starwars-names) by [Kent C. Dodds](https://kentcdodds.com/) 64 | * Icons made by [Smashicons](https://www.flaticon.com/authors/smashicons) from [www.flaticon.com](https://www.flaticon.com) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/) 65 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wolfenden/Reference.AzurePipelines/6515030b8141b3e279112c8d06011b9aec35855d/assets/logo.png -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Perform linux, macos and windows builds in parallel and then trigger a release build on success 3 | # 4 | # NOTE: you must have the following variables set in your pipeline as secret variables 5 | # GITHUB_TOKEN 6 | # NUGET_TOKEN 7 | # 8 | # For details, see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=vsts&tabs=yaml%2Cbatch#secret-variables 9 | # ======================================================================== 10 | 11 | # Only trigger CI builds for the master branch, instead of on other branches or tags. 12 | # You'll automatically be configured to build PRs 13 | # For details, see https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers 14 | trigger: 15 | branches: 16 | include: 17 | - master 18 | exclude: 19 | - tags/* 20 | - refs/tags/* 21 | 22 | jobs: 23 | 24 | # =========================================================================================== 25 | # GetNextVersionNumber 26 | # =========================================================================================== 27 | # Run semantic-release in dry run mode, extract the next release version number and set the 28 | # nextVersionNumber variable for the following jobs to use. 29 | 30 | # NOTE: if semantic-release doesn't detect any changes requiring a release, the version will 31 | # be set to 0.0.0 32 | # =========================================================================================== 33 | - job: GetNextVersionNumber 34 | pool: 35 | vmImage: 'ubuntu-latest' 36 | steps: 37 | - bash: | 38 | set -Eeuo pipefail 39 | 40 | semanticReleaseOutput=$(npx \ 41 | --quiet \ 42 | -p semantic-release@17.0.8 \ 43 | -p @semantic-release/changelog@5.0.1 \ 44 | -p @semantic-release/git@9.0.0 \ 45 | -p @semantic-release/exec@5.0.0 \ 46 | semantic-release --dry-run) 47 | 48 | nextVersion=$(echo "$semanticReleaseOutput" \ 49 | | sed -n 's/.* The next release version is \(.*\)$/\1/gip') 50 | 51 | echo "$semanticReleaseOutput" 52 | 53 | if [ -z "$nextVersion" ] 54 | then 55 | echo "##vso[task.setvariable variable=nextVersionNumber;isOutput=true]0.0.0" 56 | else 57 | echo "The next release version is ${nextVersion}" 58 | echo "##vso[task.setvariable variable=nextVersionNumber;isOutput=true]$nextVersion" 59 | fi 60 | displayName: Run semantic release to get next version number 61 | name: SetNextVersionNumberVariable 62 | # Need to explicitly re-map these secret variables so they are decrypted 63 | env: 64 | GITHUB_TOKEN: $(GITHUB_TOKEN) 65 | NUGET_TOKEN: $(NUGET_TOKEN) 66 | 67 | # =========================================================================================== 68 | # Build 69 | # =========================================================================================== 70 | # Run the linux, macOS and windows builds 71 | # =========================================================================================== 72 | - job: Build 73 | dependsOn: GetNextVersionNumber 74 | 75 | strategy: 76 | maxParallel: 3 77 | matrix: 78 | Linux: 79 | imageName: 'ubuntu-latest' 80 | name: 'ubuntu' 81 | macOS: 82 | imageName: 'macOS-latest' 83 | name: 'macOS' 84 | Windows: 85 | imageName: 'windows-latest' 86 | name: 'windows' 87 | 88 | pool: 89 | vmImage: $(imageName) 90 | 91 | variables: 92 | nextVersionNumber: $[ dependencies.GetNextVersionNumber.outputs['SetNextVersionNumberVariable.nextVersionNumber'] ] 93 | 94 | steps: 95 | # Install .NET Core 3.0 96 | - task: UseDotNet@2 97 | displayName: 'Use dotnet sdk 3.x' 98 | inputs: 99 | version: 3.x 100 | 101 | # Build and run tests via Cake. 102 | # The produced nuget package and test results will be output to the artifacts folder 103 | - script: | 104 | dotnet tool restore 105 | dotnet cake --versionNumber=$(nextVersionNumber) 106 | displayName: 'Cake 🍰 - Build & Test' 107 | env: 108 | # Don’t send any telemetry data. 109 | DOTNET_CLI_TELEMETRY_OPTOUT: true 110 | # This will prevent the CLI from pre-populating the packages cache. 111 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true 112 | 113 | # Publish the test results produced by the build so they are visible in the tests tab 114 | - task: PublishTestResults@2 115 | displayName: 'Publish test results' 116 | inputs: 117 | testRunner: VSTest 118 | testResultsFiles: '**/*.trx' 119 | testRunTitle: '$(name) Test Run' 120 | 121 | # Store the built nuget and symbol package so they can be downloaded by the 'Release' job 122 | - task: PublishBuildArtifacts@1 123 | displayName: 'Publish artifacts' 124 | inputs: 125 | pathtoPublish: './artifacts' 126 | artifactName: '$(name)-artifacts' 127 | 128 | # =========================================================================================== 129 | # Release 130 | # =========================================================================================== 131 | # Run semantic-release to trigger a release (Publish to nuget, create a release on github, 132 | # update the CHANGELOG) BUT only if semantic-release detects any changes since the last release 133 | # =========================================================================================== 134 | - job: Release 135 | dependsOn: Build 136 | 137 | pool: 138 | vmImage: 'ubuntu-latest' 139 | 140 | steps: 141 | # Download the stored nuget and symbol package 142 | - task: DownloadBuildArtifacts@0 143 | displayName: 'Download artifacts' 144 | inputs: 145 | artifactName: 'ubuntu-artifacts' 146 | buildType: 'current' 147 | downloadType: 'single' 148 | downloadPath: './' 149 | 150 | # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739 151 | - task: CopyFiles@2 152 | displayName: Copy artifacts to root folder without artifact name 153 | inputs: 154 | sourceFolder: ./ubuntu-artifacts 155 | targetFolder: ./ 156 | 157 | # Run semantic-release to trigger a release 158 | - bash: | 159 | set -Eeuo pipefail 160 | 161 | npx --quiet \ 162 | -p semantic-release@17.0.8 \ 163 | -p @semantic-release/changelog@5.0.1 \ 164 | -p @semantic-release/git@9.0.0 \ 165 | -p @semantic-release/exec@5.0.0 \ 166 | semantic-release 167 | displayName: Run semantic release to release if relevant changes 168 | # Need to explicitly re-map these secret variables so they are decrypted 169 | env: 170 | GITHUB_TOKEN: $(GITHUB_TOKEN) 171 | NUGET_TOKEN: $(NUGET_TOKEN) 172 | -------------------------------------------------------------------------------- /build.cake: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // ARGUMENTS 3 | /////////////////////////////////////////////////////////////////////////////// 4 | 5 | var target = Argument("target", "Default"); 6 | var configuration = Argument("configuration", "Release"); 7 | var versionNumber = Argument("versionNumber", "0.0.0"); 8 | 9 | /////////////////////////////////////////////////////////////////////////////// 10 | // VARIABLES 11 | /////////////////////////////////////////////////////////////////////////////// 12 | 13 | var solution = GetFiles("./src/*.sln").First(); 14 | var artifactsDir = Directory("./artifacts"); 15 | 16 | /////////////////////////////////////////////////////////////////////////////// 17 | // SETUP / TEARDOWN 18 | /////////////////////////////////////////////////////////////////////////////// 19 | 20 | Setup(_ => 21 | { 22 | Information("Target {0}", target); 23 | Information("Target {0}", target); 24 | Information("Configuration {0}", configuration); 25 | Information("Version {0}", versionNumber); 26 | }); 27 | 28 | Teardown(_ => 29 | { 30 | Information("Finished running tasks"); 31 | }); 32 | 33 | ////////////////////////////////////////////////////////////////////// 34 | // TASKS 35 | ////////////////////////////////////////////////////////////////////// 36 | 37 | Task("Default") 38 | .IsDependentOn("Build") 39 | ; 40 | 41 | Task("Build") 42 | .IsDependentOn("Run_dotnet_info") 43 | .IsDependentOn("Clean") 44 | .IsDependentOn("Build_solution") 45 | .IsDependentOn("Run_tests") 46 | .IsDependentOn("Package") 47 | ; 48 | 49 | Task("Run_dotnet_info") 50 | .Does(() => 51 | { 52 | Information("dotnet --info"); 53 | StartProcess("dotnet", new ProcessSettings { Arguments = "--info" }); 54 | }); 55 | 56 | Task("Clean") 57 | .Does(_ => 58 | { 59 | Information("Cleaning {0}, bin and obj folders", artifactsDir); 60 | 61 | CleanDirectory(artifactsDir); 62 | CleanDirectories("./src/**/bin"); 63 | CleanDirectories("./src/**/obj"); 64 | }); 65 | 66 | Task("Build_solution") 67 | .Does(_ => 68 | { 69 | Information("Building solution {0} v{1}", solution.GetFilenameWithoutExtension(), versionNumber); 70 | 71 | DotNetCoreBuild(solution.FullPath, new DotNetCoreBuildSettings() 72 | { 73 | Configuration = configuration, 74 | MSBuildSettings = new DotNetCoreMSBuildSettings() 75 | .SetVersion(versionNumber) 76 | .SetFileVersion(versionNumber) 77 | // Only including a major version in the AssemblyVersion to reduce binding redirects 78 | // https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning#assembly-version 79 | .WithProperty("AssemblyVersion", $"{Version.Parse(versionNumber).Major}.0.0") 80 | // 0 = use as many processes as there are available CPUs to build the project 81 | // see: https://develop.cakebuild.net/api/Cake.Common.Tools.MSBuild/MSBuildSettings/60E763EA 82 | .SetMaxCpuCount(0) 83 | }); 84 | }); 85 | 86 | Task("Run_tests") 87 | .Does(_ => 88 | { 89 | Information("Testing solution {0}", solution.GetFilenameWithoutExtension()); 90 | 91 | DotNetCoreTest(solution.FullPath, new DotNetCoreTestSettings 92 | { 93 | Configuration = configuration, 94 | ResultsDirectory = artifactsDir, 95 | Logger = "trx", 96 | NoBuild = true, 97 | NoRestore = true 98 | }); 99 | }); 100 | 101 | Task("Package") 102 | .Does(_ => 103 | { 104 | Information("Packaging solution {0}", solution.GetFilenameWithoutExtension()); 105 | 106 | DotNetCorePack(solution.FullPath, new DotNetCorePackSettings { 107 | Configuration = configuration, 108 | OutputDirectory = artifactsDir, 109 | NoBuild = true, 110 | NoRestore = true, 111 | MSBuildSettings = new DotNetCoreMSBuildSettings() 112 | .SetVersion(versionNumber) 113 | }); 114 | }); 115 | 116 | /////////////////////////////////////////////////////////////////////////////// 117 | // EXECUTION 118 | /////////////////////////////////////////////////////////////////////////////// 119 | 120 | RunTarget(target); 121 | -------------------------------------------------------------------------------- /release.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verifyConditions: [ 3 | () => { 4 | if (process.env.NUGET_TOKEN == null || process.env.NUGET_TOKEN === '$(NUGET_TOKEN)') 5 | throw new Error('The environment variable NUGET_TOKEN is required.') 6 | }, 7 | '@semantic-release/changelog', 8 | '@semantic-release/git', 9 | '@semantic-release/github', 10 | ], 11 | prepare: [ 12 | '@semantic-release/changelog', 13 | { 14 | path: '@semantic-release/git', 15 | message: 16 | 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', 17 | }, 18 | ], 19 | publish: [ 20 | { 21 | path: '@semantic-release/github', 22 | assets: '*.*nupkg', 23 | }, 24 | { 25 | path: '@semantic-release/exec', 26 | cmd: `dotnet nuget push *.nupkg -k ${process.env.NUGET_TOKEN} -s https://api.nuget.org/v3/index.json`, 27 | }, 28 | ], 29 | } 30 | 31 | /* 32 | HACK: We should really be importing the semantic-release error package as below: 33 | const SemanticReleaseError = require('@semantic-release/error'); 34 | and using that, however the import was failing when running semantic-release using npx 35 | even when adding the @semantic-release/error package to npx. 36 | 37 | Resorting to copying the source into this file instead 38 | */ 39 | class SemanticReleaseError extends Error { 40 | constructor(message, code) { 41 | super(message) 42 | Error.captureStackTrace(this, this.constructor) 43 | this.name = 'SemanticReleaseError' 44 | this.code = code 45 | this.semanticRelease = true 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | latest 6 | 7 | -------------------------------------------------------------------------------- /src/Reference.AzurePipelines.Tests/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage( 2 | "Style", 3 | "IDE1006:Naming Styles", 4 | Justification = "Tests have a different naming convention" 5 | )] -------------------------------------------------------------------------------- /src/Reference.AzurePipelines.Tests/Reference.AzurePipelines.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | false 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | all 14 | runtime; build; native; contentfiles; analyzers 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/Reference.AzurePipelines.Tests/StarWarsNamesSpecs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using FluentAssertions; 4 | using Xunit; 5 | 6 | namespace StarWars.Names.Tests 7 | { 8 | public class star_wars_names 9 | { 10 | [Fact] 11 | public void must_contain_luke_skywalker() => 12 | new StarWarsNames().All().Should().Contain("Luke Skywalker"); 13 | 14 | [Fact] 15 | public void disallows_retrieving_less_than_one_random_character() 16 | { 17 | Action retreivingLessThanOneRandomCharacter = () => new StarWarsNames().Random(0); 18 | 19 | retreivingLessThanOneRandomCharacter 20 | .Should() 21 | .Throw() 22 | .WithMessage($"numberOfCharacters must be between 1 and {TotalNumberOfCharacters()} inclusive.*") 23 | .And.ParamName.Should().Be("numberOfCharacters"); 24 | } 25 | 26 | [Fact] 27 | public void disallows_retrieving_more_random_characters_than_available() 28 | { 29 | Action retreivingMoreRandomCharactersThanContainedInAll = 30 | () => new StarWarsNames().Random(TotalNumberOfCharacters() + 1); 31 | 32 | retreivingMoreRandomCharactersThanContainedInAll 33 | .Should() 34 | .Throw() 35 | .WithMessage($"numberOfCharacters must be between 1 and {TotalNumberOfCharacters()} inclusive.*") 36 | .And.ParamName.Should().Be("numberOfCharacters"); 37 | } 38 | 39 | [Fact] 40 | public void must_return_one_of_the_characters_available_when_retrieving_a_random_character() => 41 | new StarWarsNames().Random().Should().BeOneOf(AllCharacters()); 42 | 43 | [Fact] 44 | public void must_return_the_number_of_characters_asked_for_when_retrieving_multiple_random_characters_() => 45 | new StarWarsNames().Random(3).Should().HaveCount(3); 46 | 47 | [Fact] 48 | public void must_return_distinct_characters_when_retrieving_multiple_random_characters() => 49 | new StarWarsNames().Random(TotalNumberOfCharacters()).Should().OnlyHaveUniqueItems(); 50 | 51 | private static IReadOnlyList AllCharacters() => new StarWarsNames().All(); 52 | private static int TotalNumberOfCharacters() => AllCharacters().Count; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Reference.AzurePipelines.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 15 3 | VisualStudioVersion = 15.0.26124.0 4 | MinimumVisualStudioVersion = 15.0.26124.0 5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reference.AzurePipelines", "Reference.AzurePipelines\Reference.AzurePipelines.csproj", "{2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}" 6 | EndProject 7 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reference.AzurePipelines.Tests", "Reference.AzurePipelines.Tests\Reference.AzurePipelines.Tests.csproj", "{961E61C6-7F6A-4769-9015-D67BE319A33E}" 8 | EndProject 9 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CAA997E0-069D-464A-97DA-8D749D6B6EAA}" 10 | ProjectSection(SolutionItems) = preProject 11 | ..\.editorconfig = ..\.editorconfig 12 | Directory.Build.props = Directory.Build.props 13 | EndProjectSection 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Debug|x64 = Debug|x64 19 | Debug|x86 = Debug|x86 20 | Release|Any CPU = Release|Any CPU 21 | Release|x64 = Release|x64 22 | Release|x86 = Release|x86 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Debug|x64.ActiveCfg = Debug|Any CPU 28 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Debug|x64.Build.0 = Debug|Any CPU 29 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Debug|x86.ActiveCfg = Debug|Any CPU 30 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Debug|x86.Build.0 = Debug|Any CPU 31 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Release|Any CPU.ActiveCfg = Release|Any CPU 32 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Release|Any CPU.Build.0 = Release|Any CPU 33 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Release|x64.ActiveCfg = Release|Any CPU 34 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Release|x64.Build.0 = Release|Any CPU 35 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Release|x86.ActiveCfg = Release|Any CPU 36 | {2F8FEBE6-954C-41E9-99BC-6E19F2FE12AA}.Release|x86.Build.0 = Release|Any CPU 37 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Debug|x64.ActiveCfg = Debug|Any CPU 40 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Debug|x64.Build.0 = Debug|Any CPU 41 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Debug|x86.ActiveCfg = Debug|Any CPU 42 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Debug|x86.Build.0 = Debug|Any CPU 43 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Release|Any CPU.ActiveCfg = Release|Any CPU 44 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Release|Any CPU.Build.0 = Release|Any CPU 45 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Release|x64.ActiveCfg = Release|Any CPU 46 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Release|x64.Build.0 = Release|Any CPU 47 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Release|x86.ActiveCfg = Release|Any CPU 48 | {961E61C6-7F6A-4769-9015-D67BE319A33E}.Release|x86.Build.0 = Release|Any CPU 49 | EndGlobalSection 50 | GlobalSection(SolutionProperties) = preSolution 51 | HideSolutionNode = FALSE 52 | EndGlobalSection 53 | GlobalSection(ExtensibilityGlobals) = postSolution 54 | SolutionGuid = {90333EA2-DA9E-4BA1-BCF7-95D6B16EC6E3} 55 | EndGlobalSection 56 | EndGlobal 57 | -------------------------------------------------------------------------------- /src/Reference.AzurePipelines.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wolfenden/Reference.AzurePipelines/6515030b8141b3e279112c8d06011b9aec35855d/src/Reference.AzurePipelines.snk -------------------------------------------------------------------------------- /src/Reference.AzurePipelines/Reference.AzurePipelines.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | Michael Wolfenden 10 | 11 | NET Standard library reference implementation built via Azure Pipelines. 12 | 13 | https://github.com/michael-wolfenden/Reference.AzurePipelines 14 | https://github.com/michael-wolfenden/Reference.AzurePipelines 15 | logo.png 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | LICENSE.md 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | true 34 | ../Reference.AzurePipelines.snk 35 | 36 | 37 | 38 | 39 | 40 | true 41 | true 42 | true 43 | snupkg 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/Reference.AzurePipelines/StarWarsNames.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace StarWars.Names 6 | { 7 | public class StarWarsNames 8 | { 9 | private static readonly IReadOnlyList Characters = new List 10 | { 11 | "2-1B", 12 | "4-LOM", 13 | "Aayla Secura", 14 | "Admiral Ackbar", 15 | "Admiral Thrawn", 16 | "Ahsoka Tano", 17 | "Anakin Solo", 18 | "Asajj Ventress", 19 | "Aurra Sing", 20 | "Senator Bail Organa", 21 | "Baby Yoda", 22 | "Barriss Offee", 23 | "Bastila Shan", 24 | "Ben Skywalker", 25 | "Bib Fortuna", 26 | "Biggs Darklighter", 27 | "Boba Fett", 28 | "Bossk", 29 | "Brakiss", 30 | "C-3PO", 31 | "Cad Bane", 32 | "Cade Skywalker", 33 | "Callista Ming", 34 | "Captain Rex", 35 | "Carnor Jax", 36 | "Chewbacca", 37 | "Clone Commander Cody", 38 | "Count Dooku", 39 | "Darth Bane", 40 | "Darth Krayt", 41 | "Darth Maul", 42 | "Darth Nihilus", 43 | "Darth Vader", 44 | "Dash Rendar", 45 | "Dengar", 46 | "Durge", 47 | "Emperor Palpatine", 48 | "Exar Kun", 49 | "Galen Marek", 50 | "General Crix Madine", 51 | "General Dodonna", 52 | "General Grievous", 53 | "General Veers", 54 | "Gilad Pellaeon", 55 | "Grand Moff Tarkin", 56 | "Greedo", 57 | "Han Solo", 58 | "Hardcase", 59 | "IG 88", 60 | "Jabba The Hutt", 61 | "Jacen Solo", 62 | "Jaina Solo", 63 | "Jango Fett", 64 | "Jarael", 65 | "Jerec", 66 | "Joruus C'Baoth", 67 | "Ki-Adi-Mundi", 68 | "Kir Kanos", 69 | "Kit Fisto", 70 | "Kyle Katarn", 71 | "Kyp Durron", 72 | "Lando Calrissian", 73 | "Luke Skywalker", 74 | "Luminara Unduli", 75 | "Lumiya", 76 | "Mace Windu", 77 | "Mara Jade", 78 | "Mas Amedda", 79 | "Mission Vao", 80 | "Natasi Daala", 81 | "Nom Anor", 82 | "Obi-Wan Kenobi", 83 | "Padmé Amidala", 84 | "Plo Koon", 85 | "Pre Vizsla", 86 | "Prince Xizor", 87 | "Princess Leia", 88 | "PROXY", 89 | "Qui-Gon Jinn", 90 | "Quinlan Vos", 91 | "R2-D2", 92 | "Rahm Kota", 93 | "Revan", 94 | "Salacious B. Crumb", 95 | "Satele Shan", 96 | "Savage Opress", 97 | "Sebulba", 98 | "Shaak Ti", 99 | "Shmi Skywalker", 100 | "Sio Bibble", 101 | "Talon Karrde", 102 | "Ulic Qel-Droma", 103 | "Visas Marr", 104 | "Watto", 105 | "Wedge Antilles", 106 | "Wullf Yularen", 107 | "Yoda", 108 | "Zam Wesell", 109 | "Zayne Carrick", 110 | "Zorii Bliss", 111 | "Zuckuss" 112 | }.AsReadOnly(); 113 | 114 | public IReadOnlyList All() => Characters; 115 | 116 | public string Random() => Random(1).Single(); 117 | 118 | public IReadOnlyList Random(int numberOfCharacters) 119 | { 120 | if (numberOfCharacters < 1 || numberOfCharacters > Characters.Count) 121 | throw new ArgumentOutOfRangeException( 122 | nameof(numberOfCharacters), 123 | $"{nameof(numberOfCharacters)} must be between 1 and {Characters.Count} inclusive."); 124 | 125 | return All() 126 | .OrderBy(_ => Guid.NewGuid()) 127 | .Take(numberOfCharacters) 128 | .ToList() 129 | .AsReadOnly(); 130 | } 131 | } 132 | } 133 | --------------------------------------------------------------------------------