From 7a47db8806491963b4552273caa3756dc595cebe Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Mon, 26 Nov 2018 13:03:28 -0800 Subject: [PATCH] Revert ""I have changed access modifier from Internal to Public . These classes are being refered outside. (#742)" (#747) This reverts commit a54eff11b635547524129ea605336e1d4bffcc39. --- .../BatchParser/BatchParserAction.cs | 2 +- .../BatchParser/ExecutionEngineCode/Batch.cs | 2 +- .../ExecutionEngineCode/BatchErrorEventArgs.cs | 2 +- .../ExecutionEngineCode/BatchMessageEventArgs.cs | 12 ++++++------ .../BatchParser/ExecutionEngineCode/BatchParser.cs | 2 +- .../BatchParserExecutionErrorEventArgs.cs | 2 +- .../BatchParserExecutionFinishedEventArgs.cs | 4 ++-- .../BatchParserExecutionStartEventArgs.cs | 2 +- .../ExecutionEngineCode/BatchParserSqlCmd.cs | 2 +- .../ExecutionEngineCode/BatchResultSetEventArgs.cs | 6 +++--- .../ExecutionEngineCode/ScriptExecutionResult.cs | 2 +- .../ExecutionEngineCode/ScriptMessageType.cs | 2 +- .../BatchParser/ExecutionEngineCode/ShowPlanType.cs | 2 +- .../BatchParser/ExecutionEngineCode/TextSpan.cs | 2 +- .../BatchParser/ICommandHandler.cs | 2 +- .../BatchParser/IVariableResolver.cs | 2 +- .../BatchParser/LineInfo.cs | 2 +- .../BatchParser/OnErrorAction.cs | 2 +- .../BatchParser/Parser.cs | 2 +- .../BatchParser/PositionStruct.cs | 2 +- .../BatchParser/TextBlock.cs | 2 +- .../BatchParser/Token.cs | 4 ++-- .../BatchParser/VariableReference.cs | 2 +- 23 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs index ea3fbabb..4ec4b996 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs @@ -5,7 +5,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser { - public enum BatchParserAction + internal enum BatchParserAction { Continue = 0, Abort = 1 diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs index 2796012c..9e4e5532 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs @@ -17,7 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Single batch of SQL command /// - public class Batch + internal class Batch { #region Private methods diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs index 9334d3d8..d423fb16 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs @@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Error totalAffectedRows for a Batch /// - public class BatchErrorEventArgs : EventArgs + internal class BatchErrorEventArgs : EventArgs { #region Private Fields private string message = string.Empty; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs index 9ec6d0f1..3ec42f35 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs @@ -11,25 +11,25 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Event args for notification about non-error message /// - public class BatchMessageEventArgs : EventArgs + internal class BatchMessageEventArgs : EventArgs { private readonly string message = string.Empty; private readonly string detailedMessage = string.Empty; private readonly SqlError error; - - public BatchMessageEventArgs() + + private BatchMessageEventArgs() { } - public BatchMessageEventArgs(string msg) + internal BatchMessageEventArgs(string msg) : this(string.Empty, msg) { } - public BatchMessageEventArgs(string detailedMsg, string msg) : this(detailedMsg, msg, null) + internal BatchMessageEventArgs(string detailedMsg, string msg) : this(detailedMsg, msg, null) { } - public BatchMessageEventArgs(string detailedMsg, string msg, SqlError error) + internal BatchMessageEventArgs(string detailedMsg, string msg, SqlError error) { message = msg; detailedMessage = detailedMsg; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs index 69c977ef..62fd22e1 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs @@ -10,7 +10,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Class that parses queries into batches /// - public class BatchParser : + internal class BatchParser : ICommandHandler, IVariableResolver { diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs index 7da183c8..05961304 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs @@ -8,7 +8,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Class associated with batch parser execution errors /// - public class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs + internal class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs { private readonly ScriptMessageType messageType; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.cs index 8bf26eba..08f0b2fa 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.cs @@ -10,13 +10,13 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Class associated with batch parser execution finished event /// - public class BatchParserExecutionFinishedEventArgs : EventArgs + internal class BatchParserExecutionFinishedEventArgs : EventArgs { private readonly Batch batch = null; private readonly ScriptExecutionResult result; - public BatchParserExecutionFinishedEventArgs() + private BatchParserExecutionFinishedEventArgs() { } diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs index e195cdcd..d3d90fc9 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs @@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Class associated with batch parser execution start event /// - public class BatchParserExecutionStartEventArgs : EventArgs + internal class BatchParserExecutionStartEventArgs : EventArgs { private readonly Batch batch = null; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs index 37f8a0f0..721beba9 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs @@ -14,7 +14,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Class for handling SQL CMD by Batch Parser /// - public class BatchParserSqlCmd : BatchParser + internal class BatchParserSqlCmd : BatchParser { /// /// The internal variables that can be used in SqlCommand substitution. diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs index 1301a75b..0b80cf0d 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs @@ -11,17 +11,17 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode /// /// Class associated with setting batch results /// - public class BatchResultSetEventArgs : EventArgs + internal class BatchResultSetEventArgs : EventArgs { private readonly IDataReader dataReader = null; private readonly ShowPlanType expectedShowPlan = ShowPlanType.None; - + /// /// Default constructor /// /// - public BatchResultSetEventArgs(IDataReader dataReader, ShowPlanType expectedShowPlan) + internal BatchResultSetEventArgs(IDataReader dataReader, ShowPlanType expectedShowPlan) { this.dataReader = dataReader; this.expectedShowPlan = expectedShowPlan; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs index efbe8367..5c48dec6 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs @@ -8,7 +8,7 @@ using System; namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode { [Flags] - public enum ScriptExecutionResult + internal enum ScriptExecutionResult { Success = 0x1, Failure = 0x2, diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs index 4f265f94..d9774e61 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs @@ -5,7 +5,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode { - public enum ScriptMessageType + internal enum ScriptMessageType { FatalError, Error, diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs index 9ee08e98..01acfd98 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs @@ -6,7 +6,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode { [System.Flags] - public enum ShowPlanType + internal enum ShowPlanType { None = 0x0, ActualExecutionShowPlan = 0x1, diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs index 70034f90..24fd35e5 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs @@ -5,7 +5,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode { - public struct TextSpan + internal struct TextSpan { public int iEndIndex; public int iEndLine; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs index ac874e40..02117f9a 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs @@ -7,7 +7,7 @@ using System.IO; namespace Microsoft.SqlTools.ServiceLayer.BatchParser { - public interface ICommandHandler + internal interface ICommandHandler { BatchParserAction Go(TextBlock batch, int repeatCount); BatchParserAction OnError(Token token, OnErrorAction action); diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs index 3ee29cc4..8573b55f 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs @@ -5,7 +5,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser { - public interface IVariableResolver + internal interface IVariableResolver { string GetVariable(PositionStruct pos, string name); void SetVariable(PositionStruct pos, string name, string value); diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs index e2e0b5dd..33984d0c 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs @@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser /// This class gives information about lines being parsed by /// the Batch Parser /// - public class LineInfo + class LineInfo { private IEnumerable tokens; private IEnumerable variableRefs; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs index 2e2247fb..39d1f6a6 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs @@ -5,7 +5,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser { - public enum OnErrorAction + internal enum OnErrorAction { Ignore = 0, Exit = 1, diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs index de174887..16f00e58 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs @@ -16,7 +16,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser /// /// The Parser class on which the Batch Parser is based on /// - public sealed class Parser : IDisposable + internal sealed class Parser : IDisposable { private readonly ICommandHandler commandHandler; private Lexer lexer; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs index 25654eea..8f2758f6 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs @@ -8,7 +8,7 @@ using System; namespace Microsoft.SqlTools.ServiceLayer.BatchParser { [Serializable] - public struct PositionStruct + internal struct PositionStruct { private readonly int line; private readonly int column; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs index 2dfe7942..3b6e2710 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; namespace Microsoft.SqlTools.ServiceLayer.BatchParser { - public class TextBlock + internal class TextBlock { private readonly Parser parser; private readonly IEnumerable tokens; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.cs index 8ec6dccb..c1d74a18 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.cs @@ -5,12 +5,12 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser { - public sealed class Token + internal sealed class Token { /// /// Token class used by the lexer in Batch Parser /// - public Token(LexerTokenType tokenType, PositionStruct begin, PositionStruct end, string text, string filename) + internal Token(LexerTokenType tokenType, PositionStruct begin, PositionStruct end, string text, string filename) { TokenType = tokenType; Begin = begin; diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs index a31e2e5d..41e13937 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs @@ -8,7 +8,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser /// /// Class for reference of variables used by the lexer /// - public sealed class VariableReference + internal sealed class VariableReference { /// /// Constructor method for VariableReference class