diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..0f0b6b33
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,345 @@
+# See https://github.com/dotnet/roslyn-analyzers/blob/main/.editorconfig for an example on different settings and how they're used
+
+# Remove the line below if you want to inherit .editorconfig settings from higher directories
+root = true
+
+# Autogenerated string files, don't enforce certain styles on them
+[sr.cs]
+
+dotnet_diagnostic.IDE0005.severity = none
+dotnet_diagnostic.IDE0073.severity = none
+
+# C# files
+[*.cs]
+
+dotnet_analyzer_diagnostic.severity = error
+
+# Errors flagged when this file was added. These should be
+# investigated and either fixed or marked as acceptable with
+# a reason why
+dotnet_diagnostic.IDE0018.severity = none
+dotnet_diagnostic.CA1829.severity = none
+dotnet_diagnostic.CA1806.severity = none
+dotnet_diagnostic.IDE0078.severity = none
+dotnet_diagnostic.IDE0019.severity = none
+dotnet_diagnostic.CA1309.severity = none
+dotnet_diagnostic.CA2249.severity = none
+dotnet_diagnostic.CA2251.severity = none
+dotnet_diagnostic.CA1310.severity = none
+dotnet_diagnostic.CA1305.severity = none
+dotnet_diagnostic.CA1707.severity = none
+dotnet_diagnostic.IDE0009.severity = none
+dotnet_diagnostic.IDE0045.severity = none
+dotnet_diagnostic.CA1304.severity = none
+dotnet_diagnostic.IDE0002.severity = none
+dotnet_diagnostic.CA2208.severity = none
+dotnet_diagnostic.IDE0090.severity = none
+dotnet_diagnostic.IDE0047.severity = none
+dotnet_diagnostic.IDE0051.severity = none
+dotnet_diagnostic.IDE1000.severity = none
+dotnet_diagnostic.CA1834.severity = none
+dotnet_diagnostic.IDE0066.severity = none
+dotnet_diagnostic.IDE0007.severity = none
+dotnet_diagnostic.IDE0008.severity = none
+dotnet_diagnostic.IDE0055.severity = none
+dotnet_diagnostic.IDE0044.severity = none
+dotnet_diagnostic.IDE0057.severity = none
+dotnet_diagnostic.CA2101.severity = none
+dotnet_diagnostic.CA1068.severity = none
+dotnet_diagnostic.CA1069.severity = none
+dotnet_diagnostic.IDE0059.severity = none
+dotnet_diagnostic.CA1010.severity = none
+dotnet_diagnostic.CA1001.severity = none
+dotnet_diagnostic.CA1036.severity = none
+dotnet_diagnostic.CA5369.severity = none
+dotnet_diagnostic.CA2245.severity = none
+dotnet_diagnostic.CA1507.severity = none
+dotnet_diagnostic.CA1845.severity = none
+dotnet_diagnostic.IDE0025.severity = none
+dotnet_diagnostic.xUnit2000.severity = none
+dotnet_diagnostic.xUnit2012.severity = none
+dotnet_diagnostic.xUnit1013.severity = none
+dotnet_diagnostic.CA1711.severity = none
+dotnet_diagnostic.IDE0027.severity = none
+dotnet_diagnostic.IDE0021.severity = none
+dotnet_diagnostic.CA1822.severity = none
+dotnet_diagnostic.CA2201.severity = none
+dotnet_diagnostic.CA1051.severity = none
+dotnet_diagnostic.IDE0004.severity = none
+dotnet_diagnostic.CA1838.severity = none
+dotnet_diagnostic.IDE0075.severity = none
+dotnet_diagnostic.CA1825.severity = none
+dotnet_diagnostic.CA1816.severity = none
+dotnet_diagnostic.CA1827.severity = none
+dotnet_diagnostic.CA1720.severity = none
+dotnet_diagnostic.CA1805.severity = none
+dotnet_diagnostic.CA1725.severity = none
+dotnet_diagnostic.CA2231.severity = none
+dotnet_diagnostic.CA2016.severity = none
+dotnet_diagnostic.CA1826.severity = none
+dotnet_diagnostic.CA1835.severity = none
+dotnet_diagnostic.CA1716.severity = none
+dotnet_diagnostic.CA1708.severity = none
+dotnet_diagnostic.CA1000.severity = none
+dotnet_diagnostic.CA2211.severity = none
+dotnet_diagnostic.CA1041.severity = none
+dotnet_diagnostic.CA1715.severity = none
+dotnet_diagnostic.IDE1006.severity = none
+dotnet_diagnostic.CA1846.severity = none
+dotnet_diagnostic.CA1847.severity = none
+dotnet_diagnostic.CA1018.severity = none
+dotnet_diagnostic.IDE0100.severity = none
+dotnet_diagnostic.IDE0022.severity = none
+dotnet_diagnostic.CA1841.severity = none
+dotnet_diagnostic.CA2241.severity = none
+dotnet_diagnostic.CA1436.severity = none
+dotnet_diagnostic.CA2200.severity = none
+dotnet_diagnostic.CA1836.severity = none
+dotnet_diagnostic.IDE0028.severity = none
+dotnet_diagnostic.IDE0032.severity = none
+dotnet_diagnostic.IDE0065.severity = none
+dotnet_diagnostic.IDE0120.severity = none
+dotnet_diagnostic.IDE0130.severity = none
+dotnet_diagnostic.IDE0017.severity = none
+dotnet_diagnostic.IDE0010.severity = none
+dotnet_diagnostic.IDE0052.severity = none
+dotnet_diagnostic.IDE1005.severity = none
+dotnet_diagnostic.IDE0040.severity = none
+dotnet_diagnostic.IDE0034.severity = none
+dotnet_diagnostic.IDE0063.severity = none
+dotnet_diagnostic.IDE0049.severity = none
+dotnet_diagnostic.IDE0001.severity = none
+dotnet_diagnostic.IDE0039.severity = none
+dotnet_diagnostic.IDE0054.severity = none
+dotnet_diagnostic.IDE0060.severity = none
+dotnet_diagnostic.IDE0048.severity = none
+dotnet_diagnostic.IDE0030.severity = none
+dotnet_diagnostic.IDE0031.severity = none
+dotnet_diagnostic.IDE0016.severity = none
+dotnet_diagnostic.IDE0036.severity = none
+dotnet_diagnostic.IDE0029.severity = none
+dotnet_diagnostic.IDE0076.severity = none
+dotnet_diagnostic.IDE0070.severity = none
+dotnet_diagnostic.IDE0011.severity = none
+dotnet_diagnostic.IDE0056.severity = none
+dotnet_diagnostic.IDE0082.severity = none
+dotnet_diagnostic.IDE0071.severity = none
+dotnet_diagnostic.IDE0083.severity = none
+dotnet_diagnostic.IDE0041.severity = none
+dotnet_diagnostic.IDE0150.severity = none
+dotnet_diagnostic.IDE0020.severity = none
+dotnet_diagnostic.IDE0061.severity = none
+dotnet_diagnostic.IDE0062.severity = none
+
+#### Core EditorConfig Options ####
+
+# Indentation and spacing
+indent_size = 4
+indent_style = space
+tab_width = 4
+
+# New line preferences
+insert_final_newline = false
+
+#### .NET Coding Conventions ####
+
+# Organize usings
+dotnet_separate_import_directive_groups = false
+dotnet_sort_system_directives_first = true
+file_header_template = \nCopyright (c) Microsoft. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for full license information.\n
+
+# this. and Me. preferences
+dotnet_style_qualification_for_event = true
+dotnet_style_qualification_for_field = true
+dotnet_style_qualification_for_method = true
+dotnet_style_qualification_for_property = true
+
+# Language keywords vs BCL types preferences
+dotnet_style_predefined_type_for_locals_parameters_members = true
+dotnet_style_predefined_type_for_member_access = true
+
+# Parentheses preferences
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
+
+# Modifier preferences
+dotnet_style_require_accessibility_modifiers = for_non_interface_members
+
+# Expression-level preferences
+dotnet_style_coalesce_expression = true
+dotnet_style_collection_initializer = true
+dotnet_style_explicit_tuple_names = true
+dotnet_style_namespace_match_folder = true
+dotnet_style_null_propagation = true
+dotnet_style_object_initializer = true
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+dotnet_style_prefer_auto_properties = true
+dotnet_style_prefer_compound_assignment = true
+dotnet_style_prefer_conditional_expression_over_assignment = true
+dotnet_style_prefer_conditional_expression_over_return = false
+dotnet_style_prefer_inferred_anonymous_type_member_names = true
+dotnet_style_prefer_inferred_tuple_names = true
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true
+dotnet_style_prefer_simplified_boolean_expressions = true
+dotnet_style_prefer_simplified_interpolation = true
+
+# Field preferences
+dotnet_style_readonly_field = true
+
+# Parameter preferences
+dotnet_code_quality_unused_parameters = all : error
+
+# Suppression preferences
+dotnet_remove_unnecessary_suppression_exclusions = none
+
+# New line preferences
+dotnet_style_allow_multiple_blank_lines_experimental = true
+dotnet_style_allow_statement_immediately_after_block_experimental = true
+
+#### C# Coding Conventions ####
+
+# var preferences
+csharp_style_var_elsewhere = false
+csharp_style_var_for_built_in_types = false
+csharp_style_var_when_type_is_apparent = true
+
+# Expression-bodied members
+csharp_style_expression_bodied_accessors = true
+csharp_style_expression_bodied_constructors = false
+csharp_style_expression_bodied_indexers = true
+csharp_style_expression_bodied_lambdas = true
+csharp_style_expression_bodied_local_functions = false
+csharp_style_expression_bodied_methods = false
+csharp_style_expression_bodied_operators = false
+csharp_style_expression_bodied_properties = true
+
+# Pattern matching preferences
+csharp_style_pattern_matching_over_as_with_null_check = true
+csharp_style_pattern_matching_over_is_with_cast_check = true
+csharp_style_prefer_not_pattern = true
+csharp_style_prefer_pattern_matching = true
+csharp_style_prefer_switch_expression = true
+
+# Null-checking preferences
+csharp_style_conditional_delegate_call = true
+
+# Modifier preferences
+csharp_prefer_static_local_function = true
+csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
+
+# Code-block preferences
+csharp_prefer_braces = true
+csharp_prefer_simple_using_statement = true
+
+# Expression-level preferences
+csharp_prefer_simple_default_expression = true
+csharp_style_deconstructed_variable_declaration = true
+csharp_style_implicit_object_creation_when_type_is_apparent = true
+csharp_style_inlined_variable_declaration = true
+csharp_style_pattern_local_over_anonymous_function = true
+csharp_style_prefer_index_operator = true
+csharp_style_prefer_range_operator = true
+csharp_style_throw_expression = true
+csharp_style_unused_value_assignment_preference = discard_variable
+# Disable IDE0058 since it causes a lot of noise/suppressions which doesn't seem worth it to have currently
+dotnet_diagnostic.IDE0058.severity = silent
+# csharp_style_unused_value_expression_statement_preference = discard_variable
+
+# 'using' directive preferences
+csharp_using_directive_placement = outside_namespace
+
+# New line preferences
+csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
+csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
+csharp_style_allow_embedded_statements_on_same_line_experimental = true
+
+#### C# Formatting Rules ####
+
+# New line preferences
+csharp_new_line_before_catch = true
+csharp_new_line_before_else = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_open_brace = all
+csharp_new_line_between_query_expression_clauses = true
+
+# Indentation preferences
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_case_contents_when_block = true
+csharp_indent_labels = one_less_than_current
+csharp_indent_switch_labels = true
+
+# 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 = false
+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 preferences
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = true
+
+#### Naming styles ####
+
+# Naming rules
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# Symbol specifications
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.interface.required_modifiers =
+
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.types.required_modifiers =
+
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.non_field_members.required_modifiers =
+
+# Naming styles
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+dotnet_naming_style.begins_with_i.required_suffix =
+dotnet_naming_style.begins_with_i.word_separator =
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
diff --git a/Directory.Build.props b/Directory.Build.props
index 0bbd4acb..64931656 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,5 +9,6 @@
net6.0net6.0win-x64;win-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;osx-x64;linux-x64
+ true
diff --git a/build.cake b/build.cake
index 2628b995..00741346 100644
--- a/build.cake
+++ b/build.cake
@@ -230,7 +230,7 @@ Task("BuildTest")
StandardOutputWriter = logWriter,
StandardErrorWriter = logWriter
})
- .ExceptionOnError($"Building test {project} failed for {framework}.");
+ .ExceptionOnError($"Building test {project} failed for {framework}. See {logPath} for more details.");
}
}
diff --git a/src/Microsoft.InsightsGenerator/SigGen.cs b/src/Microsoft.InsightsGenerator/SigGen.cs
index b3954712..7402b432 100644
--- a/src/Microsoft.InsightsGenerator/SigGen.cs
+++ b/src/Microsoft.InsightsGenerator/SigGen.cs
@@ -1,9 +1,11 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Linq;
-using System.Net.Sockets;
-using System.Globalization;
namespace Microsoft.InsightsGenerator
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/CancelTokenKey.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/CancelTokenKey.cs
index 5b046ad4..31cd987b 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/CancelTokenKey.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/CancelTokenKey.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/ConnectionManager.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/ConnectionManager.cs
index ec477935..5e271e37 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/ConnectionManager.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/ConnectionManager.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System.Collections.Concurrent;
using System.Composition;
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenParams.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenParams.cs
index 6aae20f0..9ecc5a31 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenParams.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenParams.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.Connection.Contracts
{
public class RequestSecurityTokenParams
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenResponse.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenResponse.cs
index c332beea..1e96a90b 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenResponse.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/RequestSecurityTokenResponse.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.Connection.Contracts
{
public class RequestSecurityTokenResponse
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs
index a7c99316..eef73be6 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
namespace Microsoft.Kusto.ServiceLayer.Connection.Contracts
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionManager.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionManager.cs
index fdcdfd5b..3994278e 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionManager.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionManager.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.Connection
{
public interface IConnectionManager
diff --git a/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionService.cs b/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionService.cs
index 419621c7..587b9b96 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionService.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Connection/IConnectionService.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System.Threading.Tasks;
using Microsoft.Kusto.ServiceLayer.Connection.Contracts;
using Microsoft.Kusto.ServiceLayer.LanguageServices;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Contracts/DataSourceConnectionDetails.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Contracts/DataSourceConnectionDetails.cs
index bb87987e..69a6bd4f 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Contracts/DataSourceConnectionDetails.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Contracts/DataSourceConnectionDetails.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Contracts
{
public class DataSourceConnectionDetails
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataReaderWrapper.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataReaderWrapper.cs
index 3b508343..3ec3a6eb 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataReaderWrapper.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataReaderWrapper.cs
@@ -1,6 +1,8 @@
-//
-// Copyright (c) Microsoft. All Rights Reserved.
-//
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Data;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceBase.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceBase.cs
index 26bb1762..f88a66ac 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceBase.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceBase.cs
@@ -1,6 +1,7 @@
-//
-// Copyright (c) Microsoft. All Rights Reserved.
-//
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceFactory.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceFactory.cs
index 0683211d..3a3e337c 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceFactory.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceFactory.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Composition;
using Kusto.Data;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceType.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceType.cs
index 2688211d..c5789020 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceType.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/DataSourceType.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource
{
///
/// Represents the type of a data source.
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/DiagnosticsInfo.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/DiagnosticsInfo.cs
index 2a567a20..c395f94f 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/DiagnosticsInfo.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/DiagnosticsInfo.cs
@@ -1,4 +1,9 @@
-using System.Collections.Generic;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System.Collections.Generic;
namespace Microsoft.Kusto.ServiceLayer.DataSource
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSource.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSource.cs
index fe95e70b..65fd3337 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSource.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSource.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Data;
using System.Threading;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSourceFactory.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSourceFactory.cs
index 978f1ef4..aa8d2fe2 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSourceFactory.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/IDataSourceFactory.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using Microsoft.Kusto.ServiceLayer.Connection.Contracts;
namespace Microsoft.Kusto.ServiceLayer.DataSource
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/IntellisenseClientBase.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/IntellisenseClientBase.cs
index 7108a2b7..14f29d20 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/IntellisenseClientBase.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/IntellisenseClientBase.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabaseSchemaResult.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabaseSchemaResult.cs
index 6aecafc4..2a162ce0 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabaseSchemaResult.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabaseSchemaResult.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Intellisense
{
public class ShowDatabaseSchemaResult
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabasesResult.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabasesResult.cs
index 75813c67..34d4ea6a 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabasesResult.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowDatabasesResult.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Intellisense
{
public class ShowDatabasesResult
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowFunctionsResult.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowFunctionsResult.cs
index 72961ec4..de7a7c89 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowFunctionsResult.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Intellisense/ShowFunctionsResult.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Intellisense
{
public class ShowFunctionsResult
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/IKustoClient.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/IKustoClient.cs
index 2cd2245f..3cb37d12 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/IKustoClient.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/IKustoClient.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System.Collections.Generic;
using System.Data;
using System.Threading;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoClient.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoClient.cs
index e9c34ce6..660937b5 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoClient.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoClient.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Generic;
using System.Data;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoDataSource.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoDataSource.cs
index 4bfc29e1..65e05c37 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoDataSource.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoDataSource.cs
@@ -1,6 +1,7 @@
-//
-// Copyright (c) Microsoft. All Rights Reserved.
-//
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Concurrent;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoIntellisenseClient.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoIntellisenseClient.cs
index 38f9007d..7afeb25b 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoIntellisenseClient.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoIntellisenseClient.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoResultsReader.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoResultsReader.cs
index e775692b..395936c3 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoResultsReader.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Kusto/KustoResultsReader.cs
@@ -1,4 +1,9 @@
-using System.Collections.Generic;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System.Collections.Generic;
using System.Data;
namespace Microsoft.Kusto.ServiceLayer.DataSource.Kusto
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoQueryUtils.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoQueryUtils.cs
index a7d8da6e..2a8e30fa 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoQueryUtils.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoQueryUtils.cs
@@ -1,6 +1,8 @@
-//
-// Copyright (c) Microsoft. All Rights Reserved.
-//
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/ColumnMetadata.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/ColumnMetadata.cs
index 183e9d1f..17addfb7 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/ColumnMetadata.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/ColumnMetadata.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
///
/// Column metadata information
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceMetadataType.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceMetadataType.cs
index 097b0974..dcf4fa33 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceMetadataType.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceMetadataType.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
///
/// Metadata type enumeration
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceObjectMetadata.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceObjectMetadata.cs
index 91be060f..f50055c4 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceObjectMetadata.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DataSourceObjectMetadata.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
///
/// Object metadata information
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DatabaseMetadata.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DatabaseMetadata.cs
index 83bfaea6..2a1b90a0 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DatabaseMetadata.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/DatabaseMetadata.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
///
/// Database metadata information
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FolderMetadata.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FolderMetadata.cs
index eabde584..2075ef1e 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FolderMetadata.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FolderMetadata.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
///
/// Folder metadata information
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FunctionMetadata.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FunctionMetadata.cs
index f0134cf4..855aa73b 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FunctionMetadata.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/FunctionMetadata.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
public class FunctionMetadata : DatabaseMetadata
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/MetadataFactory.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/MetadataFactory.cs
index c4897aa5..a30adeb1 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/MetadataFactory.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/MetadataFactory.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Kusto.ServiceLayer.Admin.Contracts;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/TableMetadata.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/TableMetadata.cs
index 578e35cb..bfaff6db 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/TableMetadata.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Metadata/TableMetadata.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Metadata
{
///
/// Database metadata information
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/ColumnInfo.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/ColumnInfo.cs
index 01514f42..e798559e 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/ColumnInfo.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/ColumnInfo.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Models
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Models
{
public class ColumnInfo
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/FunctionInfo.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/FunctionInfo.cs
index 9db9096a..aa633282 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/FunctionInfo.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/FunctionInfo.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Models
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Models
{
public class FunctionInfo
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/TableInfo.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/TableInfo.cs
index ad1c51f2..441a48d4 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/TableInfo.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Models/TableInfo.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.Kusto.ServiceLayer.DataSource.Models
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.Kusto.ServiceLayer.DataSource.Models
{
public class TableInfo
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorClient.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorClient.cs
index 300f095b..9e1ab835 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorClient.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorClient.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Net.Http;
using System.Net.Http.Headers;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorDataSource.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorDataSource.cs
index c2f88418..87b94384 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorDataSource.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorDataSource.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Generic;
using System.Data;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorExtensions.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorExtensions.cs
index 15de0d56..0ad6f97f 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorExtensions.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorExtensions.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Data;
using System.Linq;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorIntellisenseClient.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorIntellisenseClient.cs
index 664a6e94..e20336cf 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorIntellisenseClient.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/MonitorIntellisenseClient.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System.Collections.Generic;
using System.Linq;
using Kusto.Language;
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/ColumnsModel.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/ColumnsModel.cs
index 76edbf26..6fa097cf 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/ColumnsModel.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/ColumnsModel.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Monitor.Responses.Models
{
public class ColumnsModel
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TableGroupsModel.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TableGroupsModel.cs
index 3a370d4e..63db74fa 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TableGroupsModel.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TableGroupsModel.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Monitor.Responses.Models
{
public class TableGroupsModel
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TablesModel.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TablesModel.cs
index c4e671be..36518099 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TablesModel.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/TablesModel.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Monitor.Responses.Models
{
public class TablesModel
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/WorkspacesModel.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/WorkspacesModel.cs
index 82d84909..b7253768 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/WorkspacesModel.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/Models/WorkspacesModel.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
namespace Microsoft.Kusto.ServiceLayer.DataSource.Monitor.Responses.Models
{
public class WorkspacesModel
diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/WorkspaceResponse.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/WorkspaceResponse.cs
index fac43ac2..5cf8df33 100644
--- a/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/WorkspaceResponse.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/Monitor/Responses/WorkspaceResponse.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using Microsoft.Kusto.ServiceLayer.DataSource.Monitor.Responses.Models;
namespace Microsoft.Kusto.ServiceLayer.DataSource.Monitor.Responses
diff --git a/src/Microsoft.Kusto.ServiceLayer/HostLoader.cs b/src/Microsoft.Kusto.ServiceLayer/HostLoader.cs
index e92d8dfa..8b08e85c 100644
--- a/src/Microsoft.Kusto.ServiceLayer/HostLoader.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/HostLoader.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Threading.Tasks;
diff --git a/src/Microsoft.Kusto.ServiceLayer/LanguageServices/IConnectedBindingQueue.cs b/src/Microsoft.Kusto.ServiceLayer/LanguageServices/IConnectedBindingQueue.cs
index 99b18950..5f462eaf 100644
--- a/src/Microsoft.Kusto.ServiceLayer/LanguageServices/IConnectedBindingQueue.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/LanguageServices/IConnectedBindingQueue.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Threading;
using Microsoft.Kusto.ServiceLayer.Connection;
diff --git a/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ObjectExplorerSession.cs b/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ObjectExplorerSession.cs
index b0f510b7..c6238825 100644
--- a/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ObjectExplorerSession.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ObjectExplorerSession.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using Microsoft.Kusto.ServiceLayer.Connection;
using Microsoft.Kusto.ServiceLayer.Connection.Contracts;
using Microsoft.Kusto.ServiceLayer.DataSource;
diff --git a/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ValidForFlag.cs b/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ValidForFlag.cs
index 0d6f39e6..220a11df 100644
--- a/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ValidForFlag.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/ObjectExplorer/ValidForFlag.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
diff --git a/src/Microsoft.Kusto.ServiceLayer/Program.cs b/src/Microsoft.Kusto.ServiceLayer/Program.cs
index 9eda3d4a..a8cb8fda 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Program.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Program.cs
@@ -1,6 +1,8 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using Microsoft.SqlTools.ServiceLayer.SqlContext;
using Microsoft.Kusto.ServiceLayer.Utility;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Batch.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Batch.cs
index 9950a28d..da117d50 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Batch.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Batch.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/DbColumnWrapper.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/DbColumnWrapper.cs
index 0944c95e..35c4c34a 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/DbColumnWrapper.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/DbColumnWrapper.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/BatchEvents.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/BatchEvents.cs
index db0e0234..988947ef 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/BatchEvents.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/BatchEvents.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ExecuteRequestResult.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ExecuteRequestResult.cs
index 628df5ab..b3a1b90a 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ExecuteRequestResult.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ExecuteRequestResult.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.Kusto.ServiceLayer.QueryExecution.Contracts.ExecuteRequests
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ResultSetEvents.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ResultSetEvents.cs
index 6f0f81da..0d62961d 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ResultSetEvents.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecuteRequests/ResultSetEvents.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecutionPlanOptions.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecutionPlanOptions.cs
index 2bd3aa1b..39fe7455 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecutionPlanOptions.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/ExecutionPlanOptions.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.Kusto.ServiceLayer.QueryExecution.Contracts
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/SelectionData.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/SelectionData.cs
index f8beb500..55f96ade 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/SelectionData.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/Contracts/SelectionData.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.Kusto.ServiceLayer.Workspace.Contracts;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultOnlyContext.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultOnlyContext.cs
index 8ac0ecb2..09f2cb1e 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultOnlyContext.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultOnlyContext.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.Hosting.Protocol;
using System.Threading.Tasks;
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultSet.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultSet.cs
index 5af04b95..478475af 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultSet.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/ResultSet.cs
@@ -1,5 +1,4 @@
-//
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/SpecialAction.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/SpecialAction.cs
index 0fe7df0f..3e618bb2 100644
--- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/SpecialAction.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/SpecialAction.cs
@@ -1,6 +1,8 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
namespace Microsoft.Kusto.ServiceLayer.QueryExecution
diff --git a/src/Microsoft.Kusto.ServiceLayer/Scripting/IScripter.cs b/src/Microsoft.Kusto.ServiceLayer/Scripting/IScripter.cs
index 04f339a2..3422c071 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Scripting/IScripter.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Scripting/IScripter.cs
@@ -1,4 +1,9 @@
-using Microsoft.Kusto.ServiceLayer.DataSource;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using Microsoft.Kusto.ServiceLayer.DataSource;
using Microsoft.Kusto.ServiceLayer.Scripting.Contracts;
using Microsoft.SqlServer.Management.Sdk.Sfc;
diff --git a/src/Microsoft.Kusto.ServiceLayer/Utility/AccessTokenProvider.cs b/src/Microsoft.Kusto.ServiceLayer/Utility/AccessTokenProvider.cs
index 3d20fda2..36e127b6 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Utility/AccessTokenProvider.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Utility/AccessTokenProvider.cs
@@ -1,4 +1,9 @@
-using Microsoft.SqlServer.Dac;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using Microsoft.SqlServer.Dac;
using System;
namespace Microsoft.Kusto.ServiceLayer.Utility
diff --git a/src/Microsoft.Kusto.ServiceLayer/Utility/ServiceLayerCommandOptions.cs b/src/Microsoft.Kusto.ServiceLayer/Utility/ServiceLayerCommandOptions.cs
index af9aef8c..6ac02c70 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Utility/ServiceLayerCommandOptions.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Utility/ServiceLayerCommandOptions.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Globalization;
using Microsoft.SqlTools.Hosting.Utility;
diff --git a/src/Microsoft.Kusto.ServiceLayer/Utility/SystemExtensions.cs b/src/Microsoft.Kusto.ServiceLayer/Utility/SystemExtensions.cs
index 47931c22..ce64f293 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Utility/SystemExtensions.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Utility/SystemExtensions.cs
@@ -1,6 +1,7 @@
-//
-// Copyright (c) Microsoft. All Rights Reserved.
-//
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.Kusto.ServiceLayer.Utility
{
diff --git a/src/Microsoft.Kusto.ServiceLayer/Utility/ValidationUtils.cs b/src/Microsoft.Kusto.ServiceLayer/Utility/ValidationUtils.cs
index 9efec38d..828bdc0c 100644
--- a/src/Microsoft.Kusto.ServiceLayer/Utility/ValidationUtils.cs
+++ b/src/Microsoft.Kusto.ServiceLayer/Utility/ValidationUtils.cs
@@ -1,6 +1,7 @@
-//
-// Copyright (c) Microsoft. All Rights Reserved.
-//
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.Kusto.ServiceLayer.Utility
{
diff --git a/src/Microsoft.SqlTools.Credentials/.editorconfig b/src/Microsoft.SqlTools.Credentials/.editorconfig
new file mode 100644
index 00000000..64c0454f
--- /dev/null
+++ b/src/Microsoft.SqlTools.Credentials/.editorconfig
@@ -0,0 +1,15 @@
+# See https://github.com/dotnet/roslyn-analyzers/blob/main/.editorconfig for an example on different settings and how they're used
+
+# Disable checking for correct header for this project - most of the code is borrowed from other projects
+# which have different style guidelines
+[*.cs]
+
+dotnet_diagnostic.IDE0073.severity = none
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = false
\ No newline at end of file
diff --git a/src/Microsoft.SqlTools.Hosting/Utility/AutoLock.cs b/src/Microsoft.SqlTools.Hosting/Utility/AutoLock.cs
index 06dff105..285ce502 100644
--- a/src/Microsoft.SqlTools.Hosting/Utility/AutoLock.cs
+++ b/src/Microsoft.SqlTools.Hosting/Utility/AutoLock.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Threading;
diff --git a/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs b/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs
index aace98f3..006b260c 100644
--- a/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs
+++ b/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchDefinition.cs b/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchDefinition.cs
index f2d46c33..e675f426 100644
--- a/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchDefinition.cs
+++ b/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchDefinition.cs
@@ -1,6 +1,7 @@
-//
+//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAccountManager.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAccountManager.cs
index f35eb926..edb05473 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAccountManager.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAccountManager.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Threading.Tasks;
@@ -9,11 +10,11 @@ using Microsoft.SqlTools.ResourceProvider.Core.Extensibility;
namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
///
- /// An account manager has the information of currently logged in user and can authenticate the user
+ /// An account manager has the information of currently logged in user and can authenticate the user
/// Implementing classes must add a
/// to the class in order to be found by the extension manager,
/// and to define the type and category supported
- ///
+ ///
public interface IAccountManager : IExportable
{
///
@@ -46,7 +47,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
///
bool HasLoginDialog
{
- get;
+ get;
}
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureAuthenticationManager.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureAuthenticationManager.cs
index ed18238b..3be1b284 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureAuthenticationManager.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureAuthenticationManager.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Collections.Generic;
using System.Threading.Tasks;
@@ -8,7 +9,7 @@ using System.Threading.Tasks;
namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
///
- /// Provides functionality to authenticate to Azure and discover associated accounts and subscriptions
+ /// Provides functionality to authenticate to Azure and discover associated accounts and subscriptions
///
public interface IAzureAuthenticationManager : IAccountManager
{
@@ -38,6 +39,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
///
/// Stores the selected subscriptions given the ids
///
- Task SetSelectedSubscriptionsAsync(IEnumerable subscriptionIds);
+ Task SetSelectedSubscriptionsAsync(IEnumerable subscriptionIds);
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionContext.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionContext.cs
index 2384edcc..71d3ce7e 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionContext.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionContext.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionIdentifier.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionIdentifier.cs
index 2fcb8056..1fb026d6 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionIdentifier.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureSubscriptionIdentifier.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
@@ -30,6 +31,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
string SubscriptionId
{
get;
- }
+ }
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureTenant.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureTenant.cs
index 917edcc7..b20d2f4e 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureTenant.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureTenant.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
@@ -16,7 +17,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
get;
}
-
+
///
/// Display ID
///
@@ -24,6 +25,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
get;
}
-
+
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccount.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccount.cs
index eeebd9cc..ccd256d4 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccount.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccount.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountDisplayInfo.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountDisplayInfo.cs
index d6dfab5d..d8924602 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountDisplayInfo.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountDisplayInfo.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountSubscriptionContext.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountSubscriptionContext.cs
index 588096a0..166ab5b5 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountSubscriptionContext.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureUserAccountSubscriptionContext.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
@@ -18,6 +19,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
IAzureUserAccount UserAccount
{
get;
- }
+ }
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IUserAccount.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IUserAccount.cs
index c1c5e497..93038f1e 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IUserAccount.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IUserAccount.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
@@ -16,7 +17,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
get;
}
-
+
///
/// Returns true if user needs reauthentication
///
@@ -24,6 +25,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
get;
}
-
+
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/AuthenticationService.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/AuthenticationService.cs
index 5d6e1c31..a17fcd01 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/AuthenticationService.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/AuthenticationService.cs
@@ -30,12 +30,12 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
public AuthenticationService()
{
}
-
+
public override void InitializeService(IProtocolEndpoint serviceHost)
{
Logger.Write(TraceEventType.Verbose, "AuthenticationService initialized");
}
-
+
public async Task SetCurrentAccountAsync(Account account, Dictionary securityTokenMappings)
{
var authManager = ServiceProvider.GetService();
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/CommonUtil.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/CommonUtil.cs
index f090c87b..cbdddf10 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/CommonUtil.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/CommonUtil.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
@@ -13,7 +14,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
public static class CommonUtil
{
- private const int KeyValueNameLength = 1024; // 1024 should be enough for registry key value name.
+ private const int KeyValueNameLength = 1024; // 1024 should be enough for registry key value name.
//********************************************************************************************
///
@@ -44,7 +45,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
//********************************************************************************************
///
- /// Throw an exception if a string is null or empty.
+ /// Throw an exception if a string is null or empty.
///
/// string to check
/// the variable or parameter name to display
@@ -97,6 +98,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
return message;
}
-
+
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ConnectionConstants.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ConnectionConstants.cs
index 478ae03f..edccc1e1 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ConnectionConstants.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ConnectionConstants.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExceptionUtil.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExceptionUtil.cs
index 7bb250d7..ad6739c8 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExceptionUtil.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExceptionUtil.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Data.Common;
@@ -18,7 +19,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// Returns true if given exception if any of the inner exceptions is UserNeedsAuthenticationException
///
internal static bool IsUserNeedsReauthenticateException(this Exception ex)
- {
+ {
return ex.IsExceptionType(typeof(UserNeedsAuthenticationException));
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExpiredTokenException.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExpiredTokenException.cs
index c9e760c9..7c6f5d83 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExpiredTokenException.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ExpiredTokenException.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Runtime.Serialization;
@@ -8,7 +9,7 @@ using System.Runtime.Serialization;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// The exception is used if any operation fails as a request failed due to an expired token
+ /// The exception is used if any operation fails as a request failed due to an expired token
///
public class ExpiredTokenException : ServiceExceptionBase
{
@@ -29,11 +30,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
///
- /// Initializes a new instance of the ServiceFailedException class with a specified error message
+ /// Initializes a new instance of the ServiceFailedException class with a specified error message
/// and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public ExpiredTokenException(string message, Exception innerException)
: base(message, innerException)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceExceptionBase.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceExceptionBase.cs
index 7640c8b2..0b3bc40d 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceExceptionBase.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceExceptionBase.cs
@@ -35,11 +35,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
/// The error message that explains the reason for the exception.
/// The Http error code.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public ServiceExceptionBase(string message, HttpStatusCode httpStatusCode, Exception innerException = null)
: this(message, (int)httpStatusCode, innerException)
- {
+ {
}
///
@@ -47,7 +47,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
/// The error message that explains the reason for the exception.
/// The Http error code.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public ServiceExceptionBase(string message, int httpStatusCode, Exception innerException)
: base(message, innerException)
@@ -57,11 +57,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
///
- /// Initializes a new instance of the AuthenticationFailedException class with a specified error message
+ /// Initializes a new instance of the AuthenticationFailedException class with a specified error message
/// and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
protected ServiceExceptionBase(string message, Exception innerException)
: base(message, innerException)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceFailedException.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceFailedException.cs
index bbe98c7b..f5333020 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceFailedException.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/ServiceFailedException.cs
@@ -32,11 +32,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
///
- /// Initializes a new instance of the ServiceFailedException class with a specified error message
+ /// Initializes a new instance of the ServiceFailedException class with a specified error message
/// and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public ServiceFailedException(string message, Exception innerException)
: base(message, innerException)
@@ -54,13 +54,13 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
///
- /// Creates a new instance of ServiceFailedException by adding the server definition info to the given message
+ /// Creates a new instance of ServiceFailedException by adding the server definition info to the given message
///
internal static ServiceFailedException CreateException(string message, ServerDefinition serverDefinition, Exception innerException)
{
return new ServiceFailedException(
- string.Format(CultureInfo.CurrentCulture, message,
- serverDefinition != null ? serverDefinition.ServerType : string.Empty,
+ string.Format(CultureInfo.CurrentCulture, message,
+ serverDefinition != null ? serverDefinition.ServerType : string.Empty,
serverDefinition != null ? serverDefinition.Category : string.Empty), innerException);
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/UserNeedsAuthenticationException.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/UserNeedsAuthenticationException.cs
index a3049e73..5feb43d8 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Common/UserNeedsAuthenticationException.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Common/UserNeedsAuthenticationException.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Runtime.Serialization;
@@ -8,7 +9,7 @@ using System.Runtime.Serialization;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// The exception is used if any operation fails becauase user needs to reauthenticate
+ /// The exception is used if any operation fails becauase user needs to reauthenticate
///
public class UserNeedsAuthenticationException : ServiceExceptionBase
{
@@ -29,11 +30,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
///
- /// Initializes a new instance of the ServiceFailedException class with a specified error message
+ /// Initializes a new instance of the ServiceFailedException class with a specified error message
/// and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public UserNeedsAuthenticationException(string message, Exception innerException)
: base(message, innerException)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/Account.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/Account.cs
index 1f0a4312..a1efd40b 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/Account.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/Account.cs
@@ -68,13 +68,13 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Contracts
public class ProviderSettings
{
///
- /// Display name of the provider
+ /// Display name of the provider
///
public string DisplayName;
///
/// ID of the provider
- ///
+ ///
public string Id;
///
/// Settings for the provider itself
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/FirewallRule.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/FirewallRule.cs
index bebb4731..9e2557cf 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/FirewallRule.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Contracts/FirewallRule.cs
@@ -28,7 +28,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Contracts
///
public Account Account { get; set; }
///
- /// Per-tenant token mappings. Ideally would be set independently of this call, but for
+ /// Per-tenant token mappings. Ideally would be set independently of this call, but for
/// now this allows us to get the tokens necessary to find a server and open a firewall rule
///
public Dictionary SecurityTokenMappings { get; set; }
@@ -47,7 +47,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Contracts
/// End of the IP address range
///
public string EndIpAddress { get; set; }
-
+
}
public class CreateFirewallRuleResponse : TokenReliantResponse
@@ -61,7 +61,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Contracts
public class CanHandleFirewallRuleRequest
{
public static readonly
- RequestType Type =
+ RequestType Type =
RequestType.Create("resource/handleFirewallRule");
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureDatabaseDiscoveryProvider.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureDatabaseDiscoveryProvider.cs
index 7c823e6c..c971f9db 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureDatabaseDiscoveryProvider.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureDatabaseDiscoveryProvider.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -16,8 +17,8 @@ using Microsoft.SqlTools.Utility;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// Default implementation for for Azure Sql databases.
- /// A discovery provider capable of finding Sql Azure databases for a specific Azure user account.
+ /// Default implementation for for Azure Sql databases.
+ /// A discovery provider capable of finding Sql Azure databases for a specific Azure user account.
///
[Exportable(
@@ -35,7 +36,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
public AzureDatabaseDiscoveryProvider()
{
// Duplicate the exportable attribute as at present we do not support filtering using extensiondescriptor.
- // The attribute is preserved in order to simplify ability to backport into existing tools
+ // The attribute is preserved in order to simplify ability to backport into existing tools
Metadata = new ExportableMetadata(
ServerTypes.SqlServer,
Categories.Azure,
@@ -90,9 +91,9 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
///
- /// Returns the databases for given connection info.
+ /// Returns the databases for given connection info.
/// The connection info should be used to make the connection for getting databases not the account manager
- ///
+ ///
//public async Task> GetDatabaseInstancesAsync(UIConnectionInfo uiConnectionInfo, CancellationToken cancellationToken)
//{
// ServiceResponse result = null;
@@ -109,7 +110,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
/// Returns the databases for given server name. Using the account manager to get the databases
- ///
+ ///
public async Task> GetDatabaseInstancesAsync(string serverName, CancellationToken cancellationToken)
{
ServiceResponse result = null;
@@ -120,7 +121,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
//if connection is passed, we need to search all subscriptions not selected ones
IEnumerable subscriptions = await GetSubscriptionsAsync(string.IsNullOrEmpty(serverName));
if (!cancellationToken.IsCancellationRequested)
- {
+ {
result = await AzureUtil.ExecuteGetAzureResourceAsParallel((object)null, subscriptions, serverName, cancellationToken,
GetDatabaseForSubscriptionAsync);
}
@@ -159,7 +160,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
get
{
return (_azureAccountManager = _azureAccountManager ?? GetService());
- }
+ }
}
///
@@ -206,11 +207,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
/// There was a wired nullReferencedException was running the tasks parallel. It only got fixed when I put the getting from cache insed an async method
- ///
+ ///
private Task> GetFromCacheAsync(string key)
{
return Task.Factory.StartNew(() => _cache.Get(key));
- }
+ }
///
/// Returns a list of Azure sql databases for given subscription
@@ -235,7 +236,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
else if (shouldFilter)
{
//we should filter the result because the cached data includes databases for all servers
- result = new ServiceResponse(result.Data.Where(x => x.ServerInstanceInfo.FullyQualifiedDomainName == serverName),
+ result = new ServiceResponse(result.Data.Where(x => x.ServerInstanceInfo.FullyQualifiedDomainName == serverName),
result.Errors);
}
@@ -243,7 +244,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
if (!shouldFilter && !cancellationToken.IsCancellationRequested)
{
result = _cache.UpdateCache(key, result);
- }
+ }
}
catch (Exception ex)
{
@@ -261,7 +262,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
CancellationToken cancellationToken, CancellationToken internalCancellationToken)
{
ServiceResponse result = null;
-
+
try
{
if (!cancellationToken.IsCancellationRequested && !internalCancellationToken.IsCancellationRequested)
@@ -295,7 +296,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
return result ?? new ServiceResponse();
}
- private async Task> GetDatabasesForSubscriptionServersAsync(IAzureResourceManagementSession session,
+ private async Task> GetDatabasesForSubscriptionServersAsync(IAzureResourceManagementSession session,
IList filteredServersList, CancellationToken cancellationToken)
{
ServiceResponse result = null;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureServerDatabaseDiscoveryProvider.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureServerDatabaseDiscoveryProvider.cs
index fac48b6a..a22db62d 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureServerDatabaseDiscoveryProvider.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureServerDatabaseDiscoveryProvider.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -43,7 +44,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
result = await AzureUtil.ExecuteGetAzureResourceAsParallel(_session, serverResources, null, cancellationToken, GetDatabasesForServerFromService);
}
return result;
- }
+ }
private async Task> GetDatabasesForServerFromService(
IAzureResourceManagementSession session,
@@ -108,7 +109,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
/// Converts the resource to DatabaseInstanceInfo
- ///
+ ///
private DatabaseInstanceInfo ConvertToModel(ServerInstanceInfo serverInstanceInfo, IAzureResource azureResource)
{
DatabaseInstanceInfo databaseInstance = new DatabaseInstanceInfo(serverInstanceInfo)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureSqlServerDiscoveryProvider.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureSqlServerDiscoveryProvider.cs
index 79c9ae51..9e68435e 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureSqlServerDiscoveryProvider.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureSqlServerDiscoveryProvider.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -12,11 +13,11 @@ using Microsoft.SqlTools.ResourceProvider.Core.Extensibility;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// Default implementation for for Azure Sql servers.
- /// A discovery provider capable of finding Sql Azure servers for a specific Azure user account.
+ /// Default implementation for for Azure Sql servers.
+ /// A discovery provider capable of finding Sql Azure servers for a specific Azure user account.
///
[Exportable(
- ServerTypes.SqlServer,
+ ServerTypes.SqlServer,
Categories.Azure,
typeof(IServerDiscoveryProvider),
"Microsoft.SqlServer.ConnectionServices.Azure.AzureServerDiscoveryProvider")]
@@ -28,7 +29,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
public AzureSqlServerDiscoveryProvider()
{
// Duplicate the exportable attribute as at present we do not support filtering using extensiondescriptor.
- // The attribute is preserved in order to simplify ability to backport into existing tools
+ // The attribute is preserved in order to simplify ability to backport into existing tools
Metadata = new ExportableMetadata(
ServerTypes.SqlServer,
Categories.Azure,
@@ -120,6 +121,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
{
_azureAccountManager = value as IAzureAuthenticationManager;
}
- }
+ }
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureUtil.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureUtil.cs
index 3d7324ec..17ba23eb 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureUtil.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/AzureUtil.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInfoEventArgs.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInfoEventArgs.cs
index fb3cf1b0..004ada1a 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInfoEventArgs.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInfoEventArgs.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInstanceInfo.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInstanceInfo.cs
index 43e2e1e7..90865672 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInstanceInfo.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/DatabaseInstanceInfo.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
@@ -12,7 +13,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
public class DatabaseInstanceInfo
{
///
- /// Default constructor to initialize the instance
+ /// Default constructor to initialize the instance
///
///
public DatabaseInstanceInfo(ServerInstanceInfo serverInstanceInfo)
@@ -34,7 +35,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
public ServerInstanceInfo ServerInstanceInfo
{
- get;
+ get;
private set;
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResource.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResource.cs
index 84a3c1c2..d324d90f 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResource.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResource.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManagementSession.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManagementSession.cs
index 529b8991..44a92c34 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManagementSession.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManagementSession.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
@@ -11,7 +12,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// A session used by . Includes all the clients that the resource management needs to get ther resources
///
public interface IAzureResourceManagementSession : IDisposable
- {
+ {
///
/// Closes the session
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManager.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManager.cs
index 3940392e..d2e5dff3 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManager.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureResourceManager.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Collections.Generic;
using System.Threading.Tasks;
@@ -24,7 +25,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// The list of databases
Task> GetAzureDatabasesAsync(
IAzureResourceManagementSession azureResourceManagementSession,
- string resourceGroupName,
+ string resourceGroupName,
string serverName);
///
@@ -43,8 +44,8 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// Firewall rule request including the name and IP address range
///
Task CreateFirewallRuleAsync(
- IAzureResourceManagementSession azureResourceManagementSession,
- IAzureSqlServerResource azureSqlServer,
+ IAzureResourceManagementSession azureResourceManagementSession,
+ IAzureSqlServerResource azureSqlServer,
FirewallRuleRequest firewallRuleRequest
);
@@ -52,7 +53,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
///
- /// Gets all subscription contexts under a specific user account. Queries all tenants for the account and uses these to log in
+ /// Gets all subscription contexts under a specific user account. Queries all tenants for the account and uses these to log in
/// and retrieve subscription information as needed
/// Account whose subscriptions should be queried
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureSqlServerResource.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureSqlServerResource.cs
index 0c5e192e..1158fb31 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureSqlServerResource.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IAzureSqlServerResource.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core
{
@@ -11,7 +12,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
/// Fully qualified domain name
- ///
+ ///
string FullyQualifiedDomainName
{
get;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ICacheable.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ICacheable.cs
index 3cc2869b..484268ea 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ICacheable.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ICacheable.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Threading;
using System.Threading.Tasks;
@@ -8,10 +9,10 @@ using System.Threading.Tasks;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// Defines a class as cachable
- ///
+ /// Defines a class as cachable
+ ///
public interface ICacheable
- {
+ {
///
/// Clears the cache for current user
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IDatabaseDiscoveryProvider.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IDatabaseDiscoveryProvider.cs
index 6d8df6b6..05600902 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IDatabaseDiscoveryProvider.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IDatabaseDiscoveryProvider.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -11,23 +12,23 @@ using Microsoft.SqlTools.ResourceProvider.Core.Extensibility;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// A discovery provider capable of finding databases for a given server type and category.
- /// For example: finding SQL Server databases in Azure, or on the local network.
- /// Implementing classes must add a
- /// to the class in order to be found by the extension manager,
+ /// A discovery provider capable of finding databases for a given server type and category.
+ /// For example: finding SQL Server databases in Azure, or on the local network.
+ /// Implementing classes must add a
+ /// to the class in order to be found by the extension manager,
/// and to define the type and category supported
///
public interface IDatabaseDiscoveryProvider : IExportable
{
///
- /// Returns the databases for given server name.
- ///
+ /// Returns the databases for given server name.
+ ///
Task> GetDatabaseInstancesAsync(string serverName, CancellationToken cancellationToken);
///
- /// Returns the databases for given connection info.
+ /// Returns the databases for given connection info.
/// The connection info should be used to make the connection for getting databases not the account manager
- ///
+ ///
//Task> GetDatabaseInstancesAsync(UIConnectionInfo uiConnectionInfo, CancellationToken cancellationToken);
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ISecureService.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ISecureService.cs
index 4e2df4fd..9972351f 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ISecureService.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ISecureService.cs
@@ -1,14 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// Defines a class as secure which requires an account to function
- ///
+ /// Defines a class as secure which requires an account to function
+ ///
public interface ISecureService
{
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IServerDiscoveryProvider.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IServerDiscoveryProvider.cs
index db0c5712..06090465 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IServerDiscoveryProvider.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/IServerDiscoveryProvider.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Collections.Generic;
using System.Threading.Tasks;
@@ -14,12 +15,12 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// Implementing classes must add a
/// to the class in order to be found by the extension manager,
/// and to define the type and category supported
- ///
+ ///
public interface IServerDiscoveryProvider : IExportable
- {
+ {
///
/// Discovers the server instances
///
- Task> GetServerInstancesAsync();
+ Task> GetServerInstancesAsync();
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerDefinition.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerDefinition.cs
index 7d7defe7..4ce02415 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerDefinition.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerDefinition.cs
@@ -1,20 +1,21 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// Defines a server grouping based on the type of server connection supported (SQL Server, Reporting Server, Analysis Server)
- /// and a Category by which these should be shown to the user.
- /// Built in examples of categories include Local, Network, and Azure and additional categories can be defined as needed.
- /// Note that the Connection Dialog UI may require Category to be set for some resource types such as.
+ /// Defines a server grouping based on the type of server connection supported (SQL Server, Reporting Server, Analysis Server)
+ /// and a Category by which these should be shown to the user.
+ /// Built in examples of categories include Local, Network, and Azure and additional categories can be defined as needed.
+ /// Note that the Connection Dialog UI may require Category to be set for some resource types such as.
/// In addition a UI section matching that category may be required, or else the provider will not be used by any UI part and never be called.
///
public interface IServerDefinition
{
///
- /// Category by which resources can be grouped. Built in examples of categories include Local, Network, and Azure and additional categories can be defined as needed.
+ /// Category by which resources can be grouped. Built in examples of categories include Local, Network, and Azure and additional categories can be defined as needed.
///
string Category
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerInstanceInfo.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerInstanceInfo.cs
index 5f66ae91..02835715 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerInstanceInfo.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerInstanceInfo.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core
{
@@ -18,12 +19,12 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
public ServerInstanceInfo()
- {
+ {
}
public IServerDefinition ServerDefinition
{
- get; private set;
+ get; private set;
}
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerTypes.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerTypes.cs
index cbdc626a..8992fefb 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerTypes.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServerTypes.cs
@@ -1,14 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core
{
///
- /// List of built-in server types used in .
+ /// List of built-in server types used in .
/// Defines a server grouping based on the type of server connection supported (SQL Server, Reporting Server, Analysis Server)
/// Additional server types can be defined as needed.
- /// Note that the Connection Dialog UI may require server type to be set for some resource types such as.
+ /// Note that the Connection Dialog UI may require server type to be set for some resource types such as.
/// In addition a UI section matching that category may be required, or else the provider will not be used by any UI part and never be called.
///
public static class ServerTypes
@@ -38,7 +39,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// List of built-in categories used in
/// Defines a server grouping based on the category of server connection supported (Network, Local, Azure)
/// Additional categories can be defined as needed.
- /// Note that the Connection Dialog UI may require Category to be set for some resource types such as.
+ /// Note that the Connection Dialog UI may require Category to be set for some resource types such as.
/// In addition a UI section matching that category may be required, or else the provider will not be used by any UI part and never be called.
///
public static class Categories
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServiceResponse.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServiceResponse.cs
index 15619311..9d93fd41 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServiceResponse.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Discovery/ServiceResponse.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -27,14 +28,14 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
/// Creates new instance given errors
///
public ServiceResponse(IEnumerable errors) : this(Enumerable.Empty(), errors)
- {
+ {
}
///
/// Creates new instance given data
///
public ServiceResponse(IEnumerable data) : this(data, Enumerable.Empty())
- {
+ {
}
///
@@ -83,7 +84,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
return message;
}
- }
+ }
///
/// Returns true if a response already found. it's used when we need to filter the responses
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableAttribute.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableAttribute.cs
index e2bf82d5..03b2e89a 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableAttribute.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableAttribute.cs
@@ -10,7 +10,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
{
///
/// Attribute defining a service export, and the metadata about that service. Implements IServiceMetadata,
- /// which should be used on the importer side to ensure type consistency. Services and providers have to add this property
+ /// which should be used on the importer side to ensure type consistency. Services and providers have to add this property
/// in order to be found by the extension manager
///
[MetadataAttribute]
@@ -27,11 +27,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
/// The priority of the exportable. The extension manager will pick the exportable with the highest priority if multiple found
/// The display name of the exportable. This field is optional
public ExportableAttribute(
- string serverType,
+ string serverType,
string category,
- Type type,
- string id,
- int priority = 0,
+ Type type,
+ string id,
+ int priority = 0,
string displayName = null) : base(type)
{
Category = category;
@@ -40,7 +40,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
DisplayName = displayName;
Priority = priority;
}
-
+
///
/// The constructor to define an exportable by type, id and priority only. To be used by the exportables that support all server types and categories.
/// For example: the implementation of can be used for all server types and categories.
@@ -60,8 +60,8 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public string Category
{
- get;
- private set;
+ get;
+ private set;
}
///
@@ -69,8 +69,8 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public string ServerType
{
- get;
- private set;
+ get;
+ private set;
}
///
@@ -87,7 +87,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public string Id
{
- get;
+ get;
private set;
}
@@ -96,7 +96,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public string DisplayName
{
- get;
+ get;
private set;
}
@@ -105,7 +105,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public int Priority
{
- get;
+ get;
private set;
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableBase.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableBase.cs
index 253e45cb..93eda94b 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableBase.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableBase.cs
@@ -26,7 +26,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public IExportableMetadata Metadata
{
- get;
+ get;
set;
}
@@ -36,7 +36,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public IMultiServiceProvider ServiceProvider
{
- get;
+ get;
private set;
}
@@ -53,7 +53,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
/// A service of type T or null if not found
protected T GetService()
where T : IExportable
- {
+ {
return GetService(Metadata);
}
@@ -90,7 +90,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
}
///
- /// ServerDefinition created from the metadata
+ /// ServerDefinition created from the metadata
///
protected ServerDefinition ServerDefinition
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableStatus.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableStatus.cs
index 1521e5cc..10121032 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableStatus.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExportableStatus.cs
@@ -26,7 +26,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
public string ErrorMessage { get; set; }
///
- /// An info link to navigate to
+ /// An info link to navigate to
///
public string InfoLink { get; set; }
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExtensionUtils.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExtensionUtils.cs
index 163c49e4..170f3aba 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExtensionUtils.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ExtensionUtils.cs
@@ -11,7 +11,7 @@ using Microsoft.SqlTools.Extensibility;
namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
{
///
- /// Extension methods for exportable and service
+ /// Extension methods for exportable and service
///
public static class ExtensionUtils
{
@@ -48,14 +48,14 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
{
return null;
}
- //Get all the possible matches
+ //Get all the possible matches
IEnumerable allMatched = serverDefinition != null ?
exportables.Where(x => Match(x.Metadata, serverDefinition)).ToList() : exportables;
IList list = allMatched.ToList();
//If specific server type requested and the list has any item with that server type remove the others.
//for instance is there's server for all server types and one specifically for sql and give metadata is asking for sql then
- //we should return the sql one even if the other service has higher priority
+ //we should return the sql one even if the other service has higher priority
IList withSameServerType = list.Where(x => serverDefinition.HasSameServerName(x.Metadata)).ToList();
if (withSameServerType.Any())
@@ -101,7 +101,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
}
return false;
}
-
+
internal static string GetServerDefinitionKey(this IServerDefinition serverDefinition)
{
string key = string.Empty;
@@ -126,7 +126,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
}
return false;
}
-
+
internal static bool EmptyOrEqual(this string value1, string value2)
{
if (string.IsNullOrEmpty(value1) && string.IsNullOrEmpty(value2))
@@ -143,12 +143,12 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
/// Returns true if the metadata matches the given server definition
- ///
+ ///
public static bool Match(this IServerDefinition first, IServerDefinition other)
{
if (first == null)
{
- // TODO should we handle this differently?
+ // TODO should we handle this differently?
return false;
}
if (other == null)
@@ -158,10 +158,10 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
return MatchMetaData(first.ServerType, other.ServerType)
&& MatchMetaData(first.Category, other.Category);
}
-
+
///
/// Returns true if the metadata value matches the given value
- ///
+ ///
private static bool MatchMetaData(string metaData, string requestedMetaData)
{
if (string.IsNullOrEmpty(metaData) || string.IsNullOrEmpty(requestedMetaData))
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/IExportable.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/IExportable.cs
index 807e1d4d..4871acb9 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/IExportable.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/IExportable.cs
@@ -19,7 +19,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
{
set; get;
}
-
+
///
/// Returns the status of the exportable
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ITrace.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ITrace.cs
index a03cab6f..df633724 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ITrace.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/ITrace.cs
@@ -13,7 +13,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
/// Provides facility to trace code execution through calls to Trace* methods.
/// Implementing classes must add a
/// to the class in order to be found by the extension manager
- ///
+ ///
public interface ITrace : IExportable
{
///
@@ -40,5 +40,5 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
bool TraceException(TraceEventType eventType, int traceId, Exception exception, string message,
[CallerLineNumber] int lineNumber = 0, [CallerFilePath] string fileName = "",
[CallerMemberName] string memberName = "");
- }
+ }
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceId.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceId.cs
index 28dee2b8..1ceef648 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceId.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceId.cs
@@ -66,7 +66,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
/// Trace Id for network browse traces
///
- NetworkSection = 11,
+ NetworkSection = 11,
///
/// Trace Id for main dialog traces
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceableBase.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceableBase.cs
index 8eb9046d..e6429902 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceableBase.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Extensibility/TraceableBase.cs
@@ -19,13 +19,13 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
public abstract ITrace Trace
{
- get;
+ get;
set;
}
///
/// Write a trace event message to the underlying trace source.
- ///
+ ///
public bool TraceEvent(TraceEventType eventType, TraceId traceId, string format, params object[] args)
{
return TraceEvent(eventType, (int)traceId, format, args);
@@ -33,16 +33,16 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
/// Write a trace event message to the underlying trace source.
- ///
+ ///
public bool TraceEvent(TraceEventType eventType, int traceId, string format, params object[] args)
{
return SafeTrace(eventType, traceId, format, args);
- }
+ }
///
/// Write a formatted trace event message to the underlying trace source and issue a Debug.Fail() call
/// if condition is false.
- ///
+ ///
public bool AssertTraceEvent(bool condition, TraceEventType eventType, TraceId traceId, string message)
{
return AssertTraceEvent(condition, eventType, (int)traceId, message);
@@ -51,7 +51,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
/// Write a formatted trace event message to the underlying trace source and issue a Debug.Fail() call
/// if condition is false.
- ///
+ ///
public bool AssertTraceEvent(bool condition, TraceEventType eventType, int traceId, string message)
{
if (!condition)
@@ -129,7 +129,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
return DebugTraceException(eventType, traceId, exception, message);
}
return true;
- }
+ }
///
/// Write a trace event with a message and exception details to the underlying trace source and issue a
@@ -195,7 +195,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
/// Verifies ITrace instance is not null before tracing
- ///
+ ///
private bool SafeTrace(TraceEventType eventType, int traceId, string format, params object[] args)
{
if (Trace != null)
@@ -207,7 +207,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Extensibility
///
/// Verifies ITrace instance is not null before tracing the exception
- ///
+ ///
private bool SafeTraceException(TraceEventType eventType, int traceId, Exception exception, string message,
[CallerLineNumber] int lineNumber = 0, [CallerFilePath] string fileName = "",
[CallerMemberName] string memberName = "")
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs
index de49255e..c30e3279 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.Data.SqlClient;
@@ -12,15 +13,15 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
internal interface IFirewallErrorParser
{
///
- /// Parses given error message and error code to see if it's firewall rule error
+ /// Parses given error message and error code to see if it's firewall rule error
/// and finds the blocked ip address
///
FirewallParserResponse ParseErrorMessage(string errorMessage, int errorCode);
///
- /// Parses given error message and error code to see if it's firewall rule error
+ /// Parses given error message and error code to see if it's firewall rule error
/// and finds the blocked ip address
- ///
+ ///
FirewallParserResponse ParseException(SqlException sqlException);
}
@@ -30,9 +31,9 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
public class FirewallErrorParser : IFirewallErrorParser
{
///
- /// Parses given error message and error code to see if it's firewall rule error
+ /// Parses given error message and error code to see if it's firewall rule error
/// and finds the blocked ip address
- ///
+ ///
public FirewallParserResponse ParseException(SqlException sqlException)
{
CommonUtil.CheckForNull(sqlException, "sqlException");
@@ -40,9 +41,9 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
}
///
- /// Parses given error message and error code to see if it's firewall rule error
+ /// Parses given error message and error code to see if it's firewall rule error
/// and finds the blocked ip address
- ///
+ ///
public FirewallParserResponse ParseErrorMessage(string errorMessage, int errorCode)
{
CommonUtil.CheckForNull(errorMessage, "errorMessage");
@@ -62,7 +63,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// Parses the given message to find the blocked ip address
- ///
+ ///
private static bool TryParseClientIp(string message, out IPAddress clientIp)
{
clientIp = null;
@@ -91,7 +92,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// Returns true if given error code is firewall rule blocked error code
- ///
+ ///
private bool IsSqlAzureFirewallBlocked(int errorCode)
{
return errorCode == SqlAzureFirewallBlockedErrorNumber;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallParserResponse.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallParserResponse.cs
index de422ebe..946be7d4 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallParserResponse.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallParserResponse.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Net;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleException.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleException.cs
index 420600b3..90a7d647 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleException.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleException.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Net;
@@ -34,7 +35,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// The error message that explains the reason for the exception.
/// The Http error code.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public FirewallRuleException(string message, HttpStatusCode httpStatusCode, Exception innerException = null)
: base(message, httpStatusCode, innerException)
@@ -46,7 +47,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// The error message that explains the reason for the exception.
/// The Http error code.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public FirewallRuleException(string message, int httpStatusCode, Exception innerException = null)
: base(message, httpStatusCode, innerException)
@@ -55,11 +56,11 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
}
///
- /// Initializes a new instance of the AuthenticationFailedException class with a specified error message
+ /// Initializes a new instance of the AuthenticationFailedException class with a specified error message
/// and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public FirewallRuleException(string message, Exception innerException)
: base(message, innerException)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleRequest.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleRequest.cs
index ee87e991..0c8ab9d9 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleRequest.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleRequest.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Globalization;
@@ -12,7 +13,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
/// Includes all the information needed to create a firewall rule
///
public class FirewallRuleRequest
- {
+ {
///
/// Start IP address
///
@@ -21,7 +22,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// End IP address
///
- public IPAddress EndIpAddress { get; set; }
+ public IPAddress EndIpAddress { get; set; }
///
/// Firewall rule name
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResource.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResource.cs
index 97daa029..ee1678ab 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResource.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResource.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
@@ -20,7 +21,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
/// Azure Subscription
///
public IAzureUserAccountSubscriptionContext SubscriptionContext { get; set; }
-
+
///
/// Returns true if the resource and subscription are not null
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResponse.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResponse.cs
index f5922899..a6f48612 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResponse.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleResponse.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleService.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleService.cs
index f9714bab..3e1229ee 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleService.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallRuleService.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -19,13 +20,13 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
{
///
/// Creates firewall rule for given server name and IP address range. Throws exception if operation fails
- ///
+ ///
Task CreateFirewallRuleAsync(string serverName, string startIpAddressValue, string endIpAddressValue);
///
/// Creates firewall rule for given server name and IP address range. Throws exception if operation fails
- ///
+ ///
Task CreateFirewallRuleAsync(string serverName, IPAddress startIpAddress, IPAddress endIpAddress);
@@ -53,7 +54,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
{
///
/// Creates firewall rule for given server name and IP address range. Throws exception if operation fails
- ///
+ ///
public async Task CreateFirewallRuleAsync(string serverName, string startIpAddressValue, string endIpAddressValue)
{
IPAddress startIpAddress = ConvertToIpAddress(startIpAddressValue);
@@ -63,7 +64,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// Creates firewall rule for given server name and IP address range. Throws exception if operation fails
- ///
+ ///
public async Task CreateFirewallRuleAsync(string serverName, IPAddress startIpAddress, IPAddress endIpAddress)
{
try
@@ -87,7 +88,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
return firewallRuleResponse;
}
catch (ServiceExceptionBase)
- {
+ {
throw;
}
catch (Exception ex)
@@ -108,7 +109,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// Creates firewall rule for given subscription and IP address range
- ///
+ ///
private async Task CreateFirewallRule(FirewallRuleResource firewallRuleResource, IPAddress startIpAddress, IPAddress endIpAddress)
{
CommonUtil.CheckForNull(firewallRuleResource, "firewallRuleResource");
@@ -135,7 +136,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
catch (ServiceExceptionBase)
{
throw;
- }
+ }
catch (Exception ex)
{
throw new FirewallRuleException(string.Format(CultureInfo.CurrentCulture, SR.FirewallRuleCreationFailedWithError, ex.Message), ex);
@@ -161,9 +162,9 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
throw new FirewallRuleException(SR.NoSubscriptionsFound);
}
- ServiceResponse response = await AzureUtil.ExecuteGetAzureResourceAsParallel((object)null,
+ ServiceResponse response = await AzureUtil.ExecuteGetAzureResourceAsParallel((object)null,
subscriptions, serverName, new CancellationToken(), TryFindAzureResourceForSubscriptionAsync);
-
+
if (response != null)
{
if (response.Data != null && response.Data.Any())
@@ -190,7 +191,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
throw new FirewallRuleException(SR.FirewallRuleCreationFailed, ex);
}
}
-
+
///
/// Returns a list of Azure sql databases for given subscription
///
@@ -222,7 +223,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
///
/// Throws a firewallRule exception based on give status code
///
- private void HandleError(ServiceExceptionBase exception, string serverName,
+ private void HandleError(ServiceExceptionBase exception, string serverName,
IAzureUserAccountSubscriptionContext subscription)
{
var accountName = subscription != null && subscription.UserAccount != null &&
@@ -262,19 +263,19 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall
{
return resource;
}
- }
+ }
}
catch (ServiceExceptionBase ex)
{
HandleError(ex, serverName, session.SubscriptionContext);
- }
+ }
catch (Exception ex)
{
throw new FirewallRuleException(SR.FirewallRuleCreationFailed, ex);
- }
+ }
return null;
}
-
+
private IPAddress ConvertToIpAddress(string ipAddressValue)
{
IPAddress ipAddress;
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/ResourceProviderService.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/ResourceProviderService.cs
index f4d0cb5a..2ba7e7e2 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/ResourceProviderService.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/ResourceProviderService.cs
@@ -30,7 +30,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
public ResourceProviderService()
{
}
-
+
public override void InitializeService(IProtocolEndpoint serviceHost)
{
Logger.Write(TraceEventType.Verbose, "ResourceProvider initialized");
@@ -43,7 +43,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
ResourceManager = ServiceProvider.GetService()
};
}
-
+
///
/// Handles a firewall rule creation request. It does this by matching the server name to an Azure Server resource,
/// then issuing the command to create a new firewall rule for the specified IP address against that instance
@@ -88,7 +88,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
}
return result;
}
-
+
public async Task ProcessHandleFirewallRuleRequest(HandleFirewallRuleParams canHandleRuleParams, RequestContext requestContext)
{
Func> requestHandler = () =>
@@ -110,7 +110,7 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
};
await HandleRequest(requestHandler, null, requestContext, "HandleCreateFirewallRuleRequest");
}
-
+
private async Task HandleRequest(Func> handler, Func expiredTokenHandler, RequestContext requestContext, string requestType)
{
Logger.Write(TraceEventType.Verbose, requestType);
@@ -140,6 +140,6 @@ namespace Microsoft.SqlTools.ResourceProvider.Core
// Send just the error message back for now as stack trace isn't useful
await requestContext.SendError(ex.Message);
}
- }
+ }
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs
index 1509fcfd..acf7d464 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -17,7 +18,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
{
///
- /// Implementation for .
+ /// Implementation for .
/// Provides functionality to authenticate to Azure and discover associated accounts and subscriptions
///
[Exportable(
@@ -79,7 +80,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
OnCurrentAccountChanged();
return await GetCurrentAccountAsync();
}
-
+
///
/// Public for testing purposes. Creates an Azure account with the correct set of mappings for tenants etc.
///
@@ -185,7 +186,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
{
return _selectedSubscriptions ?? await GetSubscriptionsAsync();
}
-
+
///
/// Returns user's subscriptions
///
@@ -219,7 +220,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
private async Task> GetSubscriptionsFromCacheAsync(AzureUserAccount user)
{
var result = Enumerable.Empty();
-
+
if (user != null)
{
if (user.UniqueId != "") {
@@ -278,7 +279,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
? subscriptionList
: subscriptionList.Where(x => subscriptionIds.Contains(x.Subscription.SubscriptionId)).ToList();
- //If the current account changes during setting selected subscription, none of the ids should be found
+ //If the current account changes during setting selected subscription, none of the ids should be found
//so we just reset the selected subscriptions
if (subscriptionIds != null && subscriptionIds.Any() && newSelectedSubscriptions.Count == 0)
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceFailedException.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceFailedException.cs
index 0a4882ba..c288cc67 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceFailedException.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceFailedException.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Net;
@@ -35,7 +36,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
///
/// The error message that explains the reason for the exception.
/// The Http error code.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public AzureResourceFailedException(string message, HttpStatusCode httpStatusCode, Exception innerException = null)
: base(message, httpStatusCode, innerException)
@@ -47,20 +48,20 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
///
/// The error message that explains the reason for the exception.
/// The Http error code.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public AzureResourceFailedException(string message, int httpStatusCode, Exception innerException = null)
: base(message, httpStatusCode, innerException)
{
-
+
}
///
- /// Initializes a new instance of the AuthenticationFailedException class with a specified error message
+ /// Initializes a new instance of the AuthenticationFailedException class with a specified error message
/// and a reference to the inner exception that is the cause of this exception.
///
/// The error message that explains the reason for the exception.
- /// The exception that is the cause of the current exception, or a null reference
+ /// The exception that is the cause of the current exception, or a null reference
/// (Nothing in Visual Basic) if no inner exception is specified
public AzureResourceFailedException(string message, Exception innerException)
: base(message, innerException)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManagementSession.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManagementSession.cs
index 4d5a30c0..1e33fe0a 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManagementSession.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManagementSession.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.Azure.Management.ResourceManager;
@@ -11,7 +12,7 @@ using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
{
///
- /// VS session used by .
+ /// VS session used by .
/// Includes all the clients that the resource management needs to get ther resources
///
public class AzureResourceManagementSession : IAzureResourceManagementSession
@@ -22,7 +23,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
/// Sql Management Client
/// Resource Management Client
/// Subscription Context
- public AzureResourceManagementSession(SqlManagementClient sqlManagementClient,
+ public AzureResourceManagementSession(SqlManagementClient sqlManagementClient,
ResourceManagementClient resourceManagementClient,
IAzureUserAccountSubscriptionContext subscriptionContext)
{
@@ -46,7 +47,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
public bool CloseSession()
{
try
- {
+ {
if (ResourceManagementClient != null)
{
ResourceManagementClient.Dispose();
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManager.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManager.cs
index 32ec7e3d..5725832f 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManager.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceManager.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -43,7 +44,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
public AzureResourceManager()
{
// Duplicate the exportable attribute as at present we do not support filtering using extensiondescriptor.
- // The attribute is preserved in order to simplify ability to backport into existing tools
+ // The attribute is preserved in order to simplify ability to backport into existing tools
Metadata = new ExportableMetadata(
ServerTypes.SqlServer,
Categories.Azure,
@@ -222,7 +223,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
}
///
- /// Gets all subscription contexts under a specific user account. Queries all tenants for the account and uses these to log in
+ /// Gets all subscription contexts under a specific user account. Queries all tenants for the account and uses these to log in
/// and retrieve subscription information as needed
///
public async Task> GetSubscriptionContextsAsync(IAzureUserAccount userAccount)
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceWrapper.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceWrapper.cs
index 8943dcf9..5819127d 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceWrapper.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureResourceWrapper.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.Azure.Management.Sql.Models;
@@ -9,7 +10,7 @@ using Microsoft.SqlTools.ResourceProvider.Core;
namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
{
///
- /// Implementation for using VS services.
+ /// Implementation for using VS services.
/// Provides information about an Azure resource
///
public class AzureResourceWrapper : IAzureResource
@@ -18,7 +19,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
private string resourceGroupName;
///
- /// Initializes the resource
+ /// Initializes the resource
///
public AzureResourceWrapper(TrackedResource azureResource)
{
@@ -94,7 +95,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
if (!string.IsNullOrEmpty(Id))
{
string[] idParts = Id.Split('/');
-
+
// Look for the "resourceGroups" section and return the section after this, hence
// always stop before idParts.Length - 1
for (int i = 0; i < idParts.Length - 1; i++)
@@ -134,5 +135,5 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
get;
set;
}
- }
+ }
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionContext.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionContext.cs
index d2a9dc00..ed7329e9 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionContext.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionContext.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
@@ -48,7 +49,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
{
get
{
- return _azureSubscriptionIdentifier != null ?
+ return _azureSubscriptionIdentifier != null ?
_azureSubscriptionIdentifier.SubscriptionId : string.Empty;
}
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionIdentifier.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionIdentifier.cs
index 997ca9ba..d653df04 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionIdentifier.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureSubscriptionIdentifier.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.SqlTools.ResourceProvider.Core;
@@ -31,7 +32,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
public bool Equals(IAzureSubscriptionIdentifier other)
{
return other != null &&
- CommonUtil.SameString(SubscriptionId, other.SubscriptionId) &&
+ CommonUtil.SameString(SubscriptionId, other.SubscriptionId) &&
CommonUtil.SameUri(ServiceManagementEndpoint, other.ServiceManagementEndpoint);
}
@@ -58,7 +59,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
get;
private set;
}
-
+
///
/// The ID of the tenant this subscription comes from
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureTenant.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureTenant.cs
index e20b2a6b..97b16064 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureTenant.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureTenant.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -27,7 +28,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
set;
}
-
+
///
/// URI defining the root for resource lookup
///
@@ -35,7 +36,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
///
- /// Access token for use in login scenarios. Note that we could consider implementing this better in the
+ /// Access token for use in login scenarios. Note that we could consider implementing this better in the
///
public string AccessToken
{
@@ -44,7 +45,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
}
///
- /// Optional token type defining whether this is a Bearer token or other type of token
+ /// Optional token type defining whether this is a Bearer token or other type of token
///
public string TokenType
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccount.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccount.cs
index 774a5fd0..11ebdff0 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccount.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccount.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections.Generic;
@@ -53,7 +54,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
CommonUtil.SameString(other.TenantId, TenantId);
// TODO probably should check the AllTenants field
}
-
+
///
/// Unique Id
///
@@ -68,7 +69,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
this.uniqueId = value;
}
}
-
+
///
/// Returns true if user needs reauthentication
///
@@ -77,7 +78,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
get;
set;
}
-
+
///
/// User display info
///
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountDisplayInfo.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountDisplayInfo.cs
index ac4d40e2..9ca1b141 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountDisplayInfo.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountDisplayInfo.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
@@ -45,8 +46,8 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
///
public bool Equals(IAzureUserAccountDisplayInfo other)
{
- return other != null &&
- ((other.AccountDisplayName == null && AccountDisplayName == null ) || (other.AccountDisplayName != null && other.AccountDisplayName.Equals(AccountDisplayName))) &&
+ return other != null &&
+ ((other.AccountDisplayName == null && AccountDisplayName == null ) || (other.AccountDisplayName != null && other.AccountDisplayName.Equals(AccountDisplayName))) &&
((other.UserName == null && UserName == null ) || (other.UserName != null && other.UserName.Equals(UserName)));
}
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountSubscriptionContext.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountSubscriptionContext.cs
index 6c03c946..fed03df5 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountSubscriptionContext.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureUserAccountSubscriptionContext.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.Rest;
@@ -28,7 +29,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
}
///
- /// Creates a subscription context for connecting with a known access token. This creates a object for use
+ /// Creates a subscription context for connecting with a known access token. This creates a object for use
/// in a request
///
public static AzureUserAccountSubscriptionContext CreateStringTokenContext(AzureSubscriptionIdentifier subscription, string accessToken)
@@ -62,7 +63,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
}
///
- ///
+ ///
///
public bool Equals(IAzureUserAccountSubscriptionContext other)
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/SqlAzureResource.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/SqlAzureResource.cs
index 47929de1..18829bae 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/SqlAzureResource.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/SqlAzureResource.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using Microsoft.SqlTools.ResourceProvider.Core;
@@ -17,7 +18,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
private readonly Models.Server _azureSqlServerResource;
///
- /// Initializes the resource
+ /// Initializes the resource
///
public SqlAzureResource(Models.Server azureResource) : base(azureResource)
{
diff --git a/src/Microsoft.SqlTools.ResourceProvider/Program.cs b/src/Microsoft.SqlTools.ResourceProvider/Program.cs
index 7d71f6aa..9534cc20 100644
--- a/src/Microsoft.SqlTools.ResourceProvider/Program.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider/Program.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Diagnostics;
diff --git a/src/Microsoft.SqlTools.ResourceProvider/ResourceProviderHostLoader.cs b/src/Microsoft.SqlTools.ResourceProvider/ResourceProviderHostLoader.cs
index 6fbf8bbd..5f3b62a5 100644
--- a/src/Microsoft.SqlTools.ResourceProvider/ResourceProviderHostLoader.cs
+++ b/src/Microsoft.SqlTools.ResourceProvider/ResourceProviderHostLoader.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System.Collections.Generic;
using System.Reflection;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/AzureFunctions/AzureFunctionsUtils.cs b/src/Microsoft.SqlTools.ServiceLayer/AzureFunctions/AzureFunctionsUtils.cs
index 6d4fdc02..55036467 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/AzureFunctions/AzureFunctionsUtils.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/AzureFunctions/AzureFunctionsUtils.cs
@@ -1,4 +1,9 @@
-using Microsoft.CodeAnalysis.CSharp.Syntax;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Connection/CancelTokenKey.cs b/src/Microsoft.SqlTools.ServiceLayer/Connection/CancelTokenKey.cs
index 9976916b..c73becbf 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Connection/CancelTokenKey.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Connection/CancelTokenKey.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs b/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs
index 1be5e7db..2768c1f8 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs
@@ -11,7 +11,6 @@ using System.Data.Common;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider;
using System.Globalization;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.SqlTools.Hosting.Protocol;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs b/src/Microsoft.SqlTools.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs
index 7798f95a..bbcefd1c 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Connection/Contracts/SecurityTokenRequest.cs
@@ -1,4 +1,9 @@
-using Microsoft.SqlTools.Hosting.Protocol.Contracts;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using Microsoft.SqlTools.Hosting.Protocol.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/CommonUtilities.cs b/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/CommonUtilities.cs
index 7db67b6c..aac32e0f 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/CommonUtilities.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/CommonUtilities.cs
@@ -1,6 +1,7 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Collections;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/DisasterRecoveryConstants.cs b/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/DisasterRecoveryConstants.cs
index 4290a15f..195c38d2 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/DisasterRecoveryConstants.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/DisasterRecoveryConstants.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/EditData/Contracts/EditCellResult.cs b/src/Microsoft.SqlTools.ServiceLayer/EditData/Contracts/EditCellResult.cs
index 2faff227..bf4383fd 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/EditData/Contracts/EditCellResult.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/EditData/Contracts/EditCellResult.cs
@@ -1,4 +1,9 @@
-namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
{
///
/// Parameters to return when a cell is updated in isolation
diff --git a/src/Microsoft.SqlTools.ServiceLayer/HostLoader.cs b/src/Microsoft.SqlTools.ServiceLayer/HostLoader.cs
index 0cf81912..084341dd 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/HostLoader.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/HostLoader.cs
@@ -1,6 +1,7 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
using System;
using System.Threading.Tasks;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Management/Common/ExecutionHandler.cs b/src/Microsoft.SqlTools.ServiceLayer/Management/Common/ExecutionHandler.cs
index 57e49729..33e20005 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Management/Common/ExecutionHandler.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Management/Common/ExecutionHandler.cs
@@ -1,3 +1,8 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections;
using System.Text;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/NotebookConvert/Notebook.cs b/src/Microsoft.SqlTools.ServiceLayer/NotebookConvert/Notebook.cs
index d339249b..a8662ee2 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/NotebookConvert/Notebook.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/NotebookConvert/Notebook.cs
@@ -1,4 +1,9 @@
-using Newtonsoft.Json;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNodeWithContext.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNodeWithContext.cs
index 0ff80faa..80c8b5e1 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNodeWithContext.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNodeWithContext.cs
@@ -1,4 +1,9 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs
index a0ddb7ea..04546edf 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs
@@ -1,4 +1,9 @@
-// This file was generated by a T4 Template. Do not modify directly, instead update the SmoQueryModelDefinition.xml file
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+// This file was generated by a T4 Template. Do not modify directly, instead update the SmoQueryModelDefinition.xml file
// and re-run the T4 template. This can be done in Visual Studio by right-click in and choosing "Run Custom Tool",
// or from the command-line on any platform by running "build.cmd -Target=CodeGen" or "build.sh -Target=CodeGen".
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt
index c9ecd553..1bfa0f0f 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt
@@ -7,6 +7,11 @@
<#@ import namespace="System.Xml" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
// This file was generated by a T4 Template. Do not modify directly, instead update the SmoQueryModelDefinition.xml file
// and re-run the T4 template. This can be done in Visual Studio by right-click in and choosing "Run Custom Tool",
// or from the command-line on any platform by running "build.cmd -Target=CodeGen" or "build.sh -Target=CodeGen".
@@ -24,7 +29,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
<#
var directory = Path.GetDirectoryName(Host.TemplateFile);
string xmlFile = Path.Combine(directory, "SmoQueryModelDefinition.xml");
-
+
/////////
// Now generate all the Query methods
/////////
@@ -71,19 +76,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
WriteLine(string.Format("if ({0} != null)", parentVar));
WriteLine("{");
PushIndent(indent);
-
+
XmlElement navPathElement = GetNavPathElement(xmlFile, nodeName, parentType);
string navigationPath = GetNavigationPath(nodeElement, nodeName, navPathElement);
string subField = GetNavPathAttribute(navPathElement, "SubField");
string fieldType = GetNavPathAttribute(navPathElement, "FieldType");
-
+
WriteLine(string.Format("var retValue = {0}.{1};", parentVar, navigationPath));
WriteLine("if (retValue != null)");
WriteLine("{");
PushIndent(indent);
-
-
+
+
if (IsCollection(nodeElement))
{
WriteLine(string.Format("retValue.ClearAndInitialize(filter, extraProperties);"));
@@ -91,7 +96,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
WriteLine(string.Format("return new SmoCollectionWrapper<{0}>(retValue).Where(c => PassesFinalFilters({1}, c));", nodeType, parentVar));
}
- else
+ else
{
WriteLine(string.Format("List<{0}> subFieldResult = new List<{0}>();", nodeType));
WriteLine(string.Format("foreach({0} field in retValue)", fieldType));
@@ -119,7 +124,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
WriteLine("}");
WriteLine("return new SqlSmoObject[] { retValue };");
}
-
+
PopIndent();
WriteLine("}");
PopIndent();
@@ -158,7 +163,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
return typesList.ToArray();
}
-
+
public static XmlElement GetNodeElement(string xmlFile, string nodeName)
{
XmlDocument doc = new XmlDocument();
@@ -171,7 +176,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
XmlElement navPathElement = (XmlElement)doc.SelectSingleNode(string.Format("/SmoQueryModel/Node[@Name='{0}']/NavigationPath[@Parent='{1}']", nodeName, parent));
-
+
return navPathElement;
}
@@ -193,7 +198,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
string nodeTypeAccessor = IsCollection(nodeElement) ? string.Format("{0}s", nodeType) : nodeType;
return nodeTypeAccessor;
}
-
+
public static string GetNodeType(XmlElement nodeElement, string nodeName)
{
var type = nodeElement.GetAttribute("Type");
@@ -205,7 +210,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
var prefix = "Sql";
return nodeName.IndexOf(prefix) == 0 ? nodeName.Substring(prefix.Length) : nodeName;
}
-
+
public static bool IsCollection(XmlElement nodeElement)
{
var collection = nodeElement.GetAttribute("Collection");
@@ -225,7 +230,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
return new string[] { parentAttr };
}
-
+
var parentNodes = GetChildren(xmlFile, parentName, "Parent");
if (parentNodes != null && parentNodes.Count > 0)
{
@@ -236,7 +241,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
return parents;
}
-
+
// default to assuming a type is under Database
return new string[] { "Database" };
}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.cs
index 1d13751d..64fc02f3 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.cs
@@ -1,13 +1,17 @@
-using System;
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
using System.Collections.Generic;
using System.Composition;
using Microsoft.SqlServer.Management.Smo;
-using Microsoft.SqlTools.ServiceLayer;
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
-
+
internal sealed partial class DatabaseTreeNode : SmoTreeNode
{
public DatabaseTreeNode() : base()
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.tt b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.tt
index 0e1f9ce5..b5e94c53 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.tt
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/TreeNodeGenerator.tt
@@ -7,20 +7,24 @@
<#@ import namespace="System.Xml" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
using System;
using System.Collections.Generic;
using System.Composition;
using Microsoft.SqlServer.Management.Smo;
-using Microsoft.SqlTools.ServiceLayer;
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
-
+
<#
var directory = Path.GetDirectoryName(Host.TemplateFile);
string xmlFile = Path.Combine(directory, "TreeNodeDefinition.xml");
-
+
/////////
// TODO - is Generate all the ReverseDependencies needed?
/////////
@@ -43,11 +47,11 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
// {
// dependentListBuilder.Append(",");
// }
- //
+ //
// dependentListBuilder.Append(string.Format(CultureInfo.InvariantCulture, " typeof({0})", dependentType));
// }
// dependentListBuilder.Append(" }");
- //
+ //
// WriteLine(string.Format(CultureInfo.InvariantCulture, " {{ typeof({0}), new List {1} }}", reverseDependencyKey, dependentListBuilder.ToString()));
// }
// WriteLine(" };");
@@ -92,19 +96,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
var disableSort = nodeElement.GetAttributeNode("DisableSort");
string childFactoryBaseClass = "SmoChildFactoryBase";
-
+
// TODO Will we need alternative child factories? If so, add code here to support this
-
+
if (isAlwaysLeaf == null)
{
WriteLine(" [Export(typeof(ChildFactory))]");
WriteLine(" [Shared]");
-
+
WriteLine(string.Format(" internal partial class {0}ChildFactory : {1}", type, childFactoryBaseClass));
-
+
WriteLine(" {");
WriteLine(string.Format(" public override IEnumerable ApplicableParents() {{ return new[] {{ \"{0}\" }}; }}", type));
-
+
List children = GetChildren(xmlFile, type);
List filters = GetNodeFilters(xmlFile, type);
List smoProperties = GetNodeSmoProperties(xmlFile, type);
@@ -118,7 +122,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
WriteLine(" {");
WriteLine(" var filters = new List();");
- foreach (var filter in filters)
+ foreach (var filter in filters)
{
var propertyName = filter.GetAttribute("Property");
var propertyType = filter.GetAttribute("Type");
@@ -128,7 +132,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
List filterValues = GetNodeFilterValues(xmlFile, type, propertyName);
-
+
WriteLine(" filters.Add(new NodeFilter");
WriteLine(" {");
WriteLine(string.Format(" Property = \"{0}\",", propertyName));
@@ -141,20 +145,20 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
WriteLine(string.Format(" ValidFor = {0},", GetValidForFlags(validFor)));
}
- if (propertyValue != null && (filterValues == null || filterValues.Count == 0))
+ if (propertyValue != null && (filterValues == null || filterValues.Count == 0))
{
WriteLine(string.Format(" Values = new List