diff --git a/Tests/Identifiers/CSharpIdentifiers/Access/Types/ClassType.cs b/Tests/Identifiers/CSharpIdentifiers/Access/Types/ClassType.cs new file mode 100644 index 0000000..17b3ec7 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Access/Types/ClassType.cs @@ -0,0 +1,10 @@ +namespace CSharpIdentifiers.Access.Types +{ + internal class ClassType + { + private void Method() + { + var value = new ClassType(); + } + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Access/Types/DelegateType.cs b/Tests/Identifiers/CSharpIdentifiers/Access/Types/DelegateType.cs new file mode 100644 index 0000000..035cf1a --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Access/Types/DelegateType.cs @@ -0,0 +1,9 @@ +namespace CSharpIdentifiers.Access.Types +{ + internal class DelegateType + { + internal delegate void Handle(); + + public Handle Handler; + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Access/Types/EnumType.cs b/Tests/Identifiers/CSharpIdentifiers/Access/Types/EnumType.cs new file mode 100644 index 0000000..c7a645a --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Access/Types/EnumType.cs @@ -0,0 +1,11 @@ +namespace CSharpIdentifiers.Access.Types +{ + internal class EnumType + { + internal enum MyEnum + { + } + + private readonly MyEnum value; + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Access/Types/InterfaceType.cs b/Tests/Identifiers/CSharpIdentifiers/Access/Types/InterfaceType.cs new file mode 100644 index 0000000..677ab77 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Access/Types/InterfaceType.cs @@ -0,0 +1,11 @@ +namespace CSharpIdentifiers.Access.Types +{ + internal interface IInterfaceType + { + } + + internal class InterfaceType + { + private readonly IInterfaceType value; + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Access/Types/StructureType.cs b/Tests/Identifiers/CSharpIdentifiers/Access/Types/StructureType.cs new file mode 100644 index 0000000..9c216f1 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Access/Types/StructureType.cs @@ -0,0 +1,10 @@ +namespace CSharpIdentifiers.Access.Types +{ + internal struct StructureType + { + private void Method() + { + var value = new StructureType(); + } + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Access/Types/TypeParameter.cs b/Tests/Identifiers/CSharpIdentifiers/Access/Types/TypeParameter.cs new file mode 100644 index 0000000..557fb16 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Access/Types/TypeParameter.cs @@ -0,0 +1,7 @@ +namespace CSharpIdentifiers.Access.Types +{ + internal class TypeParameter where TValue : new() + { + private TValue Value => new TValue(); + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/CSharpIdentifiers.csproj b/Tests/Identifiers/CSharpIdentifiers/CSharpIdentifiers.csproj index e185c1a..74e37f6 100644 --- a/Tests/Identifiers/CSharpIdentifiers/CSharpIdentifiers.csproj +++ b/Tests/Identifiers/CSharpIdentifiers/CSharpIdentifiers.csproj @@ -48,6 +48,12 @@ + + + + + + @@ -117,6 +123,12 @@ + + + + + + diff --git a/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/ClassType.cs b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/ClassType.cs new file mode 100644 index 0000000..7b1f1c2 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/ClassType.cs @@ -0,0 +1,6 @@ +namespace CSharpIdentifiers.Declarations.Types +{ + internal class ClassType + { + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/DelegateType.cs b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/DelegateType.cs new file mode 100644 index 0000000..76f1bec --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/DelegateType.cs @@ -0,0 +1,4 @@ +namespace CSharpIdentifiers.Declarations.Types +{ + internal delegate void Handle(); +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/EnumType.cs b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/EnumType.cs new file mode 100644 index 0000000..9fe695d --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/EnumType.cs @@ -0,0 +1,6 @@ +namespace CSharpIdentifiers.Declarations.Types +{ + internal enum EnumType + { + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/InterfaceType.cs b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/InterfaceType.cs new file mode 100644 index 0000000..0246740 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/InterfaceType.cs @@ -0,0 +1,6 @@ +namespace CSharpIdentifiers.Declarations.Types +{ + internal interface InterfaceType + { + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/StructureType.cs b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/StructureType.cs new file mode 100644 index 0000000..4ac30da --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/StructureType.cs @@ -0,0 +1,6 @@ +namespace CSharpIdentifiers.Declarations.Types +{ + internal struct StructureType + { + } +} \ No newline at end of file diff --git a/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/TypeParameter.cs b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/TypeParameter.cs new file mode 100644 index 0000000..9d3fe12 --- /dev/null +++ b/Tests/Identifiers/CSharpIdentifiers/Declarations/Types/TypeParameter.cs @@ -0,0 +1,9 @@ +namespace CSharpIdentifiers.Declarations.Types +{ + internal class TypeParameter + { + public void Method() + { + } + } +} \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/ClassType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/ClassType.vb new file mode 100644 index 0000000..4e11c96 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/ClassType.vb @@ -0,0 +1,9 @@ +Namespace Access.Types + + Public Class ClassType + + Public field As ClassType + + End Class + +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/DelegateType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/DelegateType.vb new file mode 100644 index 0000000..105cecc --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/DelegateType.vb @@ -0,0 +1,11 @@ +Namespace Access.Types + + Public Class DelegateType + + Public Delegate Sub Handle() + + Public field As Handle + + End Class + +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/EnumType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/EnumType.vb new file mode 100644 index 0000000..85dd72f --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/EnumType.vb @@ -0,0 +1,13 @@ +Namespace Access.Types + + Public Class EnumType + + Public Enum MyEnum + V + End Enum + + Public field As MyEnum + + End Class + +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/InterfaceType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/InterfaceType.vb new file mode 100644 index 0000000..48e8f03 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/InterfaceType.vb @@ -0,0 +1,12 @@ +Namespace Access.Types + + Public Class InterfaceType + + Public Interface IInterfaceType + + End Interface + + Public field As IInterfaceType + End Class + +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/ModuleType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/ModuleType.vb new file mode 100644 index 0000000..d4e7e46 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/ModuleType.vb @@ -0,0 +1,11 @@ +Namespace Access.Types + Public Module ModuleType + + Public field As Integer + + Sub Method() + Dim value = ModuleType.field + End Sub + + End Module +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/StructureType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/StructureType.vb new file mode 100644 index 0000000..4e75895 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/StructureType.vb @@ -0,0 +1,11 @@ +Namespace Access.Types + + Public Structure StructureType + + Sub Method() + Dim value = New StructureType() + End Sub + + End Structure + +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/TypeParameter.vb b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/TypeParameter.vb new file mode 100644 index 0000000..fc2bb5f --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Access/Types/TypeParameter.vb @@ -0,0 +1,7 @@ +Namespace Access.Types + + Public Class TypeParameter(Of TValue) + Public fiedl As TValue + End Class + +End Namespace \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/ClassType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/ClassType.vb new file mode 100644 index 0000000..4885a72 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/ClassType.vb @@ -0,0 +1,3 @@ +Public Class ClassType + +End Class \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/DelegateType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/DelegateType.vb new file mode 100644 index 0000000..21746aa --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/DelegateType.vb @@ -0,0 +1 @@ +Public Delegate Sub DelegateType() \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/EnumType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/EnumType.vb new file mode 100644 index 0000000..48ef59b --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/EnumType.vb @@ -0,0 +1,3 @@ +Public Enum EnumType + V +End Enum \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/InterfaceType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/InterfaceType.vb new file mode 100644 index 0000000..32369fb --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/InterfaceType.vb @@ -0,0 +1,3 @@ +Public Interface InterfaceType + +End Interface \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/ModuleType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/ModuleType.vb new file mode 100644 index 0000000..8842eff --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/ModuleType.vb @@ -0,0 +1,3 @@ +Module ModuleType + +End Module \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/StructureType.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/StructureType.vb new file mode 100644 index 0000000..5c470d5 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/StructureType.vb @@ -0,0 +1,3 @@ +Public Structure StructureType + +End Structure \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/TypeParameter.vb b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/TypeParameter.vb new file mode 100644 index 0000000..47352d5 --- /dev/null +++ b/Tests/Identifiers/VisualBasicIdentifiers/Declarations/Types/TypeParameter.vb @@ -0,0 +1,3 @@ +Public Class TypeParameter(Of TValue) + +End Class \ No newline at end of file diff --git a/Tests/Identifiers/VisualBasicIdentifiers/VisualBasicIdentifiers.vbproj b/Tests/Identifiers/VisualBasicIdentifiers/VisualBasicIdentifiers.vbproj index 9ea6c7c..11ccb1e 100644 --- a/Tests/Identifiers/VisualBasicIdentifiers/VisualBasicIdentifiers.vbproj +++ b/Tests/Identifiers/VisualBasicIdentifiers/VisualBasicIdentifiers.vbproj @@ -89,6 +89,13 @@ + + + + + + + @@ -141,6 +148,13 @@ + + + + + + + diff --git a/src/common/CoCo.MsBuild/MsBuildEngine.cs b/src/common/CoCo.MsBuild/MsBuildEngine.cs index 108facb..1d407c4 100644 --- a/src/common/CoCo.MsBuild/MsBuildEngine.cs +++ b/src/common/CoCo.MsBuild/MsBuildEngine.cs @@ -108,13 +108,14 @@ public MsBuildEngine(Logger logger) for (int i = 0; i < projectFileNames.Length; ++i) { var projectGlobalProperties = globalProperties[i]; - var properties = new Dictionary(projectGlobalProperties.Count); + Dictionary properties = null; if (projectGlobalProperties != null) { + properties = new Dictionary(projectGlobalProperties.Count); var removeProjectProperties = removeGlobalProperties[i]; foreach (DictionaryEntry item in projectGlobalProperties) { - if (item.Key is string key && (removeGlobalProperties == null || !removeProjectProperties.Contains(key))) + if (item.Key is string key && (removeProjectProperties is null || !removeProjectProperties.Contains(key))) { properties.Add(key, item.Value as string); } @@ -131,15 +132,15 @@ public MsBuildEngine(Logger logger) } } - var project = new Project(projectFileNames[i], properties, existingToolsVersion); - var result = project.CreateProjectInstance().Build(targetNames, new ILogger[0], out var targetOuputs); + var project = new Project(projectFileNames[i], properties ?? new Dictionary(), existingToolsVersion); + var result = project.CreateProjectInstance().Build(targetNames, new ILogger[0], out var targetOutputs); if (!result) _logger.Error("{0} project was failed to build", projectFileNames[i]); allSuccess &= result; if (returnTargetOutputs) { - var projectTargetOutputs = new Dictionary(targetOuputs.Count); - foreach (var item in targetOuputs) + var projectTargetOutputs = new Dictionary(targetOutputs.Count); + foreach (var item in targetOutputs) { projectTargetOutputs.Add(item.Key, item.Value.Items); } diff --git a/src/common/CoCo.UI/UI/PresetsControl.xaml b/src/common/CoCo.UI/UI/PresetsControl.xaml index 55de8d1..105017b 100644 --- a/src/common/CoCo.UI/UI/PresetsControl.xaml +++ b/src/common/CoCo.UI/UI/PresetsControl.xaml @@ -67,7 +67,6 @@ Margin="8,0,8,0" Command="{Binding ApplyPreset}" CommandParameter="{Binding}" - Foreground="#5e5e5a" Style="{StaticResource commonButtonStyle}" Template="{StaticResource ApplyPresetButton}" />