From 4bcdf392db201754a03b46d12ee658aede97a067 Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 21 May 2019 18:14:32 +0100 Subject: [PATCH] Add build and first project (#1) * Added basic files and 1 project to initialise the repo - Work item AB#69199 --- .editorconfig | 164 ++++ .gitattributes | 67 ++ .github/CODEOWNERS | 5 + .github/ISSUE_TEMPLATE/bug_report.md | 21 + .github/ISSUE_TEMPLATE/user-story.md | 12 + .gitignore | 65 +- CONTRIBUTING.md | 31 + CustomAnalysisRules.Test.ruleset | 134 +++ CustomAnalysisRules.ruleset | 35 + Directory.Build.props | 18 + GeoPol.xml | 21 + Microsoft.Health.Dicom.sln | 31 + PULL_REQUEST_TEMPLATE.md | 8 + README.md | 15 +- THIRDPARTYNOTICES.md | 831 ++++++++++++++++++ build/.vsts-ci.yml | 20 + build/.vsts-pr.yml | 20 + build/build.yml | 21 + build/cibuild.yml | 35 + build/package.yml | 93 ++ global.json | 5 + nuget.config | 18 + .../Microsoft.Health.Dicom.Web.csproj | 24 + src/Microsoft.Health.Dicom.Web/Program.cs | 22 + .../Properties/launchSettings.json | 27 + src/Microsoft.Health.Dicom.Web/Startup.cs | 46 + .../appsettings.Development.json | 9 + .../appsettings.json | 8 + stylecop.json | 27 + 29 files changed, 1779 insertions(+), 54 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/user-story.md create mode 100644 CONTRIBUTING.md create mode 100644 CustomAnalysisRules.Test.ruleset create mode 100644 CustomAnalysisRules.ruleset create mode 100644 Directory.Build.props create mode 100644 GeoPol.xml create mode 100644 Microsoft.Health.Dicom.sln create mode 100644 PULL_REQUEST_TEMPLATE.md create mode 100644 THIRDPARTYNOTICES.md create mode 100644 build/.vsts-ci.yml create mode 100644 build/.vsts-pr.yml create mode 100644 build/build.yml create mode 100644 build/cibuild.yml create mode 100644 build/package.yml create mode 100644 global.json create mode 100644 nuget.config create mode 100644 src/Microsoft.Health.Dicom.Web/Microsoft.Health.Dicom.Web.csproj create mode 100644 src/Microsoft.Health.Dicom.Web/Program.cs create mode 100644 src/Microsoft.Health.Dicom.Web/Properties/launchSettings.json create mode 100644 src/Microsoft.Health.Dicom.Web/Startup.cs create mode 100644 src/Microsoft.Health.Dicom.Web/appsettings.Development.json create mode 100644 src/Microsoft.Health.Dicom.Web/appsettings.json create mode 100644 stylecop.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..6663542cec --- /dev/null +++ b/.editorconfig @@ -0,0 +1,164 @@ +# editorconfig.org + +# top-most EditorConfig file +root = true + +# Default settings: +# A newline ending every file +# Use 4 spaces as indentation +[*] +insert_final_newline = true +indent_style = space +indent_size = 4 + +[project.json] +indent_size = 2 + +# C# files +[*.cs] +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = false +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_within_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +# avoid this. unless absolutely necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# only use var when it's obvious what the variable type is +csharp_style_var_for_built_in_types = false:none +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:suggestion + +# use language keywords instead of BCL types +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# name all constant fields using PascalCase +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style + +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const + +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# static fields should have s_ prefix +dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion +dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields +dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style + +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static + +dotnet_naming_style.static_prefix_style.required_prefix = s_ +dotnet_naming_style.static_prefix_style.capitalization = camel_case + +# internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style + +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal + +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# Code style defaults +dotnet_sort_system_directives_first = true +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = false + +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion + +# Expression-bodied members +csharp_style_expression_bodied_methods = false:none +csharp_style_expression_bodied_constructors = false:none +csharp_style_expression_bodied_operators = false:none +csharp_style_expression_bodied_properties = true:none +csharp_style_expression_bodied_indexers = true:none +csharp_style_expression_bodied_accessors = true:none + +# Pattern matching +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +# Null checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = do_not_ignore +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping Options +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = false + +# C++ Files +[*.{cpp,h,in}] +curly_bracket_next_line = true +indent_brace_style = Allman + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml build files +[*.builds] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# Shell scripts +[*.sh] +end_of_line = lf +[*.{cmd, bat}] +end_of_line = crlf \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..e9d01fb012 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,67 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain + +# Force bash scripts to always use lf line endings so that if a repo is accessed +# in Unix via a file share from Windows, the scripts will work. +*.sh text eol=lf \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..d00a030ec7 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in the repo. +* @microsoft/resolute-admins diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..8830238e85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,21 @@ +--- +name: Bug report +about: Create a report to help us improve +labels: + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. +2. +3. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Actual behavior** +A clear and concise description of what actually happened. diff --git a/.github/ISSUE_TEMPLATE/user-story.md b/.github/ISSUE_TEMPLATE/user-story.md new file mode 100644 index 0000000000..7778e78967 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/user-story.md @@ -0,0 +1,12 @@ +--- +name: User story +about: Tell us something new you want to do +labels: + +--- + +**User story** +As a [type of user], I want [some functionality] so that [benefit]. + +**Acceptance criteria** +1. When I do [A], then [B] happens. diff --git a/.gitignore b/.gitignore index 3e759b75bf..6c04c45f0c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,10 +13,6 @@ *.userprefs # Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ x64/ x86/ bld/ @@ -24,13 +20,13 @@ bld/ [Oo]bj/ [Ll]og/ -# Visual Studio 2015/2017 cache/options directory +# Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ -# Visual Studio 2017 auto generated files -Generated\ Files/ +#Visual Studio Code +.vscode/ # MSTest test Results [Tt]est[Rr]esult*/ @@ -45,29 +41,19 @@ TestResult.xml [Rr]eleasePS/ dlldata.c -# Benchmark Results -BenchmarkDotNet.Artifacts/ - # .NET Core project.lock.json project.fragment.lock.json artifacts/ -**/Properties/launchSettings.json - -# StyleCop -StyleCopReport.xml -# Files built by Visual Studio *_i.c *_p.c *_i.h *.ilk *.meta *.obj -*.iobj *.pch *.pdb -*.ipdb *.pgc *.pgd *.rsp @@ -105,9 +91,6 @@ ipch/ *.vspx *.sap -# Visual Studio Trace Files -*.e2e - # TFS 2012 Local Workspace $tf/ @@ -128,10 +111,6 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - # Visual Studio code coverage results *.coverage *.coveragexml @@ -167,7 +146,7 @@ publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, +# TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj @@ -180,11 +159,11 @@ PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* +**/packages/* # except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ +!**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config +#!**/packages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets @@ -202,7 +181,6 @@ AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt -*.appx # Visual Studio cache files # files ending in .cache can be ignored @@ -221,10 +199,6 @@ ClientBin/ *.publishsettings orleans.codegen.cs -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ @@ -239,8 +213,6 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak # SQL Server files *.mdf @@ -251,7 +223,6 @@ ServiceFabricBackup/ *.rdl.data *.bim.layout *.bim_*.settings -*.rptproj.rsuser # Microsoft Fakes FakesAssemblies/ @@ -263,6 +234,9 @@ FakesAssemblies/ .ntvs_analysis.dat node_modules/ +# Typescript v1 declaration files +typings/ + # Visual Studio 6 build log *.plg @@ -302,9 +276,6 @@ __pycache__/ # tools/** # !tools/packages.config -# Tabs Studio -*.tss - # Telerik's JustMock configuration file *.jmconfig @@ -314,17 +285,5 @@ __pycache__/ *.odx.cs *.xsd.cs -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ +# IdentityServer workspace +tempkey.rsa diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..e10fd2c778 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to DICOM server + +This document describes guidelines for contributing to the DICOM server repo. + +## Submitting Pull Requests + +- **DO** submit all changes via pull requests (PRs). They will be reviewed and potentially be merged by maintainers after a peer review that includes at least one of the team members. +- **DO** give PRs short but descriptive names. +- **DO** write a useful but brief description of what the PR is for. +- **DO** refer to any relevant issues and use [keywords](https://help.github.com/articles/closing-issues-using-keywords/) that automatically close issues when the PR is merged. +- **DO** ensure each commit successfully builds. The entire PR must pass all checks before it will be merged. +- **DO** address PR feedback in additional commits instead of amending. +- **DO** assume that [Squash and Merge](https://blog.github.com/2016-04-01-squash-your-commits/) will be used to merge the commits unless specifically requested otherwise. +- **DO NOT** submit "work in progress" PRs. A PR should only be submitted when it is considered ready for review. +- **DO NOT** mix independent and unrelated changes in one PR. + +## Coding Style + +The coding style is enforced through [StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers), [.editorconfig](.editorconfig), and [stylecop.json](stylecop.json). Contributors should ensure these guidelines are followed when making submissions. + +- **DO** address the StyleCop.Analyzers errors. +- **DO** follow the [.editorconfig](.editorconfig) and [stylecop.json](stylecop.json) settings. + +## Creating Issues + +- **DO** use a descriptive title that identifies the issue or the requested feature. +- **DO** write a detailed description of the issue or the requested feature. +- **DO** provide details for issues you create: + - Describe the expected and actual behavior. + - Provide any relevant exception message or OperationOutcome. +- **DO** subscribe to notifications for created issues in case there are any follow-up questions. diff --git a/CustomAnalysisRules.Test.ruleset b/CustomAnalysisRules.Test.ruleset new file mode 100644 index 0000000000..e37c62e949 --- /dev/null +++ b/CustomAnalysisRules.Test.ruleset @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CustomAnalysisRules.ruleset b/CustomAnalysisRules.ruleset new file mode 100644 index 0000000000..ffad9b4114 --- /dev/null +++ b/CustomAnalysisRules.ruleset @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000000..24d8fd10b1 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,18 @@ + + + true + + Full + 7.3 + true + false + $(EnableSourceLink) + + true + + + true + true + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + diff --git a/GeoPol.xml b/GeoPol.xml new file mode 100644 index 0000000000..70ff9651fe --- /dev/null +++ b/GeoPol.xml @@ -0,0 +1,21 @@ + + + + +]> + + + +&GitReposFolder;\VSTS\&GitRepoName; +&GitRepoName; + + + . + + + .gitignore + GeoPol.xml + THIRDPARTYNOTICES.md + + \ No newline at end of file diff --git a/Microsoft.Health.Dicom.sln b/Microsoft.Health.Dicom.sln new file mode 100644 index 0000000000..34211c89bb --- /dev/null +++ b/Microsoft.Health.Dicom.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28729.10 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{404C6C33-DB00-4182-BD90-F10A8B17C321}" + ProjectSection(SolutionItems) = preProject + testauthenvironment.json = testauthenvironment.json + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Health.Dicom.Web", "src\Microsoft.Health.Dicom.Web\Microsoft.Health.Dicom.Web.csproj", "{BFB96311-9B1A-41C1-ABF1-4F6522660084}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BFB96311-9B1A-41C1-ABF1-4F6522660084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFB96311-9B1A-41C1-ABF1-4F6522660084}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFB96311-9B1A-41C1-ABF1-4F6522660084}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFB96311-9B1A-41C1-ABF1-4F6522660084}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E370FB31-CF95-47D1-B1E1-863A77973FF8} + RESX_SortFileContentOnSave = True + EndGlobalSection +EndGlobal diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..70d285b95d --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +## Description +Describe the changes in this PR. + +## Related issues +Addresses [issue #]. + +## Testing +Describe how this change was tested. diff --git a/README.md b/README.md index 29f7ebd64c..0512541624 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ +# DICOM Server for Azure -# Contributing +A .NET Core implementation of the DICOM Web standard. +## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. @@ -9,6 +11,17 @@ When you submit a pull request, a CLA-bot will automatically determine whether y a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +There are many other ways to contribute to DICOM Server for Azure. +* [Submit bugs](https://github.com/Microsoft/dicom-server/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/dicom-server/pulls). +* Engage with DICOM Server for Azure users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/dicom-server-for-azure). +* Join the [#dicomforazure](https://twitter.com/hashtag/dicomserverforazure?f=tweets&vertical=default) discussion on Twitter. +* [Contribute bug fixes](CONTRIBUTING.md). + +See [Contributing to Dicom Server for Azure](CONTRIBUTING.md) for more information. + This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +FHIR® is the registered trademark of HL7 and is used with the permission of HL7. diff --git a/THIRDPARTYNOTICES.md b/THIRDPARTYNOTICES.md new file mode 100644 index 0000000000..369c50e818 --- /dev/null +++ b/THIRDPARTYNOTICES.md @@ -0,0 +1,831 @@ +# Third party notices + +Do Not Translate or Localize + +This file is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Microsoft product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. + +## AngleSharp 0.11.0 +* Component Source: https://github.com/AngleSharp/AngleSharp/ +* Component Copyright and License: + > The MIT License (MIT) + > + > Copyright (c) 2013 - 2019 AngleSharp + > + > Permission is hereby granted, free of charge, to any person obtaining a copy + > of this software and associated documentation files (the "Software"), to deal + > in the Software without restriction, including without limitation the rights + > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + > copies of the Software, and to permit persons to whom the Software is + > furnished to do so, subject to the following conditions: + > + > The above copyright notice and this permission notice shall be included in all + > copies or substantial portions of the Software. + > + > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + > SOFTWARE. + +## Ensure.That 8.1.1 +* Component Source: https://github.com/danielwertheim/Ensure.That/ +* Component Copyright and License: + > The MIT License (MIT) + > + > Copyright (c) 2015 Daniel Wertheim + > + > Permission is hereby granted, free of charge, to any person obtaining a copy + > of this software and associated documentation files (the "Software"), to deal + > in the Software without restriction, including without limitation the rights + > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + > copies of the Software, and to permit persons to whom the Software is + > furnished to do so, subject to the following conditions: + > + > The above copyright notice and this permission notice shall be included in all + > copies or substantial portions of the Software. + > + > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + > SOFTWARE. + +## FluentValidation 8.0.101 +* Component Source: https://github.com/JeremySkinner/fluentvalidation/ +* Component Copyright and License: + > Apache License + > Version 2.0, January 2004 + > http://www.apache.org/licenses/ + > + > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + > + > 1. Definitions. + > + > "License" shall mean the terms and conditions for use, reproduction, + > and distribution as defined by Sections 1 through 9 of this document. + > + > "Licensor" shall mean the copyright owner or entity authorized by + > the copyright owner that is granting the License. + > + > "Legal Entity" shall mean the union of the acting entity and all + > other entities that control, are controlled by, or are under common + > control with that entity. For the purposes of this definition, + > "control" means (i) the power, direct or indirect, to cause the + > direction or management of such entity, whether by contract or + > otherwise, or (ii) ownership of fifty percent (50%) or more of the + > outstanding shares, or (iii) beneficial ownership of such entity. + > + > "You" (or "Your") shall mean an individual or Legal Entity + > exercising permissions granted by this License. + > + > "Source" form shall mean the preferred form for making modifications, + > including but not limited to software source code, documentation + > source, and configuration files. + > + > "Object" form shall mean any form resulting from mechanical + > transformation or translation of a Source form, including but + > not limited to compiled object code, generated documentation, + > and conversions to other media types. + > + > "Work" shall mean the work of authorship, whether in Source or + > Object form, made available under the License, as indicated by a + > copyright notice that is included in or attached to the work + > (an example is provided in the Appendix below). + > + > "Derivative Works" shall mean any work, whether in Source or Object + > form, that is based on (or derived from) the Work and for which the + > editorial revisions, annotations, elaborations, or other modifications + > represent, as a whole, an original work of authorship. For the purposes + > of this License, Derivative Works shall not include works that remain + > separable from, or merely link (or bind by name) to the interfaces of, + > the Work and Derivative Works thereof. + > + > "Contribution" shall mean any work of authorship, including + > the original version of the Work and any modifications or additions + > to that Work or Derivative Works thereof, that is intentionally + > submitted to Licensor for inclusion in the Work by the copyright owner + > or by an individual or Legal Entity authorized to submit on behalf of + > the copyright owner. For the purposes of this definition, "submitted" + > means any form of electronic, verbal, or written communication sent + > to the Licensor or its representatives, including but not limited to + > communication on electronic mailing lists, source code control systems, + > and issue tracking systems that are managed by, or on behalf of, the + > Licensor for the purpose of discussing and improving the Work, but + > excluding communication that is conspicuously marked or otherwise + > designated in writing by the copyright owner as "Not a Contribution." + > + > "Contributor" shall mean Licensor and any individual or Legal Entity + > on behalf of whom a Contribution has been received by Licensor and + > subsequently incorporated within the Work. + > + > 2. Grant of Copyright License. Subject to the terms and conditions of + > this License, each Contributor hereby grants to You a perpetual, + > worldwide, non-exclusive, no-charge, royalty-free, irrevocable + > copyright license to reproduce, prepare Derivative Works of, + > publicly display, publicly perform, sublicense, and distribute the + > Work and such Derivative Works in Source or Object form. + > + > 3. Grant of Patent License. Subject to the terms and conditions of + > this License, each Contributor hereby grants to You a perpetual, + > worldwide, non-exclusive, no-charge, royalty-free, irrevocable + > (except as stated in this section) patent license to make, have made, + > use, offer to sell, sell, import, and otherwise transfer the Work, + > where such license applies only to those patent claims licensable + > by such Contributor that are necessarily infringed by their + > Contribution(s) alone or by combination of their Contribution(s) + > with the Work to which such Contribution(s) was submitted. If You + > institute patent litigation against any entity (including a + > cross-claim or counterclaim in a lawsuit) alleging that the Work + > or a Contribution incorporated within the Work constitutes direct + > or contributory patent infringement, then any patent licenses + > granted to You under this License for that Work shall terminate + > as of the date such litigation is filed. + > + > 4. Redistribution. You may reproduce and distribute copies of the + > Work or Derivative Works thereof in any medium, with or without + > modifications, and in Source or Object form, provided that You + > meet the following conditions: + > + > (a) You must give any other recipients of the Work or + > Derivative Works a copy of this License; and + > + > (b) You must cause any modified files to carry prominent notices + > stating that You changed the files; and + > + > (c) You must retain, in the Source form of any Derivative Works + > that You distribute, all copyright, patent, trademark, and + > attribution notices from the Source form of the Work, + > excluding those notices that do not pertain to any part of + > the Derivative Works; and + > + > (d) If the Work includes a "NOTICE" text file as part of its + > distribution, then any Derivative Works that You distribute must + > include a readable copy of the attribution notices contained + > within such NOTICE file, excluding those notices that do not + > pertain to any part of the Derivative Works, in at least one + > of the following places: within a NOTICE text file distributed + > as part of the Derivative Works; within the Source form or + > documentation, if provided along with the Derivative Works; or, + > within a display generated by the Derivative Works, if and + > wherever such third-party notices normally appear. The contents + > of the NOTICE file are for informational purposes only and + > do not modify the License. You may add Your own attribution + > notices within Derivative Works that You distribute, alongside + > or as an addendum to the NOTICE text from the Work, provided + > that such additional attribution notices cannot be construed + > as modifying the License. + > + > You may add Your own copyright statement to Your modifications and + > may provide additional or different license terms and conditions + > for use, reproduction, or distribution of Your modifications, or + > for any such Derivative Works as a whole, provided Your use, + > reproduction, and distribution of the Work otherwise complies with + > the conditions stated in this License. + > + > 5. Submission of Contributions. Unless You explicitly state otherwise, + > any Contribution intentionally submitted for inclusion in the Work + > by You to the Licensor shall be under the terms and conditions of + > this License, without any additional terms or conditions. + > Notwithstanding the above, nothing herein shall supersede or modify + > the terms of any separate license agreement you may have executed + > with Licensor regarding such Contributions. + > + > 6. Trademarks. This License does not grant permission to use the trade + > names, trademarks, service marks, or product names of the Licensor, + > except as required for reasonable and customary use in describing the + > origin of the Work and reproducing the content of the NOTICE file. + > + > 7. Disclaimer of Warranty. Unless required by applicable law or + > agreed to in writing, Licensor provides the Work (and each + > Contributor provides its Contributions) on an "AS IS" BASIS, + > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + > implied, including, without limitation, any warranties or conditions + > of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + > PARTICULAR PURPOSE. You are solely responsible for determining the + > appropriateness of using or redistributing the Work and assume any + > risks associated with Your exercise of permissions under this License. + > + > 8. Limitation of Liability. In no event and under no legal theory, + > whether in tort (including negligence), contract, or otherwise, + > unless required by applicable law (such as deliberate and grossly + > negligent acts) or agreed to in writing, shall any Contributor be + > liable to You for damages, including any direct, indirect, special, + > incidental, or consequential damages of any character arising as a + > result of this License or out of the use or inability to use the + > Work (including but not limited to damages for loss of goodwill, + > work stoppage, computer failure or malfunction, or any and all + > other commercial damages or losses), even if such Contributor + > has been advised of the possibility of such damages. + > + > 9. Accepting Warranty or Additional Liability. While redistributing + > the Work or Derivative Works thereof, You may choose to offer, + > and charge a fee for, acceptance of support, warranty, indemnity, + > or other liability obligations and/or rights consistent with this + > License. However, in accepting such obligations, You may act only + > on Your own behalf and on Your sole responsibility, not on behalf + > of any other Contributor, and only if You agree to indemnify, + > defend, and hold each Contributor harmless for any liability + > incurred by, or claims asserted against, such Contributor by reason + > of your accepting any such warranty or additional liability. + > + > END OF TERMS AND CONDITIONS + +## Hl7.Fhir.STU3 1.1.3 +* Component Source: https://github.com/ewoutkramer/fhir-net-api/ +* Component Copyright and License: + > Copyright (c) 2013-2019, HL7, Firely (info@fire.ly), Microsoft Open Technologies + > and contributors. See the file CONTRIBUTORS for details + > + > All rights reserved. + > + > Redistribution and use in source and binary forms, with or without modification, + > are permitted provided that the following conditions are met: + > + > * Redistributions of source code must retain the above copyright notice, this + > list of conditions and the following disclaimer. + > + > * Redistributions in binary form must reproduce the above copyright notice, this + > list of conditions and the following disclaimer in the documentation and/or + > other materials provided with the distribution. + > + > * Neither the name of Furore nor the names of its + > contributors may be used to endorse or promote products derived from + > this software without specific prior written permission. + > + > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + > ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + > DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + > ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + > (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + > LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + > ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + > (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + > SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +## IdentityServer4 2.3.0 +* Component Source: https://github.com/IdentityServer/IdentityServer4 +* Component Copyright and License: + > Apache License + > Version 2.0, January 2004 + > http://www.apache.org/licenses/ + > + > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + > + > 1. Definitions. + > + > "License" shall mean the terms and conditions for use, reproduction, + > and distribution as defined by Sections 1 through 9 of this document. + > + > "Licensor" shall mean the copyright owner or entity authorized by + > the copyright owner that is granting the License. + > + > "Legal Entity" shall mean the union of the acting entity and all + > other entities that control, are controlled by, or are under common + > control with that entity. For the purposes of this definition, + > "control" means (i) the power, direct or indirect, to cause the + > direction or management of such entity, whether by contract or + > otherwise, or (ii) ownership of fifty percent (50%) or more of the + > outstanding shares, or (iii) beneficial ownership of such entity. + > + > "You" (or "Your") shall mean an individual or Legal Entity + > exercising permissions granted by this License. + > + > "Source" form shall mean the preferred form for making modifications, + > including but not limited to software source code, documentation + > source, and configuration files. + > + > "Object" form shall mean any form resulting from mechanical + > transformation or translation of a Source form, including but + > not limited to compiled object code, generated documentation, + > and conversions to other media types. + > + > "Work" shall mean the work of authorship, whether in Source or + > Object form, made available under the License, as indicated by a + > copyright notice that is included in or attached to the work + > (an example is provided in the Appendix below). + > + > "Derivative Works" shall mean any work, whether in Source or Object + > form, that is based on (or derived from) the Work and for which the + > editorial revisions, annotations, elaborations, or other modifications + > represent, as a whole, an original work of authorship. For the purposes + > of this License, Derivative Works shall not include works that remain + > separable from, or merely link (or bind by name) to the interfaces of, + > the Work and Derivative Works thereof. + > + > "Contribution" shall mean any work of authorship, including + > the original version of the Work and any modifications or additions + > to that Work or Derivative Works thereof, that is intentionally + > submitted to Licensor for inclusion in the Work by the copyright owner + > or by an individual or Legal Entity authorized to submit on behalf of + > the copyright owner. For the purposes of this definition, "submitted" + > means any form of electronic, verbal, or written communication sent + > to the Licensor or its representatives, including but not limited to + > communication on electronic mailing lists, source code control systems, + > and issue tracking systems that are managed by, or on behalf of, the + > Licensor for the purpose of discussing and improving the Work, but + > excluding communication that is conspicuously marked or otherwise + > designated in writing by the copyright owner as "Not a Contribution." + > + > "Contributor" shall mean Licensor and any individual or Legal Entity + > on behalf of whom a Contribution has been received by Licensor and + > subsequently incorporated within the Work. + > + > 2. Grant of Copyright License. Subject to the terms and conditions of + > this License, each Contributor hereby grants to You a perpetual, + > worldwide, non-exclusive, no-charge, royalty-free, irrevocable + > copyright license to reproduce, prepare Derivative Works of, + > publicly display, publicly perform, sublicense, and distribute the + > Work and such Derivative Works in Source or Object form. + > + > 3. Grant of Patent License. Subject to the terms and conditions of + > this License, each Contributor hereby grants to You a perpetual, + > worldwide, non-exclusive, no-charge, royalty-free, irrevocable + > (except as stated in this section) patent license to make, have made, + > use, offer to sell, sell, import, and otherwise transfer the Work, + > where such license applies only to those patent claims licensable + > by such Contributor that are necessarily infringed by their + > Contribution(s) alone or by combination of their Contribution(s) + > with the Work to which such Contribution(s) was submitted. If You + > institute patent litigation against any entity (including a + > cross-claim or counterclaim in a lawsuit) alleging that the Work + > or a Contribution incorporated within the Work constitutes direct + > or contributory patent infringement, then any patent licenses + > granted to You under this License for that Work shall terminate + > as of the date such litigation is filed. + > + > 4. Redistribution. You may reproduce and distribute copies of the + > Work or Derivative Works thereof in any medium, with or without + > modifications, and in Source or Object form, provided that You + > meet the following conditions: + > + > (a) You must give any other recipients of the Work or + > Derivative Works a copy of this License; and + > + > (b) You must cause any modified files to carry prominent notices + > stating that You changed the files; and + > + > (c) You must retain, in the Source form of any Derivative Works + > that You distribute, all copyright, patent, trademark, and + > attribution notices from the Source form of the Work, + > excluding those notices that do not pertain to any part of + > the Derivative Works; and + > + > (d) If the Work includes a "NOTICE" text file as part of its + > distribution, then any Derivative Works that You distribute must + > include a readable copy of the attribution notices contained + > within such NOTICE file, excluding those notices that do not + > pertain to any part of the Derivative Works, in at least one + > of the following places: within a NOTICE text file distributed + > as part of the Derivative Works; within the Source form or + > documentation, if provided along with the Derivative Works; or, + > within a display generated by the Derivative Works, if and + > wherever such third-party notices normally appear. The contents + > of the NOTICE file are for informational purposes only and + > do not modify the License. You may add Your own attribution + > notices within Derivative Works that You distribute, alongside + > or as an addendum to the NOTICE text from the Work, provided + > that such additional attribution notices cannot be construed + > as modifying the License. + > + > You may add Your own copyright statement to Your modifications and + > may provide additional or different license terms and conditions + > for use, reproduction, or distribution of Your modifications, or + > for any such Derivative Works as a whole, provided Your use, + > reproduction, and distribution of the Work otherwise complies with + > the conditions stated in this License. + > + > 5. Submission of Contributions. Unless You explicitly state otherwise, + > any Contribution intentionally submitted for inclusion in the Work + > by You to the Licensor shall be under the terms and conditions of + > this License, without any additional terms or conditions. + > Notwithstanding the above, nothing herein shall supersede or modify + > the terms of any separate license agreement you may have executed + > with Licensor regarding such Contributions. + > + > 6. Trademarks. This License does not grant permission to use the trade + > names, trademarks, service marks, or product names of the Licensor, + > except as required for reasonable and customary use in describing the + > origin of the Work and reproducing the content of the NOTICE file. + > + > 7. Disclaimer of Warranty. Unless required by applicable law or + > agreed to in writing, Licensor provides the Work (and each + > Contributor provides its Contributions) on an "AS IS" BASIS, + > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + > implied, including, without limitation, any warranties or conditions + > of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + > PARTICULAR PURPOSE. You are solely responsible for determining the + > appropriateness of using or redistributing the Work and assume any + > risks associated with Your exercise of permissions under this License. + > + > 8. Limitation of Liability. In no event and under no legal theory, + > whether in tort (including negligence), contract, or otherwise, + > unless required by applicable law (such as deliberate and grossly + > negligent acts) or agreed to in writing, shall any Contributor be + > liable to You for damages, including any direct, indirect, special, + > incidental, or consequential damages of any character arising as a + > result of this License or out of the use or inability to use the + > Work (including but not limited to damages for loss of goodwill, + > work stoppage, computer failure or malfunction, or any and all + > other commercial damages or losses), even if such Contributor + > has been advised of the possibility of such damages. + > + > 9. Accepting Warranty or Additional Liability. While redistributing + > the Work or Derivative Works thereof, You may choose to offer, + > and charge a fee for, acceptance of support, warranty, indemnity, + > or other liability obligations and/or rights consistent with this + > License. However, in accepting such obligations, You may act only + > on Your own behalf and on Your sole responsibility, not on behalf + > of any other Contributor, and only if You agree to indemnify, + > defend, and hold each Contributor harmless for any liability + > incurred by, or claims asserted against, such Contributor by reason + > of your accepting any such warranty or additional liability. + > + > END OF TERMS AND CONDITIONS + > + > APPENDIX: How to apply the Apache License to your work. + > + > To apply the Apache License to your work, attach the following + > boilerplate notice, with the fields enclosed by brackets "{}" + > replaced with your own identifying information. (Don't include + > the brackets!) The text should be enclosed in the appropriate + > comment syntax for the file format. We also recommend that a + > file or class name and description of purpose be included on the + > same "printed page" as the copyright notice for easier + > identification within third-party archives. + > + > Copyright 2018, Brock Allen, Dominick Baier + > + > Licensed under the Apache License, Version 2.0 (the "License"); + > you may not use this file except in compliance with the License. + > You may obtain a copy of the License at + > + > http://www.apache.org/licenses/LICENSE-2.0 + > + > Unless required by applicable law or agreed to in writing, software + > distributed under the License is distributed on an "AS IS" BASIS, + > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + > See the License for the specific language governing permissions and + > limitations under the License. + > + +## MediatR 5.1.0 +* Component Source: https://github.com/jbogard/MediatR +* Component Copyright and License: + > Apache License + > Version 2.0, January 2004 + > http://www.apache.org/licenses/ + > + > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + > + > 1. Definitions. + > + > "License" shall mean the terms and conditions for use, reproduction, + > and distribution as defined by Sections 1 through 9 of this document. + > + > "Licensor" shall mean the copyright owner or entity authorized by + > the copyright owner that is granting the License. + > + > "Legal Entity" shall mean the union of the acting entity and all + > other entities that control, are controlled by, or are under common + > control with that entity. For the purposes of this definition, + > "control" means (i) the power, direct or indirect, to cause the + > direction or management of such entity, whether by contract or + > otherwise, or (ii) ownership of fifty percent (50%) or more of the + > outstanding shares, or (iii) beneficial ownership of such entity. + > + > "You" (or "Your") shall mean an individual or Legal Entity + > exercising permissions granted by this License. + > + > "Source" form shall mean the preferred form for making modifications, + > including but not limited to software source code, documentation + > source, and configuration files. + > + > "Object" form shall mean any form resulting from mechanical + > transformation or translation of a Source form, including but + > not limited to compiled object code, generated documentation, + > and conversions to other media types. + > + > "Work" shall mean the work of authorship, whether in Source or + > Object form, made available under the License, as indicated by a + > copyright notice that is included in or attached to the work + > (an example is provided in the Appendix below). + > + > "Derivative Works" shall mean any work, whether in Source or Object + > form, that is based on (or derived from) the Work and for which the + > editorial revisions, annotations, elaborations, or other modifications + > represent, as a whole, an original work of authorship. For the purposes + > of this License, Derivative Works shall not include works that remain + > separable from, or merely link (or bind by name) to the interfaces of, + > the Work and Derivative Works thereof. + > + > "Contribution" shall mean any work of authorship, including + > the original version of the Work and any modifications or additions + > to that Work or Derivative Works thereof, that is intentionally + > submitted to Licensor for inclusion in the Work by the copyright owner + > or by an individual or Legal Entity authorized to submit on behalf of + > the copyright owner. For the purposes of this definition, "submitted" + > means any form of electronic, verbal, or written communication sent + > to the Licensor or its representatives, including but not limited to + > communication on electronic mailing lists, source code control systems, + > and issue tracking systems that are managed by, or on behalf of, the + > Licensor for the purpose of discussing and improving the Work, but + > excluding communication that is conspicuously marked or otherwise + > designated in writing by the copyright owner as "Not a Contribution." + > + > "Contributor" shall mean Licensor and any individual or Legal Entity + > on behalf of whom a Contribution has been received by Licensor and + > subsequently incorporated within the Work. + > + > 2. Grant of Copyright License. Subject to the terms and conditions of + > this License, each Contributor hereby grants to You a perpetual, + > worldwide, non-exclusive, no-charge, royalty-free, irrevocable + > copyright license to reproduce, prepare Derivative Works of, + > publicly display, publicly perform, sublicense, and distribute the + > Work and such Derivative Works in Source or Object form. + > + > 3. Grant of Patent License. Subject to the terms and conditions of + > this License, each Contributor hereby grants to You a perpetual, + > worldwide, non-exclusive, no-charge, royalty-free, irrevocable + > (except as stated in this section) patent license to make, have made, + > use, offer to sell, sell, import, and otherwise transfer the Work, + > where such license applies only to those patent claims licensable + > by such Contributor that are necessarily infringed by their + > Contribution(s) alone or by combination of their Contribution(s) + > with the Work to which such Contribution(s) was submitted. If You + > institute patent litigation against any entity (including a + > cross-claim or counterclaim in a lawsuit) alleging that the Work + > or a Contribution incorporated within the Work constitutes direct + > or contributory patent infringement, then any patent licenses + > granted to You under this License for that Work shall terminate + > as of the date such litigation is filed. + > + > 4. Redistribution. You may reproduce and distribute copies of the + > Work or Derivative Works thereof in any medium, with or without + > modifications, and in Source or Object form, provided that You + > meet the following conditions: + > + > (a) You must give any other recipients of the Work or + > Derivative Works a copy of this License; and + > + > (b) You must cause any modified files to carry prominent notices + > stating that You changed the files; and + > + > (c) You must retain, in the Source form of any Derivative Works + > that You distribute, all copyright, patent, trademark, and + > attribution notices from the Source form of the Work, + > excluding those notices that do not pertain to any part of + > the Derivative Works; and + > + > (d) If the Work includes a "NOTICE" text file as part of its + > distribution, then any Derivative Works that You distribute must + > include a readable copy of the attribution notices contained + > within such NOTICE file, excluding those notices that do not + > pertain to any part of the Derivative Works, in at least one + > of the following places: within a NOTICE text file distributed + > as part of the Derivative Works; within the Source form or + > documentation, if provided along with the Derivative Works; or, + > within a display generated by the Derivative Works, if and + > wherever such third-party notices normally appear. The contents + > of the NOTICE file are for informational purposes only and + > do not modify the License. You may add Your own attribution + > notices within Derivative Works that You distribute, alongside + > or as an addendum to the NOTICE text from the Work, provided + > that such additional attribution notices cannot be construed + > as modifying the License. + > + > You may add Your own copyright statement to Your modifications and + > may provide additional or different license terms and conditions + > for use, reproduction, or distribution of Your modifications, or + > for any such Derivative Works as a whole, provided Your use, + > reproduction, and distribution of the Work otherwise complies with + > the conditions stated in this License. + > + > 5. Submission of Contributions. Unless You explicitly state otherwise, + > any Contribution intentionally submitted for inclusion in the Work + > by You to the Licensor shall be under the terms and conditions of + > this License, without any additional terms or conditions. + > Notwithstanding the above, nothing herein shall supersede or modify + > the terms of any separate license agreement you may have executed + > with Licensor regarding such Contributions. + > + > 6. Trademarks. This License does not grant permission to use the trade + > names, trademarks, service marks, or product names of the Licensor, + > except as required for reasonable and customary use in describing the + > origin of the Work and reproducing the content of the NOTICE file. + > + > 7. Disclaimer of Warranty. Unless required by applicable law or + > agreed to in writing, Licensor provides the Work (and each + > Contributor provides its Contributions) on an "AS IS" BASIS, + > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + > implied, including, without limitation, any warranties or conditions + > of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + > PARTICULAR PURPOSE. You are solely responsible for determining the + > appropriateness of using or redistributing the Work and assume any + > risks associated with Your exercise of permissions under this License. + > + > 8. Limitation of Liability. In no event and under no legal theory, + > whether in tort (including negligence), contract, or otherwise, + > unless required by applicable law (such as deliberate and grossly + > negligent acts) or agreed to in writing, shall any Contributor be + > liable to You for damages, including any direct, indirect, special, + > incidental, or consequential damages of any character arising as a + > result of this License or out of the use or inability to use the + > Work (including but not limited to damages for loss of goodwill, + > work stoppage, computer failure or malfunction, or any and all + > other commercial damages or losses), even if such Contributor + > has been advised of the possibility of such damages. + > + > 9. Accepting Warranty or Additional Liability. While redistributing + > the Work or Derivative Works thereof, You may choose to offer, + > and charge a fee for, acceptance of support, warranty, indemnity, + > or other liability obligations and/or rights consistent with this + > License. However, in accepting such obligations, You may act only + > on Your own behalf and on Your sole responsibility, not on behalf + > of any other Contributor, and only if You agree to indemnify, + > defend, and hold each Contributor harmless for any liability + > incurred by, or claims asserted against, such Contributor by reason + > of your accepting any such warranty or additional liability. + > + > END OF TERMS AND CONDITIONS + > + > APPENDIX: How to apply the Apache License to your work. + > + > To apply the Apache License to your work, attach the following + > boilerplate notice, with the fields enclosed by brackets "{}" + > replaced with your own identifying information. (Don't include + > the brackets!) The text should be enclosed in the appropriate + > comment syntax for the file format. We also recommend that a + > file or class name and description of purpose be included on the + > same "printed page" as the copyright notice for easier + > identification within third-party archives. + > + > Copyright {yyyy} {name of copyright owner} + > + > Licensed under the Apache License, Version 2.0 (the "License"); + > you may not use this file except in compliance with the License. + > You may obtain a copy of the License at + > + > http://www.apache.org/licenses/LICENSE-2.0 + > + > Unless required by applicable law or agreed to in writing, software + > distributed under the License is distributed on an "AS IS" BASIS, + > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + > See the License for the specific language governing permissions and + > limitations under the License. + +## NSubstitute 3.1.0 +* Component Source: https://github.com/nsubstitute/ +* Component Copyright and License: + > Copyright (c) 2009 Anthony Egerton (nsubstitute@delfish.com) and David Tchepak (dave@davesquared.net) + > All rights reserved. + > + > Redistribution and use in source and binary forms, with or without modification, + > are permitted provided that the following conditions are met: + > + > * Redistributions of source code must retain the above copyright notice, + > this list of conditions and the following disclaimer. + > * Redistributions in binary form must reproduce the above copyright notice, + > this list of conditions and the following disclaimer in the documentation + > and/or other materials provided with the distribution. + > * Neither the names of the copyright holders nor the names of + > contributors may be used to endorse or promote products derived from this + > software without specific prior written permission. + > + > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + > ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + > DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + > FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + > DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + > SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + > CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + > OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + > THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + > + > [ http://www.opensource.org/licenses/bsd-license.php ]> + +## Polly 7.0.3 +* Component Source: https://github.com/App-vNext/Polly +* Component Copyright and License: + > New BSD License + > = + > Copyright (c) 2015-2018, App vNext + > All rights reserved. + > + > Redistribution and use in source and binary forms, with or without + > modification, are permitted provided that the following conditions are met: + > * Redistributions of source code must retain the above copyright + > notice, this list of conditions and the following disclaimer. + > * Redistributions in binary form must reproduce the above copyright + > notice, this list of conditions and the following disclaimer in the + > documentation and/or other materials provided with the distribution. + > * Neither the name of App vNext nor the + > names of its contributors may be used to endorse or promote products + > derived from this software without specific prior written permission. + > + > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + > ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + > DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + > (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + > LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + > ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + > (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + > SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +## StyleCop.Analyzers 1.1.0-beta008 +* Component Source: https://github.com/DotNetAnalyzers/StyleCopAnalyzers/ +* Component Copyright and License: + >Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + > + >Licensed under the Apache License, Version 2.0 (the "License"); you may not use + >these files except in compliance with the License. You may obtain a copy of the + >License at + > + >http://www.apache.org/licenses/LICENSE-2.0 + > + >Unless required by applicable law or agreed to in writing, software distributed + >under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + >CONDITIONS OF ANY KIND, either express or implied. See the License for the + >specific language governing permissions and limitations under the License. + > + >--- + > + >This project uses other open source projects, which are used under the terms + >of the following license(s). + > + >.NET Compiler Platform ("Roslyn") + > + > Copyright Microsoft. + > + > Licensed under the Apache License, Version 2.0 (the "License"); you may not use + > these files except in compliance with the License. You may obtain a copy of the + > License at + > + > http://www.apache.org/licenses/LICENSE-2.0 + > + > Unless required by applicable law or agreed to in writing, software distributed + > under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + > CONDITIONS OF ANY KIND, either express or implied. See the License for the + > specific language governing permissions and limitations under the License. + > + >Code Cracker + > + > Copyright 2014 Giovanni Bassi and Elemar Jr. + > + > Licensed under the Apache License, Version 2.0 (the "License"); you may not use + > these files except in compliance with the License. You may obtain a copy of the + > License at + > + > http://www.apache.org/licenses/LICENSE-2.0 + > + > Unless required by applicable law or agreed to in writing, software distributed + > under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + > CONDITIONS OF ANY KIND, either express or implied. See the License for the + > specific language governing permissions and limitations under the License. + > + >LightJson + > + > Copyright (c) 2017 Marcos López C. + > + > Permission is hereby granted, free of charge, to any person obtaining a copy + > of this software and associated documentation files (the "Software"), to deal + > in the Software without restriction, including without limitation the rights + > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + > copies of the Software, and to permit persons to whom the Software is + > furnished to do so, subject to the following conditions: + > + > The above copyright notice and this permission notice shall be included in + > all copies or substantial portions of the Software. + > + > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + > THE SOFTWARE. + +## XUnit 2.4.1 +* Component Source: https://github.com/xunit/xunit +* Component Copyright and License: + > Copyright (c) .NET Foundation and Contributors + > All Rights Reserved + > + > Licensed under the Apache License, Version 2.0 (the "License"); + > you may not use this file except in compliance with the License. + > You may obtain a copy of the License at + > + > http://www.apache.org/licenses/LICENSE-2.0 + > + > Unless required by applicable law or agreed to in writing, software + > distributed under the License is distributed on an "AS IS" BASIS, + > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + > See the License for the specific language governing permissions and + > limitations under the License. \ No newline at end of file diff --git a/build/.vsts-ci.yml b/build/.vsts-ci.yml new file mode 100644 index 0000000000..59bdf9083f --- /dev/null +++ b/build/.vsts-ci.yml @@ -0,0 +1,20 @@ +# DESCRIPTION: +# Builds, tests and packages the solution for the CI build configuration. + +name: $(SourceBranchName)-$(Date:yyyyMMdd)$(Rev:-r) +variables: + buildConfiguration: 'Release' +jobs: +- job: Windows + pool: + vmImage: 'vs2017-win2016' + steps: + - template: build.yml + +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: build.yml + parameters: + packageArtifacts: false diff --git a/build/.vsts-pr.yml b/build/.vsts-pr.yml new file mode 100644 index 0000000000..5e56502d79 --- /dev/null +++ b/build/.vsts-pr.yml @@ -0,0 +1,20 @@ +# DESCRIPTION: +# Builds, tests and packages the solution for all PR requests. + +name: pr$(system.pullRequest.pullRequestNumber)-$(Date:yyyyMMdd)$(Rev:-r) +variables: + buildConfiguration: 'Release' +jobs: +- job: Windows + pool: + vmImage: 'vs2017-win2016' + steps: + - template: build.yml + +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: build.yml + parameters: + packageArtifacts: false diff --git a/build/build.yml b/build/build.yml new file mode 100644 index 0000000000..e618934aa4 --- /dev/null +++ b/build/build.yml @@ -0,0 +1,21 @@ +parameters: + # Default values + packageArtifacts: true + +steps: +- task: DotNetCoreInstaller@0 + inputs: + version: '2.2.103' + +- script: dotnet build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) /warnaserror + displayName: 'dotnet build $(buildConfiguration)' + +- task: DotNetCoreCLI@2 + displayName: 'dotnet test UnitTests' + inputs: + command: test + projects: '**/*UnitTests/*.csproj' + arguments: '--configuration $(buildConfiguration)' + +- ${{ if eq(parameters.packageArtifacts, 'true') }}: + - template: package.yml diff --git a/build/cibuild.yml b/build/cibuild.yml new file mode 100644 index 0000000000..70df989061 --- /dev/null +++ b/build/cibuild.yml @@ -0,0 +1,35 @@ +parameters: + # Default values + name: Windows + queue: 'Hosted VS2017' + packageArtifacts: true + +jobs: +- job: ${{ parameters.name }} + queue: '${{ parameters.queue }}' + + variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + + steps: + + - task: NuGetToolInstaller@0 + + - task: DotNetCoreInstaller@0 + inputs: + version: '2.2.103' + + - script: dotnet build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) /warnaserror + displayName: 'dotnet build $(buildConfiguration)' + + - task: DotNetCoreCLI@2 + displayName: 'dotnet test UnitTests' + inputs: + command: test + projects: '**/*UnitTests/*.csproj' + arguments: '--configuration $(buildConfiguration)' + + - ${{ if eq(parameters.packageArtifacts, 'true') }}: + - template: package.yml diff --git a/build/package.yml b/build/package.yml new file mode 100644 index 0000000000..828babd81c --- /dev/null +++ b/build/package.yml @@ -0,0 +1,93 @@ +steps: + + # Package web + + - task: DotNetCoreCLI@2 + displayName: 'dotnet publish web' + inputs: + command: publish + projects: '**/Microsoft.Health.Dicom.Web.csproj' + arguments: '--runtime win10-x64 --output $(build.artifactStagingDirectory)/web --configuration $(buildConfiguration) --version-suffix $(build.buildnumber)' + publishWebProjects: false + + - task: DotNetCoreCLI@2 + displayName: 'dotnet publish Integration Tests' + enabled: false + inputs: + command: publish + projects: 'test/**/*.csproj' + arguments: '--version-suffix $(build.buildnumber) -o "$(build.binariesdirectory)/IntegrationTests" --configuration $(buildConfiguration) --no-build' + publishWebProjects: false + zipAfterPublish: false + + # Package nugets + + - task: DotNetCoreCLI@2 + displayName: 'dotnet pack nugets' + inputs: + command: pack + configuration: '$(buildConfiguration)' + packDirectory: '$(build.artifactStagingDirectory)/nupkgs' + versioningScheme: 'byEnvVar' + versionEnvVar: 'nuget_version' + nobuild: true + zipAfterPublish: true + env: + nuget_version: 1.0.0-$(build.buildNumber) + + # Publish artifacts + + - task: PublishBuildArtifacts@1 + displayName: 'publish web artifacts' + inputs: + pathToPublish: '$(build.artifactStagingDirectory)/web' + artifactName: 'deploy' + artifactType: 'container' + + - task: PublishBuildArtifacts@1 + displayName: 'publish samples' + enabled: false + inputs: + pathToPublish: './samples/' + artifactName: 'deploy' + artifactType: 'container' + + - task: PublishBuildArtifacts@1 + displayName: 'publish testauthenvironment.json' + enabled: false + inputs: + pathToPublish: './testauthenvironment.json' + artifactName: 'deploy' + artifactType: 'container' + + - task: PublishBuildArtifacts@1 + displayName: 'publish test configuration jsons' + enabled: false + inputs: + pathToPublish: './test/configuration/' + artifactName: 'deploy' + artifactType: 'container' + + - task: PublishBuildArtifacts@1 + displayName: 'publish release directory' + enabled: false + inputs: + pathToPublish: './release/' + artifactName: 'deploy' + artifactType: 'container' + + - task: PublishBuildArtifacts@1 + displayName: 'publish nuget artifacts' + enabled: false + inputs: + pathtoPublish: '$(build.artifactStagingDirectory)/nupkgs' + artifactName: 'nuget' + publishLocation: 'container' + + - task: PublishBuildArtifacts@1 + displayName: 'publish Integration Tests' + enabled: false + inputs: + pathToPublish: '$(build.binariesdirectory)/IntegrationTests' + artifactName: 'IntegrationTests' + artifactType: 'container' diff --git a/global.json b/global.json new file mode 100644 index 0000000000..6b64107008 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "2.2.103" + } +} diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000000..e0b093be3a --- /dev/null +++ b/nuget.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Health.Dicom.Web/Microsoft.Health.Dicom.Web.csproj b/src/Microsoft.Health.Dicom.Web/Microsoft.Health.Dicom.Web.csproj new file mode 100644 index 0000000000..54e31fd74a --- /dev/null +++ b/src/Microsoft.Health.Dicom.Web/Microsoft.Health.Dicom.Web.csproj @@ -0,0 +1,24 @@ + + + + netcoreapp2.2 + InProcess + true + ..\..\CustomAnalysisRules.ruleset + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Health.Dicom.Web/Program.cs b/src/Microsoft.Health.Dicom.Web/Program.cs new file mode 100644 index 0000000000..d5870e4f13 --- /dev/null +++ b/src/Microsoft.Health.Dicom.Web/Program.cs @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +// ------------------------------------------------------------------------------------------------- + +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; + +namespace Microsoft.Health.Dicom.Web +{ + public static class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/src/Microsoft.Health.Dicom.Web/Properties/launchSettings.json b/src/Microsoft.Health.Dicom.Web/Properties/launchSettings.json new file mode 100644 index 0000000000..72c6385610 --- /dev/null +++ b/src/Microsoft.Health.Dicom.Web/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:63837/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Microsoft.Health.Dicom.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:63838/" + } + } +} \ No newline at end of file diff --git a/src/Microsoft.Health.Dicom.Web/Startup.cs b/src/Microsoft.Health.Dicom.Web/Startup.cs new file mode 100644 index 0000000000..905f7b7c68 --- /dev/null +++ b/src/Microsoft.Health.Dicom.Web/Startup.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +// ------------------------------------------------------------------------------------------------- + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.Health.Dicom.Web +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public virtual void ConfigureServices(IServiceCollection services) + { + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public virtual void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseMvc(); + } + } +} diff --git a/src/Microsoft.Health.Dicom.Web/appsettings.Development.json b/src/Microsoft.Health.Dicom.Web/appsettings.Development.json new file mode 100644 index 0000000000..e203e9407e --- /dev/null +++ b/src/Microsoft.Health.Dicom.Web/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/src/Microsoft.Health.Dicom.Web/appsettings.json b/src/Microsoft.Health.Dicom.Web/appsettings.json new file mode 100644 index 0000000000..def9159a7d --- /dev/null +++ b/src/Microsoft.Health.Dicom.Web/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/stylecop.json b/stylecop.json new file mode 100644 index 0000000000..55761619f2 --- /dev/null +++ b/stylecop.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "documentationRules": { + "companyName": "Microsoft Corporation", + "copyrightText": "-------------------------------------------------------------------------------------------------\nCopyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} License ({licenseName}). See {licenseFile} in the repo root for license information.\n-------------------------------------------------------------------------------------------------", + "variables": { + "licenseName": "MIT", + "licenseFile": "LICENSE" + }, + "xmlHeader": false, + "headerDecoration": "-------------------------------------------------------------------------------------------------" + }, + "orderingRules": { + "systemUsingDirectivesFirst": true, + "usingDirectivesPlacement": "outsideNamespace", + "elementOrder": [ + "kind" + ] + }, + "indentation": { + "useTabs": false, + "indentationSize": 4, + "tabSize": 4 + } + } +}