提交 3bf28e57 编写于 作者: C CyrusNajmabadi

Merge remote-tracking branch 'upstream/master' into awaitCompletion2

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<configuration>
<packageRestore>
<!-- Currently, the repository's version of NuGet.exe and Visual Studio's version
fight over the format of project.lock.json because the one in the respository
is newer. To prevent that, turn off package restore. -->
<add key="automatic" value="false" />
</packageRestore>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<config>
<add key="repositoryPath" value="../packages" />
</config>
<packageSources>
<clear />
<add key="dotnet.myget.org dotnet-coreclr" value="https://dotnet.myget.org/F/dotnet-coreclr/api/v3/index.json" />
<add key="dotnet.myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="dotnet.myget.org dotnet-corefxtestdata" value="https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/index.json" />
......
......@@ -41,9 +41,6 @@ call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev14.project.json"
echo Restoring packages: Toolsets (Dev15 VS SDK RC build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev15rc.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Restoring packages: Roslyn SDK
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\roslynsdk.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Locating MSBuild for Solution restore
call "%RoslynRoot%SetDevCommandPrompt.cmd" || goto :RestoreFailed
......
......@@ -360,6 +360,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunctionResolver", "src\Exp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunctionResolverTest", "src\ExpressionEvaluator\Core\Test\FunctionResolver\FunctionResolverTest.csproj", "{DD317BE1-42A1-4795-B1D4-F370C40D649A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorVisualStudio", "src\VisualStudio\Razor\RazorVisualStudio.csproj", "{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorServiceHub", "src\Workspaces\Remote\Razor\RazorServiceHub.csproj", "{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Compilers\Core\CommandLine\CommandLine.projitems*{06b26dcb-7a12-48ef-ae50-708593abd05f}*SharedItemsImports = 4
......@@ -3187,6 +3191,46 @@ Global
{DD317BE1-42A1-4795-B1D4-F370C40D649A}.Release|x64.Build.0 = Release|Any CPU
{DD317BE1-42A1-4795-B1D4-F370C40D649A}.Release|x86.ActiveCfg = Release|Any CPU
{DD317BE1-42A1-4795-B1D4-F370C40D649A}.Release|x86.Build.0 = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|ARM.Build.0 = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|x64.ActiveCfg = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|x64.Build.0 = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|x86.ActiveCfg = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Debug|x86.Build.0 = Debug|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|Any CPU.Build.0 = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|ARM.ActiveCfg = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|ARM.Build.0 = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|x64.ActiveCfg = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|x64.Build.0 = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|x86.ActiveCfg = Release|Any CPU
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980}.Release|x86.Build.0 = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|ARM.ActiveCfg = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|ARM.Build.0 = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|x64.ActiveCfg = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|x64.Build.0 = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|x86.ActiveCfg = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Debug|x86.Build.0 = Debug|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|Any CPU.Build.0 = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|ARM.ActiveCfg = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|ARM.Build.0 = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|x64.ActiveCfg = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|x64.Build.0 = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|x86.ActiveCfg = Release|Any CPU
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -3357,5 +3401,7 @@ Global
{69F853E5-BD04-4842-984F-FC68CC51F402} = {8DBA5174-B0AA-4561-82B1-A46607697753}
{6FC8E6F5-659C-424D-AEB5-331B95883E29} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{DD317BE1-42A1-4795-B1D4-F370C40D649A} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{0C0EEB55-4B6D-4F2B-B0BB-B9EB2BA9E980} = {8DBA5174-B0AA-4561-82B1-A46607697753}
{B6FC05F2-0E49-4BE2-8030-ACBB82B7F431} = {55A62CFA-1155-46F1-ADF3-BEEE51B58AB5}
EndGlobalSection
EndGlobal
......@@ -5,6 +5,7 @@
<appSettings>
<add key="xunit.diagnosticMessages" value="false"/>
<add key="xunit.parallelizeTestCollections" value="false"/>
<add key="xunit.shadowCopy" value="false"/> <!-- Set shadow copy to false so that the VS Test Explorer can properly load our public signed binaries -->
</appSettings>
<system.diagnostics>
<trace>
......
......@@ -5,6 +5,7 @@
<appSettings>
<add key="xunit.diagnosticMessages" value="false"/>
<add key="xunit.parallelizeTestCollections" value="false"/>
<add key="xunit.shadowCopy" value="false"/> <!-- Set shadow copy to false so that the VS Test Explorer can properly load our public signed binaries -->
</appSettings>
<system.diagnostics>
<trace>
......
......@@ -16,6 +16,7 @@
<MicrosoftCodeAnalysisAnalyzersVersion>1.1.0</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisElfieVersion>0.10.6-rc2</MicrosoftCodeAnalysisElfieVersion>
<MicrosoftCompositionVersion>1.0.27</MicrosoftCompositionVersion>
<MicrosoftCSharpVersion>4.3.0</MicrosoftCSharpVersion>
<MicrosoftDiagnosticsRuntimeVersion>0.8.31-beta</MicrosoftDiagnosticsRuntimeVersion>
<MicrosoftDiagnosticsTracingTraceEventVersion>1.0.35</MicrosoftDiagnosticsTracingTraceEventVersion>
<MicrosoftDiaSymReaderVersion>1.1.0-beta1-60818-02</MicrosoftDiaSymReaderVersion>
......@@ -88,9 +89,9 @@
<SystemXmlXmlDocumentVersion>4.3.0</SystemXmlXmlDocumentVersion>
<SystemXmlXmlSerializerVersion>4.3.0</SystemXmlXmlSerializerVersion>
<SystemXmlXPathXDocumentVersion>4.3.0</SystemXmlXPathXDocumentVersion>
<xunitVersion>2.1.0</xunitVersion>
<xunitassertVersion>2.1.0</xunitassertVersion>
<xunitVersion>2.2.0-beta4-build3444</xunitVersion>
<xunitconsolenetcoreVersion>1.0.2-prerelease-00104</xunitconsolenetcoreVersion>
<xunitrunnerconsoleVersion>2.2.0-beta1-build3239</xunitrunnerconsoleVersion>
<xunitrunnerconsoleVersion>2.2.0-beta4-build3444</xunitrunnerconsoleVersion>
<xunitrunnervisualstudioVersion>2.2.0-beta4-build1194</xunitrunnervisualstudioVersion>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -29,6 +29,9 @@
<InternalsVisibleToMonodevelop>
<Visible>false</Visible>
</InternalsVisibleToMonodevelop>
<InternalsVisibleToRazor>
<Visible>false</Visible>
</InternalsVisibleToRazor>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(PublicKey)' != '' and '$(SignAssembly)' == 'True'">
......@@ -44,7 +47,7 @@
Inputs="$(MSBuildThisFileFullPath);$(MSBuildProjectFile)"
Outputs="$(GeneratedInternalsVisibleToFile)"
DependsOnTargets="PrepareForBuild"
Condition="'@(InternalsVisibleTo)' != '' OR '@(InternalsVisibleToTest)' != '' OR '@(InternalsVisibleToTypeScript)' != '' OR '@(InternalsVisibleToVisualStudio)' != '' OR '@(InternalsVisibleToFSharp)' != '' OR '@(InternalsVisibleToMoq)' != ''">
Condition="'@(InternalsVisibleTo)' != '' OR '@(InternalsVisibleToTest)' != '' OR '@(InternalsVisibleToTypeScript)' != '' OR '@(InternalsVisibleToVisualStudio)' != '' OR '@(InternalsVisibleToFSharp)' != '' OR '@(InternalsVisibleToMoq)' != '' OR '@(InternalsVisibleToRazor)' != ''">
<!--
This is a slightly evil trick. What we have is a group of InternalsVisibleTo items which
......@@ -97,7 +100,11 @@
Condition="'@(InternalsVisibleToMonodevelop)' != ''">
<Output TaskParameter="Include" ItemName="InternalsVisibleToAttribute" />
</CreateItem>
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"
AdditionalMetadata="_Parameter1=%(InternalsVisibleToRazor.Identity), PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb"
Condition="'@(InternalsVisibleToRazor)' != ''">
<Output TaskParameter="Include" ItemName="InternalsVisibleToAttribute" />
</CreateItem>
<!-- The necessity of this Task is tracked by https://github.com/dotnet/roslyn/issues/8421 -->
<WriteCodeFragmentEx
AssemblyAttributes="@(InternalsVisibleToAttribute)"
......
......@@ -8,13 +8,13 @@
<PropertyGroup>
<!-- This is the assembly version of Roslyn from the .NET assembly perspective. It should only be revved during significant point releases. -->
<RoslynAssemblyVersionBase Condition="'$(RoslynAssemblyVersion)' == ''">2.0.0</RoslynAssemblyVersionBase>
<RoslynAssemblyVersionBase Condition="'$(RoslynAssemblyVersion)' == ''">2.1.0</RoslynAssemblyVersionBase>
<!-- This is the file version of Roslyn, as placed in the PE header. It should be revved during point releases, and is also what provides the basis for our NuGet package versioning. -->
<RoslynFileVersionBase Condition="'$(RoslynFileVersionBase)' == ''">2.0.0</RoslynFileVersionBase>
<RoslynFileVersionBase Condition="'$(RoslynFileVersionBase)' == ''">2.1.0</RoslynFileVersionBase>
<!-- The release moniker for our packages. Developers should use "dev" and official builds pick the branch
moniker listed below -->
<RoslynNuGetMoniker Condition="'$(RoslynNuGetMoniker)' == ''">dev</RoslynNuGetMoniker>
<RoslynNuGetMoniker Condition="'$(OfficialBuild)' == 'true'">rc3</RoslynNuGetMoniker>
<RoslynNuGetMoniker Condition="'$(OfficialBuild)' == 'true'">beta1</RoslynNuGetMoniker>
<!-- This is the base of the NuGet versioning for prerelease packages -->
<NuGetPreReleaseVersion>$(RoslynFileVersionBase)-$(RoslynNuGetMoniker)</NuGetPreReleaseVersion>
<!-- Currently we version IW the same as Roslyn. -->
......
{
"dependencies": {
},
"dependencies": { },
"frameworks": {
"net46": { }
},
......
......@@ -8,6 +8,5 @@ For such toolset packages we use the project.json files in this directory to res
- dev14.project.json: The Dev14 SDK and toolsets
- dev15rc.project.json: The Dev15 RC SDK and toolsets.
- closed.project.json: Contains all of the NuGet packages contained in our closed repo that aren't in Open. This is done only to give visibility to these packages in our build verification tools.
- roslynsdk.project.json: Download the V1 Roslyn SDK. This is used as assets in our SDK VSIX projects.
In general we try and keep the number of files here low. New ones are added only when the contents can potentially conflict with packages listed in the existing files.
{
"dependencies": {
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.35",
"Newtonsoft.Json": "9.0.1",
"System.IdentityModel.Tokens.Jwt": "5.0.0",
"System.IO.Compression.ZipFile": "4.0.1"
},
"frameworks": {
"net46": {}
}
"dependencies": {
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.35",
"Newtonsoft.Json": "9.0.1",
"System.IdentityModel.Tokens.Jwt": "5.0.0",
"System.IO.Compression.ZipFile": "4.0.1"
},
"frameworks": {
"net46": {}
}
}
{
"dependencies": {
"Microsoft.VSSDK.BuildTools": "14.3.25420"
},
"frameworks": {
"net46": {}
}
"dependencies": {
"Microsoft.VSSDK.BuildTools": "14.3.25420"
},
"frameworks": {
"net46": {}
}
}
{
"dependencies": {
"Microsoft.VSSDK.BuildTools": "15.0.25929-RC2"
},
"frameworks": {
"net46": {}
}
"dependencies": {
"Microsoft.VSSDK.BuildTools": "15.0.25929-RC2"
},
"frameworks": {
"net46": {}
}
}
......@@ -9,15 +9,15 @@
"Microsoft.Net.Compilers": "2.0.0-rc2-61102-09",
"Microsoft.Net.RoslynDiagnostics": "1.2.0-beta2",
"FakeSign": "0.9.2",
"xunit.assert": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194",
"Roslyn.Build.Util": "0.9.4-portable",
"RoslynDependencies.OptimizationData": "2.0.0-rc-61101-16",
"RoslynTools.Microsoft.LocateVS": "0.2.2-beta",
"RoslynTools.Microsoft.SignTool": "0.2.2-beta",
"RoslynTools.Microsoft.VSIXExpInstaller": "0.2.2-beta",
"GitLink": "2.3.0"
},
"frameworks": {
"net461": {}
......
......@@ -6,15 +6,15 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.VisualBasic" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
......
......@@ -6,15 +6,15 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.VisualBasic" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
......
......@@ -6,15 +6,15 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.VisualBasic" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
......
{
"fixedPackages": {
"Microsoft.VisualStudio.Language.Intellisense": "14.3.25407",
"Microsoft.VSSDK.BuildTools": [ "14.3.25420", "15.0.25929-RC2" ],
"Newtonsoft.Json": [ "9.0.1" ],
"System.Reflection.Metadata": "1.0.21",
"System.Collections.Immutable": "1.1.36",
"Microsoft.VisualStudio.Editor": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Imaging": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.ImageCatalog": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.UI.Wpf": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.Logic": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.Data": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.UI": "14.3.25407",
"Microsoft.Build": {
"generateName": "Microsoft.Build.14",
"version": "14.3.0"
},
"Microsoft.Build.Tasks.Core": {
"generateName": "Microsoft.Build.Tasks.Core.14",
"version": "14.3.0"
}
"fixedPackages": {
"Microsoft.VisualStudio.Language.Intellisense": "14.3.25407",
"Microsoft.VSSDK.BuildTools": [ "14.3.25420", "15.0.25929-RC2" ],
"Newtonsoft.Json": "9.0.1",
"System.Reflection.Metadata": "1.0.21",
"System.Collections.Immutable": "1.1.36",
"Microsoft.VisualStudio.CoreUtility": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Editor": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Imaging": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.ImageCatalog": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Shell.Immutable.10.0": "10.0.30319",
"Microsoft.VisualStudio.Text.UI.Wpf": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.Logic": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.Data": [ "14.3.25407", "15.0.25726-Preview5" ],
"Microsoft.VisualStudio.Text.UI": "14.3.25407",
"Microsoft.Build": {
"generateName": "Microsoft.Build.14",
"version": "14.3.0"
},
"Microsoft.Build.Tasks.Core": {
"generateName": "Microsoft.Build.Tasks.Core.14",
"version": "14.3.0"
}
},
"toolsetPackages": [
"Microsoft.VSSDK.BuildTools"
],
"toolsetPackages": [
"Microsoft.VSSDK.BuildTools"
],
"generate": {
"msbuild": {
"path": "build\\Targets\\Dependencies.props",
"values": [
"Microsoft.Dia.*",
"System.*",
"Microsoft.CodeAnalysis.Analyzers",
"Microsoft.VisualBasic",
"Microsoft.Composition",
"MicroBuild.*",
"ManagedEsent",
"Microsoft.CodeAnalysis.Elfie",
"xunit",
"RoslynTools.*",
"^Microsoft.?Build.*",
"GitLink",
"Microsoft.NETCore.Runtime.CoreCLR"
]
}
},
"generate": {
"msbuild": {
"path": "build\\Targets\\Dependencies.props",
"values": [
"Microsoft.Dia.*",
"System.*",
"Microsoft.CodeAnalysis.Analyzers",
"Microsoft.VisualBasic",
"Microsoft.Composition",
"Microsoft.CSharp",
"MicroBuild.*",
"ManagedEsent",
"Microsoft.CodeAnalysis.Elfie",
"xunit",
"RoslynTools.*",
"^Microsoft.?Build.*",
"GitLink",
"Microsoft.NETCore.Runtime.CoreCLR"
]
}
},
"nuspecExcludes": [
"^packages.*",
"^Binaries.*",
"^src\\\\Samples.*",
"^src\\\\Dependencies.*",
".*NuSpec.loc.*",
".*Templates.*"
]
"nuspecExcludes": [
"^packages.*",
"^Binaries.*",
"^src\\\\Samples.*",
"^src\\\\Dependencies.*",
".*NuSpec.loc.*",
".*Templates.*"
]
}
{
"sign": [
{
"certificate": "Microsoft402",
"strongName": "MsSharedLib72",
"values": [
"Dlls\\BasicCodeAnalysis\\Microsoft.CodeAnalysis.VisualBasic.dll",
"Dlls\\BasicEditorFeatures\\Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.dll",
"Dlls\\BasicFeatures\\Microsoft.CodeAnalysis.VisualBasic.Features.dll",
"Dlls\\BasicInteractiveEditorFeatures\\Microsoft.CodeAnalysis.VisualBasic.InteractiveEditorFeatures.dll",
"Dlls\\BasicScripting\\Microsoft.CodeAnalysis.VisualBasic.Scripting.dll",
"Dlls\\BasicVisualStudioRepl\\Microsoft.VisualStudio.VisualBasic.Repl.dll",
"Dlls\\BasicVisualStudio\\Microsoft.VisualStudio.LanguageServices.VisualBasic.dll",
"Dlls\\BasicWorkspace\\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll",
"Dlls\\CSharpCodeAnalysis\\Microsoft.CodeAnalysis.CSharp.dll",
"Dlls\\CSharpEditorFeatures\\Microsoft.CodeAnalysis.CSharp.EditorFeatures.dll",
"Dlls\\CSharpFeatures\\Microsoft.CodeAnalysis.CSharp.Features.dll",
"Dlls\\CSharpInteractiveEditorFeatures\\Microsoft.CodeAnalysis.CSharp.InteractiveEditorFeatures.dll",
"Dlls\\CSharpScripting\\Microsoft.CodeAnalysis.CSharp.Scripting.dll",
"Dlls\\CSharpVisualStudioRepl\\Microsoft.VisualStudio.CSharp.Repl.dll",
"Dlls\\CSharpVisualStudio\\Microsoft.VisualStudio.LanguageServices.CSharp.dll",
"Dlls\\CSharpWorkspace\\Microsoft.CodeAnalysis.CSharp.Workspaces.dll",
"Dlls\\CodeAnalysis\\Microsoft.CodeAnalysis.dll",
"Dlls\\Diagnostics\\Roslyn.Hosting.Diagnostics.dll",
"Dlls\\EditorFeatures.Next\\Microsoft.CodeAnalysis.EditorFeatures.Next.dll",
"Dlls\\EditorFeatures\\Microsoft.CodeAnalysis.EditorFeatures.dll",
"Dlls\\Features\\Microsoft.CodeAnalysis.Features.dll",
"Dlls\\InteractiveEditorFeatures\\Microsoft.CodeAnalysis.InteractiveEditorFeatures.dll",
"Dlls\\InteractiveFeatures\\Microsoft.CodeAnalysis.InteractiveFeatures.dll",
"Dlls\\MSBuildTask\\Microsoft.Build.Tasks.CodeAnalysis.dll",
"Dlls\\RemoteWorkspaces\\Microsoft.CodeAnalysis.Remote.Workspaces.dll",
"Dlls\\Scripting\\Microsoft.CodeAnalysis.Scripting.dll",
"Dlls\\ServiceHub\\Microsoft.CodeAnalysis.Remote.ServiceHub.dll",
"Dlls\\ServicesVisualStudio.Next\\Microsoft.VisualStudio.LanguageServices.Next.dll",
"Dlls\\ServicesVisualStudioImpl\\Microsoft.VisualStudio.LanguageServices.Implementation.dll",
"Dlls\\ServicesVisualStudio\\Microsoft.VisualStudio.LanguageServices.dll",
"Dlls\\SolutionExplorerShim\\Microsoft.VisualStudio.LanguageServices.SolutionExplorer.dll",
"Dlls\\SyntaxVisualizerControl\\Roslyn.SyntaxVisualizer.Control.dll",
"Dlls\\SyntaxVisualizerDgmlHelper\\Roslyn.SyntaxVisualizer.DgmlHelper.dll",
"Dlls\\SyntaxVisualizerExtension\\Roslyn.SyntaxVisualizer.Extension.dll",
"Dlls\\TextEditorFeatures\\Microsoft.CodeAnalysis.EditorFeatures.Text.dll",
"Dlls\\VisualStudioInteractiveServices\\Microsoft.VisualStudio.InteractiveServices.dll",
"Dlls\\Workspaces.Desktop\\Microsoft.CodeAnalysis.Workspaces.Desktop.dll",
"Dlls\\Workspaces\\Microsoft.CodeAnalysis.Workspaces.dll",
"Dlls\\XamlVisualStudio\\Microsoft.VisualStudio.LanguageServices.Xaml.dll",
"Exes\\InteractiveHost\\InteractiveHost.exe",
"Exes\\VBCSCompiler\\VBCSCompiler.exe",
"Exes\\csc\\csc.exe",
"Exes\\csccore\\csc.exe",
"Exes\\csi\\csi.exe",
"Exes\\csicore\\csi.exe",
"Exes\\vbc\\vbc.exe",
"Exes\\vbccore\\vbc.exe",
"Exes\\vbi\\vbi.exe",
"Exes\\vbicore\\vbi.exe",
"Exes\\Pdb2Xml\\Microsoft.DiaSymReader.PortablePdb.dll",
"Exes\\Pdb2Xml\\Pdb2Xml.exe",
"Vsix\\CompilerExtension\\Roslyn.Compilers.Extension.dll",
"Vsix\\Templates\\Roslyn.Templates.dll",
"Vsix\\VisualStudioDiagnosticsWindow\\Roslyn.VisualStudio.DiagnosticsWindow.dll",
"Vsix\\VisualStudioInteractiveComponents\\Roslyn.VisualStudio.InteractiveComponents.dll"
]
},
{
"certificate": "WindowsPhone623",
"strongName": "MsSharedLib72",
"values": [
"Dlls\\ExpressionCompiler\\Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler.dll",
"Dlls\\FunctionResolver\\Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.dll",
"Dlls\\ResultProvider.Portable\\Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\CSharpExpressionCompiler\\Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.dll",
"Dlls\\CSharpResultProvider.Portable\\Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\BasicExpressionCompiler\\Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.dll",
"Dlls\\BasicResultProvider.Portable\\Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ResultProvider.dll"
]
},
{
"certificate": "MicrosoftSHA1Win8WinBlue",
"strongName": "MsSharedLib72",
"values": [
"Dlls\\ResultProvider.NetFX20\\Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\CSharpResultProvider.NetFX20\\Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\BasicResultProvider.NetFX20\\Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ResultProvider.dll"
]
},
{
"certificate": "VsixSHA2",
"strongName": null,
"values": [
"Vsix\\ExpressionEvaluatorPackage\\ExpressionEvaluatorPackage.vsix",
"Vsix\\CompilerExtension\\Roslyn.Compilers.Extension.vsix",
"Vsix\\Roslyn.Deployment.Full\\Roslyn.Deployment.Full.vsix",
"Vsix\\Roslyn.Deployment.Full.Next\\Roslyn.Deployment.Full.Next.vsix",
"Vsix\\VisualStudioDiagnosticsWindow\\Roslyn.VisualStudio.DiagnosticsWindow.vsix",
"Vsix\\VisualStudioInteractiveComponents\\Roslyn.VisualStudio.InteractiveComponents.vsix",
"Vsix\\VisualStudioSetup.Next\\Roslyn.VisualStudio.Setup.Next.vsix",
"Vsix\\VisualStudioSetup\\Roslyn.VisualStudio.Setup.vsix",
"Vsix\\Roslyn\\RoslynDeployment.vsix",
"Vsix\\Templates\\Roslyn Templates\\Release\\Roslyn SDK.vsix"
]
}
],
"sign": [
{
"certificate": "Microsoft402",
"strongName": "MsSharedLib72",
"values": [
"Dlls\\BasicCodeAnalysis\\Microsoft.CodeAnalysis.VisualBasic.dll",
"Dlls\\BasicEditorFeatures\\Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.dll",
"Dlls\\BasicFeatures\\Microsoft.CodeAnalysis.VisualBasic.Features.dll",
"Dlls\\BasicInteractiveEditorFeatures\\Microsoft.CodeAnalysis.VisualBasic.InteractiveEditorFeatures.dll",
"Dlls\\BasicScripting\\Microsoft.CodeAnalysis.VisualBasic.Scripting.dll",
"Dlls\\BasicVisualStudioRepl\\Microsoft.VisualStudio.VisualBasic.Repl.dll",
"Dlls\\BasicVisualStudio\\Microsoft.VisualStudio.LanguageServices.VisualBasic.dll",
"Dlls\\BasicWorkspace\\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll",
"Dlls\\CSharpCodeAnalysis\\Microsoft.CodeAnalysis.CSharp.dll",
"Dlls\\CSharpEditorFeatures\\Microsoft.CodeAnalysis.CSharp.EditorFeatures.dll",
"Dlls\\CSharpFeatures\\Microsoft.CodeAnalysis.CSharp.Features.dll",
"Dlls\\CSharpInteractiveEditorFeatures\\Microsoft.CodeAnalysis.CSharp.InteractiveEditorFeatures.dll",
"Dlls\\CSharpScripting\\Microsoft.CodeAnalysis.CSharp.Scripting.dll",
"Dlls\\CSharpVisualStudioRepl\\Microsoft.VisualStudio.CSharp.Repl.dll",
"Dlls\\CSharpVisualStudio\\Microsoft.VisualStudio.LanguageServices.CSharp.dll",
"Dlls\\CSharpWorkspace\\Microsoft.CodeAnalysis.CSharp.Workspaces.dll",
"Dlls\\CodeAnalysis\\Microsoft.CodeAnalysis.dll",
"Dlls\\Diagnostics\\Roslyn.Hosting.Diagnostics.dll",
"Dlls\\EditorFeatures.Next\\Microsoft.CodeAnalysis.EditorFeatures.Next.dll",
"Dlls\\EditorFeatures\\Microsoft.CodeAnalysis.EditorFeatures.dll",
"Dlls\\Features\\Microsoft.CodeAnalysis.Features.dll",
"Dlls\\InteractiveEditorFeatures\\Microsoft.CodeAnalysis.InteractiveEditorFeatures.dll",
"Dlls\\InteractiveFeatures\\Microsoft.CodeAnalysis.InteractiveFeatures.dll",
"Dlls\\MSBuildTask\\Microsoft.Build.Tasks.CodeAnalysis.dll",
"Dlls\\RemoteWorkspaces\\Microsoft.CodeAnalysis.Remote.Workspaces.dll",
"Dlls\\Scripting\\Microsoft.CodeAnalysis.Scripting.dll",
"Dlls\\ServiceHub\\Microsoft.CodeAnalysis.Remote.ServiceHub.dll",
"Dlls\\ServicesVisualStudio.Next\\Microsoft.VisualStudio.LanguageServices.Next.dll",
"Dlls\\ServicesVisualStudioImpl\\Microsoft.VisualStudio.LanguageServices.Implementation.dll",
"Dlls\\ServicesVisualStudio\\Microsoft.VisualStudio.LanguageServices.dll",
"Dlls\\SolutionExplorerShim\\Microsoft.VisualStudio.LanguageServices.SolutionExplorer.dll",
"Dlls\\SyntaxVisualizerControl\\Roslyn.SyntaxVisualizer.Control.dll",
"Dlls\\SyntaxVisualizerDgmlHelper\\Roslyn.SyntaxVisualizer.DgmlHelper.dll",
"Dlls\\SyntaxVisualizerExtension\\Roslyn.SyntaxVisualizer.Extension.dll",
"Dlls\\RazorServiceHub\\Microsoft.CodeAnalysis.Remote.Razor.ServiceHub.dll",
"Dlls\\RazorVisualStudio\\Microsoft.VisualStudio.LanguageServices.Razor.RemoteClient.dll",
"Dlls\\TextEditorFeatures\\Microsoft.CodeAnalysis.EditorFeatures.Text.dll",
"Dlls\\VisualStudioInteractiveServices\\Microsoft.VisualStudio.InteractiveServices.dll",
"Dlls\\Workspaces.Desktop\\Microsoft.CodeAnalysis.Workspaces.Desktop.dll",
"Dlls\\Workspaces\\Microsoft.CodeAnalysis.Workspaces.dll",
"Dlls\\XamlVisualStudio\\Microsoft.VisualStudio.LanguageServices.Xaml.dll",
"Exes\\InteractiveHost\\InteractiveHost.exe",
"Exes\\VBCSCompiler\\VBCSCompiler.exe",
"Exes\\csc\\csc.exe",
"Exes\\csccore\\csc.exe",
"Exes\\csi\\csi.exe",
"Exes\\csicore\\csi.exe",
"Exes\\vbc\\vbc.exe",
"Exes\\vbccore\\vbc.exe",
"Exes\\vbi\\vbi.exe",
"Exes\\vbicore\\vbi.exe",
"Exes\\Pdb2Xml\\Microsoft.DiaSymReader.PortablePdb.dll",
"Exes\\Pdb2Xml\\Pdb2Xml.exe",
"Vsix\\CompilerExtension\\Roslyn.Compilers.Extension.dll",
"Vsix\\Templates\\Roslyn.Templates.dll",
"Vsix\\VisualStudioDiagnosticsWindow\\Roslyn.VisualStudio.DiagnosticsWindow.dll",
"Vsix\\VisualStudioInteractiveComponents\\Roslyn.VisualStudio.InteractiveComponents.dll"
]
},
{
"certificate": "WindowsPhone623",
"strongName": "MsSharedLib72",
"values": [
"Dlls\\ExpressionCompiler\\Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler.dll",
"Dlls\\FunctionResolver\\Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.dll",
"Dlls\\ResultProvider.Portable\\Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\CSharpExpressionCompiler\\Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.dll",
"Dlls\\CSharpResultProvider.Portable\\Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\BasicExpressionCompiler\\Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.dll",
"Dlls\\BasicResultProvider.Portable\\Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ResultProvider.dll"
]
},
{
"certificate": "MicrosoftSHA1Win8WinBlue",
"strongName": "MsSharedLib72",
"values": [
"Dlls\\ResultProvider.NetFX20\\Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\CSharpResultProvider.NetFX20\\Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider.dll",
"Dlls\\BasicResultProvider.NetFX20\\Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ResultProvider.dll"
]
},
{
"certificate": "VsixSHA2",
"strongName": null,
"values": [
"Vsix\\ExpressionEvaluatorPackage\\ExpressionEvaluatorPackage.vsix",
"Vsix\\CompilerExtension\\Roslyn.Compilers.Extension.vsix",
"Vsix\\Roslyn.Deployment.Full\\Roslyn.Deployment.Full.vsix",
"Vsix\\Roslyn.Deployment.Full.Next\\Roslyn.Deployment.Full.Next.vsix",
"Vsix\\VisualStudioDiagnosticsWindow\\Roslyn.VisualStudio.DiagnosticsWindow.vsix",
"Vsix\\VisualStudioInteractiveComponents\\Roslyn.VisualStudio.InteractiveComponents.vsix",
"Vsix\\VisualStudioSetup.Next\\Roslyn.VisualStudio.Setup.Next.vsix",
"Vsix\\VisualStudioSetup\\Roslyn.VisualStudio.Setup.vsix",
"Vsix\\Roslyn\\RoslynDeployment.vsix",
"Vsix\\Templates\\Roslyn Templates\\Release\\Roslyn SDK.vsix"
]
}
],
"exclude": [
"Esent.Interop.dll",
"Microsoft.CodeAnalysis.Elfie.dll",
"Microsoft.DiaSymReader.dll",
"Microsoft.DiaSymReader.Native.amd64.dll",
"Microsoft.DiaSymReader.Native.arm.dll",
"Microsoft.DiaSymReader.Native.x86.dll",
"Newtonsoft.Json.dll",
"StreamJsonRpc.dll",
"StreamJsonRpc.resources.dll",
"System.AppContext.dll",
"System.Collections.Immutable.dll",
"System.Composition.AttributedModel.dll",
"System.Composition.Convention.dll",
"System.Composition.Hosting.dll",
"System.Composition.TypedParts.dll",
"System.Composition.Runtime.dll",
"System.Console.dll",
"System.Diagnostics.FileVersionInfo.dll",
"System.Diagnostics.Process.dll",
"System.Diagnostics.StackTrace.dll",
"System.IO.Compression.dll",
"System.IO.FileSystem.dll",
"System.IO.FileSystem.DriveInfo.dll",
"System.IO.FileSystem.Primitives.dll",
"System.IO.Pipes.dll",
"System.Reflection.Metadata.dll",
"System.Runtime.InteropServices.RuntimeInformation.dll",
"System.Security.AccessControl.dll",
"System.Security.Cryptography.Algorithms.dll",
"System.Security.Cryptography.Encoding.dll",
"System.Security.Cryptography.Primitives.dll",
"System.Security.Cryptography.X509Certificates.dll",
"System.Security.Principal.Windows.dll",
"System.Text.Encoding.CodePages.dll",
"System.Threading.Thread.dll",
"System.ValueTuple.dll",
"System.Xml.ReaderWriter.dll",
"System.Xml.XmlDocument.dll",
"System.Xml.XPath.XDocument.dll",
"Microsoft.VisualStudio.Threading.resources.dll",
"Microsoft.Build.Conversion.Core.dll",
"Microsoft.Build.dll",
"Microsoft.Build.Engine.dll",
"Microsoft.Build.Framework.dll",
"Microsoft.Build.Tasks.Core.dll",
"Microsoft.Build.Utilities.Core.dll",
"Microsoft.Win32.Primitives.dll",
"Microsoft.VisualStudio.Threading.dll",
"Microsoft.VisualStudio.Validation.dll",
"Nerdbank.FullDuplexStream.dll",
"Validation.dll"
]
"exclude": [
"Esent.Interop.dll",
"Microsoft.CodeAnalysis.Elfie.dll",
"Microsoft.DiaSymReader.dll",
"Microsoft.DiaSymReader.Native.amd64.dll",
"Microsoft.DiaSymReader.Native.arm.dll",
"Microsoft.DiaSymReader.Native.x86.dll",
"Newtonsoft.Json.dll",
"StreamJsonRpc.dll",
"StreamJsonRpc.resources.dll",
"System.AppContext.dll",
"System.Collections.Immutable.dll",
"System.Composition.AttributedModel.dll",
"System.Composition.Convention.dll",
"System.Composition.Hosting.dll",
"System.Composition.TypedParts.dll",
"System.Composition.Runtime.dll",
"System.Console.dll",
"System.Diagnostics.FileVersionInfo.dll",
"System.Diagnostics.Process.dll",
"System.Diagnostics.StackTrace.dll",
"System.IO.Compression.dll",
"System.IO.FileSystem.dll",
"System.IO.FileSystem.DriveInfo.dll",
"System.IO.FileSystem.Primitives.dll",
"System.IO.Pipes.dll",
"System.Reflection.Metadata.dll",
"System.Runtime.InteropServices.RuntimeInformation.dll",
"System.Security.AccessControl.dll",
"System.Security.Cryptography.Algorithms.dll",
"System.Security.Cryptography.Encoding.dll",
"System.Security.Cryptography.Primitives.dll",
"System.Security.Cryptography.X509Certificates.dll",
"System.Security.Principal.Windows.dll",
"System.Text.Encoding.CodePages.dll",
"System.Threading.Thread.dll",
"System.ValueTuple.dll",
"System.Xml.ReaderWriter.dll",
"System.Xml.XmlDocument.dll",
"System.Xml.XPath.XDocument.dll",
"Microsoft.VisualStudio.Threading.resources.dll",
"Microsoft.Build.Conversion.Core.dll",
"Microsoft.Build.dll",
"Microsoft.Build.Engine.dll",
"Microsoft.Build.Framework.dll",
"Microsoft.Build.Tasks.Core.dll",
"Microsoft.Build.Utilities.Core.dll",
"Microsoft.Win32.Primitives.dll",
"Microsoft.VisualStudio.Threading.dll",
"Microsoft.VisualStudio.Validation.dll",
"Nerdbank.FullDuplexStream.dll",
"Validation.dll"
]
}
{
"dependencies": { },
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"NETCoreApp1.0": {
"imports": "portable-net452"
}
"dependencies": { },
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
"NETCoreApp1.0": {
"imports": "portable-net452"
}
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
}
}
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": { },
"frameworks": {
"netstandard1.3": {
"imports": "portable-net452"
}
"dependencies": { },
"frameworks": {
"netstandard1.3": {
"imports": "portable-net452"
}
}
}
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.DiaSymReader.Native": "1.5.0-beta1"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.DiaSymReader.Native": "1.5.0-beta1"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
......@@ -229,7 +229,7 @@ public class TestAnalyzer : DiagnosticAnalyzer
new SyntaxTree[] { CSharp.SyntaxFactory.ParseSyntaxTree(analyzerSource) },
new MetadataReference[]
{
SystemRuntimeNetstandard13FacadeRef.Value,
TestReferences.NetStandard13.SystemRuntime,
MetadataReference.CreateFromFile(immutable.Path),
MetadataReference.CreateFromFile(analyzer.Path)
},
......
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239",
"Moq": "4.2.1402.2112"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194",
"Moq": "4.2.1402.2112"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.Build": "14.3.0",
"Microsoft.Build.Tasks.Core": "14.3.0",
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"Microsoft.Win32.Primitives": "4.3.0",
"System.AppContext": "4.3.0",
"System.Console": "4.3.0",
"System.Collections.Concurrent": "4.3.0",
"System.Diagnostics.Process": "4.3.0",
"System.Diagnostics.Tools": "4.3.0",
"System.IO.FileSystem": "4.3.0",
"System.IO.FileSystem.DriveInfo": "4.3.0",
"System.IO.Pipes": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Security.AccessControl": "4.3.0",
"System.Security.Cryptography.Algorithms": "4.3.0",
"System.Security.Principal.Windows": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Text.Encoding.Extensions": "4.3.0",
"System.Text.RegularExpressions": "4.3.0",
"System.Threading.Thread": "4.3.0"
},
"frameworks": {
"netstandard1.3": {
"imports": [
"portable-net452",
"dotnet5.4"
]
}
"dependencies": {
"Microsoft.Build": "14.3.0",
"Microsoft.Build.Tasks.Core": "14.3.0",
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"Microsoft.Win32.Primitives": "4.3.0",
"System.AppContext": "4.3.0",
"System.Console": "4.3.0",
"System.Collections.Concurrent": "4.3.0",
"System.Diagnostics.Process": "4.3.0",
"System.Diagnostics.Tools": "4.3.0",
"System.IO.FileSystem": "4.3.0",
"System.IO.FileSystem.DriveInfo": "4.3.0",
"System.IO.Pipes": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Security.AccessControl": "4.3.0",
"System.Security.Cryptography.Algorithms": "4.3.0",
"System.Security.Principal.Windows": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Text.Encoding.Extensions": "4.3.0",
"System.Text.RegularExpressions": "4.3.0",
"System.Threading.Thread": "4.3.0"
},
"frameworks": {
"netstandard1.3": {
"imports": [
"portable-net452",
"dotnet5.4"
]
}
}
}
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239",
"System.Collections.Immutable": "1.3.0",
"Microsoft.Build": "14.3.0",
"Moq": "4.2.1402.2112"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194",
"System.Collections.Immutable": "1.3.0",
"Microsoft.Build": "14.3.0",
"Moq": "4.2.1402.2112"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
......@@ -49,18 +49,6 @@ private static class CultureTypes
}
}
private static class _RuntimeEnvironment
{
internal static readonly Type TypeOpt = ReflectionUtilities.TryGetType("System.Runtime.InteropServices.RuntimeEnvironment, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
internal static readonly Func<string> GetRuntimeDirectoryOpt = TypeOpt?
.GetTypeInfo()
.GetDeclaredMethod("GetRuntimeDirectory", Array.Empty<Type>())?
.CreateDelegate<Func<string>>();
}
internal static string TryGetRuntimeDirectory() => _RuntimeEnvironment.GetRuntimeDirectoryOpt?.Invoke();
private static class _Assembly
{
internal static readonly Type Type = typeof(Assembly);
......
......@@ -295,7 +295,7 @@ internal static MetadataReference CreateFromAssemblyInternal(Assembly assembly)
return CreateFromAssemblyInternal(assembly, properties, documentation);
}
internal static MetadataReference CreateFromAssemblyInternal(
internal static PortableExecutableReference CreateFromAssemblyInternal(
Assembly assembly,
MetadataReferenceProperties properties,
DocumentationProvider documentation = null)
......
......@@ -88,9 +88,6 @@
<NuGetPackageToIncludeInVsix Include="System.Xml.XPath.XDocument" />
</ItemGroup>
<ItemGroup>
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
......
{
"dependencies": {
"Microsoft.VisualStudio.Shell.14.0": "14.3.25407",
"Microsoft.VisualStudio.Shell.Interop.10.0": "10.0.30319"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"EnvDTE": "8.0.0",
"Microsoft.VisualStudio.Shell.14.0": "14.3.25407",
"Microsoft.VisualStudio.Shell.Interop.10.0": "10.0.30319"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": { },
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"NETCoreApp1.0": {
"imports": "portable-net452"
}
"dependencies": { },
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
"NETCoreApp1.0": {
"imports": "portable-net452"
}
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
}
}
{
"dependencies": {
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { },
"ubuntu.14.04": { },
"osx.10.10": { }
}
"dependencies": {
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { },
"ubuntu.14.04": { },
"osx.10.10": { }
}
}
{
"dependencies": {
"Microsoft.Build": "14.3.0",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"Moq": "4.2.1402.2112",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.Build": "14.3.0",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"Moq": "4.2.1402.2112",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
......@@ -2,6 +2,7 @@
using Roslyn.Utilities;
using System;
using System.Reflection;
namespace Microsoft.CodeAnalysis.Scripting
{
......@@ -15,5 +16,15 @@ internal static class AssemblyLoadContext
internal static readonly Type Type = ReflectionUtilities.TryGetType(
"System.Runtime.Loader.AssemblyLoadContext, System.Runtime.Loader, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
}
internal static class AppContext
{
internal static readonly Type Type = ReflectionUtilities.TryGetType(
"System.AppContext, System.AppContext, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
// only available in netstandard 1.6+
internal static readonly Func<string, object> GetData =
Type.GetTypeInfo().GetDeclaredMethod("GetData")?.CreateDelegate<Func<string, object>>();
}
}
}
{
"dependencies": { },
"frameworks": {
"net46": { }
}
"dependencies": { },
"frameworks": {
"net46": { }
}
}
{
"dependencies": {
},
"frameworks": {
"netstandard1.3": {
"imports": "portable-net452"
}
"dependencies": {
},
"frameworks": {
"netstandard1.3": {
"imports": "portable-net452"
}
}
}
\ No newline at end of file
{
"dependencies": { },
"frameworks": {
"net46": { }
}
"dependencies": { },
"frameworks": {
"net46": { }
}
}
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": { },
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"NETCoreApp1.0": {
"imports": "portable-net452"
}
"dependencies": { },
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
"NETCoreApp1.0": {
"imports": "portable-net452"
}
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
}
}
{
"dependencies": {
"Microsoft.DiaSymReader.Native": "1.5.0-beta1"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.DiaSymReader.Native": "1.5.0-beta1"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
},
"dependencies": { },
"frameworks": {
"net46": { }
},
......
{
"dependencies": {
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
"dependencies": {
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"frameworks": {
"net46": { }
}
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
}
}
......@@ -488,6 +488,160 @@ public C(int a)
Array.Empty<string>());
}
[Fact]
public void Constructor_ExpressionBodied_LineChange1()
{
string src1 = @"
class C
{
int _a;
public C(int a) =>
_a = a;
}
";
string src2 = @"
class C
{
int _a;
public C(int a) =>
_a = a;
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(5, 6) },
Array.Empty<string>());
}
[Fact]
public void Constructor_ExpressionBodied_LineChange2()
{
string src1 = @"
class C
{
int _a;
public C(int a)
=> _a = a;
}
";
string src2 = @"
class C
{
int _a;
public C(int a)
=> _a = a;
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(5, 6) },
Array.Empty<string>());
}
[Fact]
public void Constructor_ExpressionBodied_LineChange3()
{
string src1 = @"
class C
{
int _a;
public C(int a) =>
_a = a;
}
";
string src2 = @"
class C
{
int _a;
public C(int a) =>
_a = a;
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(5, 6) },
Array.Empty<string>());
}
[Fact]
public void Constructor_ExpressionBodied_LineChange4()
{
string src1 = @"
class C
{
int _a;
public C(int a)
=>
_a = a;
}
";
string src2 = @"
class C
{
int _a;
public C(int a)
=>
_a = a;
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(6, 8) },
Array.Empty<string>());
}
[Fact]
public void Constructor_ExpressionBodiedWithBase_LineChange1()
{
string src1 = @"
class C
{
int _a;
public C(int a)
: base() => _a = a;
}
";
string src2 = @"
class C
{
int _a;
public C(int a)
: base() => _a = a;
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(5, 6) },
Array.Empty<string>());
}
[Fact]
public void Constructor_ExpressionBodiedWithBase_Recompile1()
{
string src1 = @"
class C
{
int _a;
public C(int a)
: base() =>
_a = a;
}
";
string src2 = @"
class C
{
int _a;
public C(int a)
: base() => _a = a;
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
Array.Empty<LineChange>(),
new string[] { "public C(int a)" });
}
[Fact]
public void Constructor_Recompile1()
{
......@@ -570,6 +724,77 @@ public C(int a)
#endregion
#region Destructors
[Fact]
public void Destructor_LineChange1()
{
string src1 = @"
class C
{
~C()
{
}
}
";
string src2 = @"
class C
{
~C()
{
}
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(5, 4) },
Array.Empty<string>());
}
[Fact]
public void Destructor_ExpressionBodied_LineChange1()
{
string src1 = @"
class C
{
~C() => F();
}
";
string src2 = @"
class C
{
~C() =>
F();
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4) },
Array.Empty<string>());
}
[Fact]
public void Destructor_ExpressionBodied_LineChange2()
{
string src1 = @"
class C
{
~C() => F();
}
";
string src2 = @"
class C
{
~C()
=> F();
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4) },
Array.Empty<string>());
}
#endregion
#region Field Initializers
[Fact]
......@@ -935,6 +1160,48 @@ class C
Array.Empty<string>());
}
[Fact]
public void Property_GetterExpressionBody1()
{
string src1 = @"
class C
{
int P { get => 1; }
}
";
string src2 = @"
class C
{
int P { get =>
1; }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4) },
Array.Empty<string>());
}
[Fact]
public void Property_SetterExpressionBody1()
{
string src1 = @"
class C
{
int P { set => F(); }
}
";
string src2 = @"
class C
{
int P { set =>
F(); }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4) },
Array.Empty<string>());
}
[Fact]
public void Property_Initializer1()
{
......@@ -998,5 +1265,158 @@ class C
}
#endregion
#region Events
[Fact]
public void Event_LineChange1()
{
string src1 = @"
class C
{
event Action E { add { } remove { } }
}
";
string src2 = @"
class C
{
event Action E { add { } remove { } }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4), new LineChange(3, 4) },
Array.Empty<string>());
}
[Fact]
public void EventAdder_LineChangeAndRecompile1()
{
string src1 = @"
class C
{
event Action E { add {
} remove { } }
}
";
string src2 = @"
class C
{
event Action E { add { } remove { } }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(4, 3) },
new string[] { "add { }" });
}
[Fact]
public void EventRemover_Recompile1()
{
string src1 = @"
class C
{
event Action E { add { } remove {
} }
}
";
string src2 = @"
class C
{
event Action E { add { } remove { } }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
Array.Empty<LineChange>(),
new string[] { "remove { }" });
}
[Fact]
public void EventAdder_LineChange1()
{
string src1 = @"
class C
{
event Action E { add
{ } remove { } }
}
";
string src2 = @"
class C
{
event Action E { add { } remove { } }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(4, 3), new LineChange(4, 3) },
Array.Empty<string>());
}
[Fact]
public void EventRemover_LineChange1()
{
string src1 = @"
class C
{
event Action E { add { } remove { } }
}
";
string src2 = @"
class C
{
event Action E { add { } remove
{ } }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4) },
Array.Empty<string>());
}
[Fact]
public void Event_ExpressionBody1()
{
string src1 = @"
class C
{
event Action E { add => F(); remove => F(); }
}
";
string src2 = @"
class C
{
event Action E { add =>
F(); remove =>
F(); }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(3, 4), new LineChange(3, 5) },
Array.Empty<string>());
}
[Fact]
public void Event_ExpressionBody2()
{
string src1 = @"
class C
{
event Action E { add
=> F(); remove
=> F(); }
}
";
string src2 = @"
class C
{
event Action E { add => F(); remove => F(); }
}";
var edits = GetTopEdits(src1, src2);
edits.VerifyLineEdits(
new[] { new LineChange(4, 3), new LineChange(5, 3) },
Array.Empty<string>());
}
#endregion
}
}
{
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": { },
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": { },
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
......@@ -109,6 +109,7 @@
<Compile Include="FindUsages\IFindUsagesContext.cs" />
<Compile Include="FindUsages\IFindUsagesService.cs" />
<Compile Include="FindUsages\SimpleFindUsagesContext.cs" />
<Compile Include="Implementation\Structure\BlockTagState.cs" />
<Compile Include="Tags\ExportImageMonikerServiceAttribute.cs" />
<Compile Include="Implementation\NavigateTo\AbstractNavigateToItemDisplay.cs" />
<Compile Include="CommandArgs.cs" />
......
......@@ -69,6 +69,15 @@ internal class EditorFeaturesResources {
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; declarations.
/// </summary>
internal static string _0_declarations {
get {
return ResourceManager.GetString("_0_declarations", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; does not support the &apos;{1}&apos; operation. However, it may contain nested &apos;{2}&apos;s (see &apos;{2}.{3}&apos;) that support this operation..
/// </summary>
......@@ -79,6 +88,15 @@ internal class EditorFeaturesResources {
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; implementations.
/// </summary>
internal static string _0_implementations {
get {
return ResourceManager.GetString("_0_implementations", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} - (Line {1}).
/// </summary>
......@@ -88,6 +106,15 @@ internal class EditorFeaturesResources {
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; references.
/// </summary>
internal static string _0_references {
get {
return ResourceManager.GetString("_0_references", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} unresolvable conflict(s).
/// </summary>
......
......@@ -745,4 +745,13 @@ Do you want to proceed?</value>
<data name="Suggestion_ellipses" xml:space="preserve">
<value>Suggestion ellipses (…)</value>
</data>
<data name="_0_references" xml:space="preserve">
<value>'{0}' references</value>
</data>
<data name="_0_implementations" xml:space="preserve">
<value>'{0}' implementations</value>
</data>
<data name="_0_declarations" xml:space="preserve">
<value>'{0}' declarations</value>
</data>
</root>
\ No newline at end of file
......@@ -44,7 +44,7 @@ internal abstract partial class AbstractFindReferencesService :
var symbol = symbolAndProject?.symbol;
var project = symbolAndProject?.project;
var displayName = GetDisplayName(symbol);
var displayName = FindUsagesHelpers.GetDisplayName(symbol);
waitContext.Message = string.Format(
EditorFeaturesResources.Finding_references_of_0, displayName);
......@@ -54,11 +54,6 @@ internal abstract partial class AbstractFindReferencesService :
return Tuple.Create(result, project.Solution);
}
public static string GetDisplayName(ISymbol symbol)
{
return symbol.IsConstructor() ? symbol.ContainingType.Name : symbol.Name;
}
public bool TryFindReferences(Document document, int position, IWaitContext waitContext)
{
var cancellationToken = waitContext.CancellationToken;
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Editor.FindReferences;
using Microsoft.CodeAnalysis.Editor.GoToImplementation;
using Microsoft.CodeAnalysis.FindSymbols;
using Microsoft.CodeAnalysis.FindUsages;
......@@ -32,8 +27,10 @@ public async Task FindImplementationsAsync(Document document, int position, IFin
return;
}
var project = tuple.Value.project;
context.SetSearchTitle(string.Format(EditorFeaturesResources._0_implementations,
FindUsagesHelpers.GetDisplayName(tuple.Value.symbol)));
var project = tuple.Value.project;
foreach (var implementation in tuple.Value.implementations)
{
var definitionItem = implementation.ToDefinitionItem(
......@@ -79,8 +76,8 @@ public async Task FindImplementationsAsync(Document document, int position, IFin
var symbol = symbolAndProject?.symbol;
var project = symbolAndProject?.project;
var displayName = AbstractFindReferencesService.GetDisplayName(symbol);
context.SetSearchLabel(displayName);
context.SetSearchTitle(string.Format(EditorFeaturesResources._0_references,
FindUsagesHelpers.GetDisplayName(symbol)));
var progressAdapter = new ProgressAdapter(project.Solution, context);
......
......@@ -19,7 +19,7 @@ public virtual void ReportMessage(string message)
{
}
public virtual void SetSearchLabel(string displayName)
public virtual void SetSearchTitle(string title)
{
}
......
......@@ -14,6 +14,9 @@ namespace Microsoft.CodeAnalysis.Editor.FindUsages
{
internal static class FindUsagesHelpers
{
public static string GetDisplayName(ISymbol symbol)
=> symbol.IsConstructor() ? symbol.ContainingType.Name : symbol.Name;
/// <summary>
/// Common helper for both the synchronous and streaming versions of FAR.
/// It returns the symbol we want to search for and the solution we should
......
......@@ -17,7 +17,7 @@ internal interface IFindUsagesContext
/// <summary>
/// Set the title of the window that results are displayed in.
/// </summary>
void SetSearchLabel(string displayName);
void SetSearchTitle(string title);
Task OnDefinitionFoundAsync(DefinitionItem definition);
Task OnReferenceFoundAsync(SourceReferenceItem reference);
......
......@@ -29,10 +29,14 @@ public SimpleFindUsagesContext(CancellationToken cancellationToken)
}
public string Message { get; private set; }
public string SearchTitle { get; private set; }
public override void ReportMessage(string message)
=> Message = message;
public override void SetSearchTitle(string title)
=> SearchTitle = title;
public ImmutableArray<DefinitionItem> GetDefinitions()
{
lock (_gate)
......
......@@ -5,6 +5,8 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.CodeAnalysis.Editor.FindReferences;
using Microsoft.CodeAnalysis.Editor.FindUsages;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.FindSymbols;
using Microsoft.CodeAnalysis.FindUsages;
......@@ -69,9 +71,11 @@ internal static class GoToDefinitionHelpers
definitions.Add(symbol.ToDefinitionItem(solution, includeHiddenLocations: true));
var presenter = GetFindUsagesPresenter(streamingPresenters);
var title = string.Format(EditorFeaturesResources._0_declarations,
FindUsagesHelpers.GetDisplayName(symbol));
return presenter.TryNavigateToOrPresentItemsAsync(
EditorFeaturesResources.Go_to_Definition,
definitions.ToImmutableAndFree(),
title, definitions.ToImmutableAndFree(),
alwaysShowDeclarations: true).WaitAndGetResult(cancellationToken);
}
......
......@@ -125,7 +125,7 @@ private void ExecuteCommand(Document document, int caretPosition)
var definitionItems = goToImplContext.GetDefinitions();
streamingPresenter.TryNavigateToOrPresentItemsAsync(
EditorFeaturesResources.Go_To_Implementation, definitionItems,
goToImplContext.SearchTitle, definitionItems,
alwaysShowDeclarations: true).Wait(cancellationToken);
}
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Windows.Media;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text.Shared.Extensions;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Projection;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Implementation.Structure
{
/// <summary>
/// Shared state object we use for <see cref="RoslynOutliningRegionTag"/> and RoslynBlockTag
/// (in EditorFeatures.Next).
/// </summary>
internal struct BlockTagState
{
private const string OutliningRegionTextViewRole = nameof(OutliningRegionTextViewRole);
private const string Ellipsis = "...";
private const int MaxPreviewText = 1000;
private readonly ITextEditorFactoryService _textEditorFactoryService;
private readonly IProjectionBufferFactoryService _projectionBufferFactoryService;
private readonly IEditorOptionsFactoryService _editorOptionsFactoryService;
private readonly ITextBuffer _subjectBuffer;
private readonly ITrackingSpan _hintSpan;
public bool IsDefaultCollapsed => BlockSpan.IsDefaultCollapsed;
public bool IsImplementation => BlockSpan.AutoCollapse;
public object CollapsedForm => BlockSpan.BannerText;
public readonly BlockSpan BlockSpan;
public BlockTagState(
ITextEditorFactoryService textEditorFactoryService,
IProjectionBufferFactoryService projectionBufferFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
ITextSnapshot snapshot,
BlockSpan blockSpan)
{
_textEditorFactoryService = textEditorFactoryService;
_projectionBufferFactoryService = projectionBufferFactoryService;
_editorOptionsFactoryService = editorOptionsFactoryService;
_subjectBuffer = snapshot.TextBuffer;
BlockSpan = blockSpan;
_hintSpan = snapshot.CreateTrackingSpan(BlockSpan.HintSpan.ToSpan(), SpanTrackingMode.EdgeExclusive);
}
public override bool Equals(object obj)
=> obj is BlockTagState s && Equals(s);
public bool Equals(BlockTagState tag)
=> IsImplementation == tag.IsImplementation &&
Equals(this.CollapsedForm, tag.CollapsedForm);
public override int GetHashCode()
=> Hash.Combine(IsImplementation,
EqualityComparer<object>.Default.GetHashCode(this.CollapsedForm));
public object CollapsedHintForm
=> new ViewHostingControl(CreateElisionBufferView, CreateElisionBuffer);
private IWpfTextView CreateElisionBufferView(ITextBuffer finalBuffer)
=> CreateShrunkenTextView(_textEditorFactoryService, finalBuffer);
internal static IWpfTextView CreateShrunkenTextView(
ITextEditorFactoryService textEditorFactoryService,
ITextBuffer finalBuffer)
{
var roles = textEditorFactoryService.CreateTextViewRoleSet(OutliningRegionTextViewRole);
var view = textEditorFactoryService.CreateTextView(finalBuffer, roles);
view.Background = Brushes.Transparent;
view.SizeToFit();
// Zoom out a bit to shrink the text.
view.ZoomLevel *= 0.75;
return view;
}
private ITextBuffer CreateElisionBuffer()
{
// Remove any starting whitespace.
var span = TrimStartingNewlines(_hintSpan.GetSpan(_subjectBuffer.CurrentSnapshot));
// Trim the length if it's too long.
var shortSpan = span;
if (span.Length > MaxPreviewText)
{
shortSpan = ComputeShortSpan(span);
}
// Create an elision buffer for that span, also trimming the
// leading whitespace.
var elisionBuffer = CreateElisionBufferWithoutIndentation(_subjectBuffer, shortSpan);
var finalBuffer = elisionBuffer;
// If we trimmed the length, then make a projection buffer that
// has the above elision buffer and follows it with "..."
if (span.Length != shortSpan.Length)
{
finalBuffer = CreateTrimmedProjectionBuffer(elisionBuffer);
}
return finalBuffer;
}
private ITextBuffer CreateTrimmedProjectionBuffer(ITextBuffer elisionBuffer)
{
// The elision buffer is too long. We've already trimmed it, but now we want to add
// a "..." to it. We do that by creating a projection of both the elision buffer and
// a new text buffer wrapping the ellipsis.
var elisionSpan = elisionBuffer.CurrentSnapshot.GetFullSpan();
var sourceSpans = new List<object>()
{
elisionSpan.Snapshot.CreateTrackingSpan(elisionSpan, SpanTrackingMode.EdgeExclusive),
Ellipsis
};
var projectionBuffer = _projectionBufferFactoryService.CreateProjectionBuffer(
projectionEditResolver: null,
sourceSpans: sourceSpans,
options: ProjectionBufferOptions.None);
return projectionBuffer;
}
private Span ComputeShortSpan(Span span)
{
var endIndex = span.Start + MaxPreviewText;
var line = _subjectBuffer.CurrentSnapshot.GetLineFromPosition(endIndex);
return Span.FromBounds(span.Start, line.EndIncludingLineBreak);
}
private Span TrimStartingNewlines(Span span)
{
while (span.Length > 1 && char.IsWhiteSpace(_subjectBuffer.CurrentSnapshot[span.Start]))
{
span = new Span(span.Start + 1, span.Length - 1);
}
return span;
}
private ITextBuffer CreateElisionBufferWithoutIndentation(
ITextBuffer dataBuffer, Span shortHintSpan)
{
return _projectionBufferFactoryService.CreateElisionBufferWithoutIndentation(
_editorOptionsFactoryService.GlobalOptions,
contentType: null,
exposedSpans: new SnapshotSpan(dataBuffer.CurrentSnapshot, shortHintSpan));
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Windows.Media;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text.Shared.Extensions;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Projection;
using Microsoft.VisualStudio.Text.Tagging;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Implementation.Structure
{
......@@ -19,150 +13,35 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.Structure
// we are collapsing.
internal class RoslynOutliningRegionTag : IOutliningRegionTag
{
private const string OutliningRegionTextViewRole = nameof(OutliningRegionTextViewRole);
private const string Ellipsis = "...";
private const int MaxPreviewText = 1000;
private readonly ITextEditorFactoryService _textEditorFactoryService;
private readonly IProjectionBufferFactoryService _projectionBufferFactoryService;
private readonly IEditorOptionsFactoryService _editorOptionsFactoryService;
private readonly ITextBuffer _subjectBuffer;
private readonly ITrackingSpan _hintSpan;
public bool IsDefaultCollapsed => BlockSpan.IsDefaultCollapsed;
public bool IsImplementation => BlockSpan.AutoCollapse;
public object CollapsedForm => BlockSpan.BannerText;
protected readonly BlockSpan BlockSpan;
private readonly BlockTagState _state;
public RoslynOutliningRegionTag(
ITextEditorFactoryService textEditorFactoryService,
IProjectionBufferFactoryService projectionBufferFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
ITextSnapshot snapshot,
BlockSpan outliningSpan)
BlockSpan blockSpan)
{
_textEditorFactoryService = textEditorFactoryService;
_projectionBufferFactoryService = projectionBufferFactoryService;
_editorOptionsFactoryService = editorOptionsFactoryService;
_subjectBuffer = snapshot.TextBuffer;
BlockSpan = outliningSpan;
_hintSpan = snapshot.CreateTrackingSpan(BlockSpan.HintSpan.ToSpan(), SpanTrackingMode.EdgeExclusive);
_state = new BlockTagState(
textEditorFactoryService, projectionBufferFactoryService,
editorOptionsFactoryService, snapshot, blockSpan);
}
public override bool Equals(object obj)
public override bool Equals(object obj)
=> Equals(obj as RoslynOutliningRegionTag);
public bool Equals(RoslynOutliningRegionTag tag)
=> tag != null &&
IsImplementation == tag.IsImplementation &&
Equals(this.CollapsedForm, tag.CollapsedForm);
public override int GetHashCode()
=> Hash.Combine(IsImplementation,
EqualityComparer<object>.Default.GetHashCode(this.CollapsedForm));
public object CollapsedHintForm =>
new ViewHostingControl(CreateElisionBufferView, CreateElisionBuffer);
private IWpfTextView CreateElisionBufferView(ITextBuffer finalBuffer)
{
return CreateShrunkenTextView(_textEditorFactoryService, finalBuffer);
}
internal static IWpfTextView CreateShrunkenTextView(
ITextEditorFactoryService textEditorFactoryService,
ITextBuffer finalBuffer)
{
var roles = textEditorFactoryService.CreateTextViewRoleSet(OutliningRegionTextViewRole);
var view = textEditorFactoryService.CreateTextView(finalBuffer, roles);
view.Background = Brushes.Transparent;
view.SizeToFit();
// Zoom out a bit to shrink the text.
view.ZoomLevel *= 0.75;
return view;
}
=> tag != null && _state.Equals(tag._state);
private ITextBuffer CreateElisionBuffer()
{
// Remove any starting whitespace.
var span = TrimStartingNewlines(_hintSpan.GetSpan(_subjectBuffer.CurrentSnapshot));
// Trim the length if it's too long.
var shortSpan = span;
if (span.Length > MaxPreviewText)
{
shortSpan = ComputeShortSpan(span);
}
// Create an elision buffer for that span, also trimming the
// leading whitespace.
var elisionBuffer = CreateElisionBufferWithoutIndentation(_subjectBuffer, shortSpan);
var finalBuffer = elisionBuffer;
// If we trimmed the length, then make a projection buffer that
// has the above elision buffer and follows it with "..."
if (span.Length != shortSpan.Length)
{
finalBuffer = CreateTrimmedProjectionBuffer(elisionBuffer);
}
return finalBuffer;
}
public override int GetHashCode()
=> _state.GetHashCode();
private ITextBuffer CreateTrimmedProjectionBuffer(ITextBuffer elisionBuffer)
{
// The elision buffer is too long. We've already trimmed it, but now we want to add
// a "..." to it. We do that by creating a projection of both the elision buffer and
// a new text buffer wrapping the ellipsis.
var elisionSpan = elisionBuffer.CurrentSnapshot.GetFullSpan();
public object CollapsedForm => _state.CollapsedForm;
var sourceSpans = new List<object>()
{
elisionSpan.Snapshot.CreateTrackingSpan(elisionSpan, SpanTrackingMode.EdgeExclusive),
Ellipsis
};
public object CollapsedHintForm => _state.CollapsedHintForm;
var projectionBuffer = _projectionBufferFactoryService.CreateProjectionBuffer(
projectionEditResolver: null,
sourceSpans: sourceSpans,
options: ProjectionBufferOptions.None);
public bool IsDefaultCollapsed => _state.IsDefaultCollapsed;
return projectionBuffer;
}
private Span ComputeShortSpan(Span span)
{
var endIndex = span.Start + MaxPreviewText;
var line = _subjectBuffer.CurrentSnapshot.GetLineFromPosition(endIndex);
return Span.FromBounds(span.Start, line.EndIncludingLineBreak);
}
private Span TrimStartingNewlines(Span span)
{
while (span.Length > 1 && char.IsWhiteSpace(_subjectBuffer.CurrentSnapshot[span.Start]))
{
span = new Span(span.Start + 1, span.Length - 1);
}
return span;
}
private ITextBuffer CreateElisionBufferWithoutIndentation(
ITextBuffer dataBuffer, Span shortHintSpan)
{
return _projectionBufferFactoryService.CreateElisionBufferWithoutIndentation(
_editorOptionsFactoryService.GlobalOptions,
contentType: null,
exposedSpans: new SnapshotSpan(dataBuffer.CurrentSnapshot, shortHintSpan));
}
public bool IsImplementation => _state.IsImplementation;
}
}
\ No newline at end of file
{
"dependencies": {
"System.Collections.Immutable": "1.3.0",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.ImageCatalog": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
}
}
"dependencies": {
"System.Collections.Immutable": "1.3.0",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.ImageCatalog": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
}
}
\ No newline at end of file
......@@ -66,6 +66,7 @@
<Compile Include="Options\EditorConfigDocumentOptionsProvider.DocumentOptions.cs" />
<Compile Include="Options\EditorConfigDocumentOptionsProvider.EmptyCodingConventionContext.cs" />
<Compile Include="Structure\BlockContextProvider.cs" />
<Compile Include="Structure\RoslynBlockTag.cs" />
<Compile Include="Structure\VisualStudio15StructureTaggerProvider.cs" />
<Compile Include="Options\EditorConfigDocumentOptionsProviderFactory.cs" />
<Compile Include="Options\EditorConfigDocumentOptionsProvider.cs" />
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Threading;
......@@ -62,7 +61,7 @@ public void Dispose()
public Task<IBlockContext> GetBlockContextAsync(
IBlockTag blockTag, ITextView view, CancellationToken token)
{
if (blockTag is RoslynOutliningRegionTag)
if (blockTag is RoslynBlockTag)
{
var result = new RoslynBlockContext(_provider, blockTag, view);
return Task.FromResult<IBlockContext>(result);
......@@ -104,7 +103,7 @@ private object CreateContent()
private IWpfTextView CreateElisionBufferView(ITextBuffer finalBuffer)
{
return RoslynOutliningRegionTag.CreateShrunkenTextView(
return BlockTagState.CreateShrunkenTextView(
_provider._textEditorFactoryService, finalBuffer);
}
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.Editor.Implementation.Structure;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text.Shared.Extensions;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Projection;
using Microsoft.VisualStudio.Text.Tagging;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Structure
{
internal class RoslynBlockTag : BlockTag
{
private readonly BlockTagState _state;
public override int Level { get; }
public RoslynBlockTag(
ITextEditorFactoryService textEditorFactoryService,
IProjectionBufferFactoryService projectionBufferFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
IBlockTag parent,
ITextSnapshot snapshot,
BlockSpan blockSpan) :
base(span: blockSpan.TextSpan.ToSnapshotSpan(snapshot),
statementSpan: blockSpan.HintSpan.ToSnapshotSpan(snapshot),
parent: parent,
type: blockSpan.Type,
isCollapsible: blockSpan.IsCollapsible,
isDefaultCollapsed: blockSpan.IsDefaultCollapsed,
isImplementation: blockSpan.AutoCollapse,
collapsedForm: null,
collapsedHintForm: null)
{
_state = new BlockTagState(
textEditorFactoryService, projectionBufferFactoryService,
editorOptionsFactoryService, snapshot, blockSpan);
Level = parent == null ? 0 : parent.Level + 1;
}
public override object CollapsedForm => _state.CollapsedForm;
public override object CollapsedHintForm => _state.CollapsedHintForm;
public override bool Equals(object obj)
=> Equals(obj as RoslynBlockTag);
/// <summary>
/// This is only called if the spans for the tags were the same. However, even if we
/// have the same span as the previous tag (taking into account span mapping) that
/// doesn't mean we can use the old block tag. Specifically, the editor will look at
/// other fields in the tags So we need to make sure that these values have not changed
/// if we want to reuse the old block tag. For example, perhaps the item's type changed
/// (i.e. from class to struct). It will have the same span, but might have a new
/// presentation as the 'Type' will be different.
/// </summary>
public bool Equals(RoslynBlockTag tag)
{
return _state.Equals(tag._state) &&
IsCollapsible == tag.IsCollapsible &&
Level == tag.Level &&
Type == tag.Type &&
StatementSpan == tag.StatementSpan &&
Span == tag.Span;
}
public override int GetHashCode()
{
return Hash.Combine(base.GetHashCode(),
Hash.Combine(this.IsCollapsible,
Hash.Combine(this.Level,
Hash.Combine(this.Type,
Hash.Combine(this.StatementSpan.GetHashCode(), this.Span.GetHashCode())))));
}
}
}
\ No newline at end of file
......@@ -6,14 +6,11 @@
using Microsoft.CodeAnalysis.Editor.Implementation.Structure;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text.Shared.Extensions;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Adornments;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Projection;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Utilities;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Structure
{
......@@ -44,65 +41,5 @@ internal partial class VisualStudio15StructureTaggerProvider :
this.EditorOptionsFactoryService,
parentTag, snapshot, region);
}
private class RoslynBlockTag : RoslynOutliningRegionTag, IBlockTag
{
public IBlockTag Parent { get; }
public int Level { get; }
public SnapshotSpan Span { get; }
public SnapshotSpan StatementSpan { get; }
public string Type => BlockSpan.Type;
public bool IsCollapsible => BlockSpan.IsCollapsible;
public RoslynBlockTag(
ITextEditorFactoryService textEditorFactoryService,
IProjectionBufferFactoryService projectionBufferFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
IBlockTag parent,
ITextSnapshot snapshot,
BlockSpan blockSpan) :
base(textEditorFactoryService,
projectionBufferFactoryService,
editorOptionsFactoryService,
snapshot, blockSpan)
{
Parent = parent;
Level = parent == null ? 0 : parent.Level + 1;
Span = blockSpan.TextSpan.ToSnapshotSpan(snapshot);
StatementSpan = blockSpan.HintSpan.ToSnapshotSpan(snapshot);
}
public override bool Equals(object obj)
=> Equals(obj as RoslynBlockTag);
/// <summary>
/// This is only called if the spans for the tags were the same. However, even if we
/// have the same span as the previous tag (taking into account span mapping) that
/// doesn't mean we can use the old block tag. Specifically, the editor will look at
/// other fields in the tags So we need to make sure that these values have not changed
/// if we want to reuse the old block tag. For example, perhaps the item's type changed
/// (i.e. from class to struct). It will have the same span, but might have a new
/// presentation as the 'Type' will be different.
/// </summary>
public bool Equals(RoslynBlockTag tag)
{
return base.Equals(tag) &&
IsCollapsible == tag.IsCollapsible &&
Level == tag.Level &&
Type == tag.Type &&
StatementSpan == tag.StatementSpan &&
Span == tag.Span;
}
public override int GetHashCode()
{
return Hash.Combine(base.GetHashCode(),
Hash.Combine(this.IsCollapsible,
Hash.Combine(this.Level,
Hash.Combine(this.Type,
Hash.Combine(this.StatementSpan.GetHashCode(), this.Span.GetHashCode())))));
}
}
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.VisualStudio.Imaging": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Utilities": "15.0.25726-Preview5",
"Microsoft.VisualStudio.ImageCatalog": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.UI": "15.0.25726-Preview5",
"Microsoft.VisualStudio.CoreUtility": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Language.Intellisense": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.Data": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.Logic": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.UI.Wpf": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Editor": "15.0.25726-Preview5",
"Roslyn.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": "15.0.25726-Preview5",
"System.Collections.Immutable": "1.3.0",
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"VS.ExternalAPIs.CodingConventions": "1.0.60704.2"
"dependencies": {
"Microsoft.VisualStudio.Imaging": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Utilities": "15.0.25726-Preview5",
"Microsoft.VisualStudio.ImageCatalog": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.UI": "15.0.25726-Preview5",
"Microsoft.VisualStudio.CoreUtility": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Language.Intellisense": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.Data": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.Logic": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Text.UI.Wpf": "15.0.25726-Preview5",
"Microsoft.VisualStudio.Editor": "15.0.25726-Preview5",
"Roslyn.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": "15.0.25726-Preview5",
"System.Collections.Immutable": "1.3.0",
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"frameworks": {
"net46": { }
}
}
"VS.ExternalAPIs.CodingConventions": "1.0.60704.2"
},
"frameworks": {
"net46": { }
}
}
\ No newline at end of file
{
"dependencies": {
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Editor": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"BasicUndo": "0.9.3",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Editor": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194",
"Moq": "4.2.1402.2112",
"Newtonsoft.Json": "8.0.3",
"Nerdbank.FullDuplexStream": "1.0.1",
......
{
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Editor": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Editor": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": {
"Microsoft.VisualStudio.Text.Data": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.Logic": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
}
"dependencies": {
"Microsoft.VisualStudio.Text.Data": {
"version": "14.3.25407",
"suppressParent": "all"
},
"frameworks": {
"net46": { }
"Microsoft.VisualStudio.Text.Logic": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
"version": "14.3.25407",
"suppressParent": "all"
}
},
"frameworks": {
"net46": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
"dependencies": {
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"frameworks": {
"net46": { }
}
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
}
}
......@@ -248,7 +248,7 @@ End Class</text>
End Function
<WorkItem(540154, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540154")>
<Fact(Skip:= "https://github.com/dotnet/roslyn/issues/15223"), Trait(Traits.Feature, Traits.Features.ExtractMethod)>
<Fact, Trait(Traits.Feature, Traits.Features.ExtractMethod)>
Public Async Function BugFix6313_1() As Task
Dim code = <text>Imports System
......@@ -424,7 +424,7 @@ End Class</text>
End Function
<WorkItem(540154, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540154"), WorkItem(541484, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541484")>
<Fact(Skip:= "https://github.com/dotnet/roslyn/issues/15223"), Trait(Traits.Feature, Traits.Features.ExtractMethod)>
<Fact, Trait(Traits.Feature, Traits.Features.ExtractMethod)>
Public Async Function BugFix6313_6() As Task
Dim code = <text>Imports System
......
......@@ -512,7 +512,7 @@ End Class</text>
Await TestSelectionAsync(code)
End Function
<Fact(Skip:= "https://github.com/dotnet/roslyn/issues/15223"), Trait(Traits.Feature, Traits.Features.ExtractMethod)>
<Fact, Trait(Traits.Feature, Traits.Features.ExtractMethod)>
Public Async Function TestSelectReturnButNotAllCodePathsContainAReturn() As Task
Dim code = <text>Imports System
Class A
......
{
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"BasicUndo": "0.9.3",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"BasicUndo": "0.9.3",
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": "14.3.25407",
"Microsoft.VisualStudio.InteractiveWindow": {
"version": "2.0.0-beta5-60820-04",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
},
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Language.StandardClassification": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
},
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": {
"Microsoft.NetFX20": "1.0.3"
},
"frameworks": {
"net20": { }
}
"dependencies": {
"Microsoft.NetFX20": "1.0.3"
},
"frameworks": {
"net20": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile7": { }
}
}
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"System.Collections.Immutable": "1.3.0",
"System.Reflection.Metadata": "1.4.1",
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
},
"frameworks": {
"netstandard1.3": {
"imports": "portable-net45+win8"
}
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"System.Collections.Immutable": "1.3.0",
"System.Reflection.Metadata": "1.4.1",
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
},
"frameworks": {
"netstandard1.3": {
"imports": "portable-net45+win8"
}
}
}
{
"dependencies": {
"Microsoft.NetFX20": "1.0.3",
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
"net20": { }
}
"dependencies": {
"Microsoft.NetFX20": "1.0.3",
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
"net20": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile7": { }
}
}
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"System.Collections.Immutable": "1.3.0",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
}
"dependencies": {
"System.Collections.Immutable": "1.3.0",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
}
}
\ No newline at end of file
{
"dependencies": {
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": { },
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
{
"dependencies": {
"Microsoft.NetFX20": "1.0.3"
},
"frameworks": {
"net20": { }
}
"dependencies": {
"Microsoft.NetFX20": "1.0.3"
},
"frameworks": {
"net20": { }
}
}
\ No newline at end of file
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.VisualStudio.Debugger.Metadata": "14.3.25421"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile7": { }
}
}
{
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"Microsoft.VisualStudio.Debugger.Engine": "14.3.25422",
"Microsoft.DiaSymReader": "1.1.0-beta1-60818-02",
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
{
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.console": "2.2.0-beta1-build3239"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
"dependencies": {
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194"
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win7": { }
}
}
\ No newline at end of file
......@@ -150,7 +150,7 @@ where node.IsKind(SyntaxKind.IdentifierName)
/// <returns>
/// If <paramref name="node"/> is a method, accessor, operator, destructor, or constructor without an initializer,
/// tokens of its block body, or tokens of the expression body if applicable.
/// tokens of its block body, or tokens of the expression body.
///
/// If <paramref name="node"/> is an indexer declaration the tokens of its expression body.
///
......@@ -197,18 +197,18 @@ internal override IEnumerable<SyntaxToken> TryGetActiveTokens(SyntaxNode node)
return declarator.DescendantTokens();
}
var bodyTokens = SyntaxUtilities.TryGetMethodDeclarationBody(node)?.DescendantTokens();
if (node.IsKind(SyntaxKind.ConstructorDeclaration))
{
var ctor = (ConstructorDeclarationSyntax)node;
if (ctor.Initializer != null)
{
return ctor.Initializer.DescendantTokens().Concat(ctor.Body.DescendantTokens());
bodyTokens = ctor.Initializer.DescendantTokens().Concat(bodyTokens);
}
return ctor.Body.DescendantTokens();
}
return SyntaxUtilities.TryGetMethodDeclarationBody(node)?.DescendantTokens();
return bodyTokens;
}
protected override SyntaxNode GetEncompassingAncestorImpl(SyntaxNode bodyOrMatchRoot)
......
......@@ -12,37 +12,43 @@ internal static class SyntaxUtilities
{
public static SyntaxNode TryGetMethodDeclarationBody(SyntaxNode node)
{
SyntaxNode BlockOrExpression(BlockSyntax blockBodyOpt, ArrowExpressionClauseSyntax expressionBodyOpt)
=> (SyntaxNode)blockBodyOpt ?? expressionBodyOpt?.Expression;
SyntaxNode result;
switch (node.Kind())
{
case SyntaxKind.MethodDeclaration:
var methodDeclaration = (MethodDeclarationSyntax)node;
result = (SyntaxNode)methodDeclaration.Body ?? methodDeclaration.ExpressionBody?.Expression;
result = BlockOrExpression(methodDeclaration.Body, methodDeclaration.ExpressionBody);
break;
case SyntaxKind.ConversionOperatorDeclaration:
var conversionDeclaration = (ConversionOperatorDeclarationSyntax)node;
result = (SyntaxNode)conversionDeclaration.Body ?? conversionDeclaration.ExpressionBody?.Expression;
result = BlockOrExpression(conversionDeclaration.Body, conversionDeclaration.ExpressionBody);
break;
case SyntaxKind.OperatorDeclaration:
var operatorDeclaration = (OperatorDeclarationSyntax)node;
result = (SyntaxNode)operatorDeclaration.Body ?? operatorDeclaration.ExpressionBody?.Expression;
result = BlockOrExpression(operatorDeclaration.Body, operatorDeclaration.ExpressionBody);
break;
case SyntaxKind.SetAccessorDeclaration:
case SyntaxKind.AddAccessorDeclaration:
case SyntaxKind.RemoveAccessorDeclaration:
case SyntaxKind.GetAccessorDeclaration:
result = ((AccessorDeclarationSyntax)node).Body;
var accessorDeclaration = (AccessorDeclarationSyntax)node;
result = BlockOrExpression(accessorDeclaration.Body, accessorDeclaration.ExpressionBody);
break;
case SyntaxKind.ConstructorDeclaration:
result = ((ConstructorDeclarationSyntax)node).Body;
var constructorDeclaration = (ConstructorDeclarationSyntax)node;
result = BlockOrExpression(constructorDeclaration.Body, constructorDeclaration.ExpressionBody);
break;
case SyntaxKind.DestructorDeclaration:
result = ((DestructorDeclarationSyntax)node).Body;
var destructorDeclaration = (DestructorDeclarationSyntax)node;
result = BlockOrExpression(destructorDeclaration.Body, destructorDeclaration.ExpressionBody);
break;
case SyntaxKind.PropertyDeclaration:
......@@ -81,13 +87,13 @@ public static void AssertIsBody(SyntaxNode syntax, bool allowLambda)
return;
}
// method, constructor, destructor, operator, accessor body
// block body
if (syntax is BlockSyntax)
{
return;
}
// expression body of a method, operator, property, or indexer
// expression body
if (syntax is ExpressionSyntax && syntax.Parent is ArrowExpressionClauseSyntax)
{
return;
......
{
"dependencies": {
},
"dependencies": { },
"frameworks": {
"netstandard1.3": {
"imports": [ "portable-net45+win8", "dotnet" ]
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册