mirror of
https://github.com/jakobadam/RDSFactor.git
synced 2025-07-23 10:05:55 +02:00
Merge branch 'master' of https://github.com/jakobadam/rdsfactor
This commit is contained in:
commit
bb5b9e3c8b
21 changed files with 64564 additions and 0 deletions
BIN
server/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg
vendored
Normal file
BIN
server/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg
vendored
Normal file
Binary file not shown.
BIN
server/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll
vendored
Normal file
BIN
server/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll
vendored
Normal file
Binary file not shown.
2094
server/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.xml
vendored
Normal file
2094
server/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg
vendored
Normal file
Binary file not shown.
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
9108
server/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.xml
vendored
Normal file
9108
server/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8251
server/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.xml
vendored
Normal file
8251
server/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8558
server/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.xml
vendored
Normal file
8558
server/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8558
server/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.xml
vendored
Normal file
8558
server/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8083
server/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.xml
vendored
Normal file
8083
server/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
7711
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
7711
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
BIN
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8083
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
8083
server/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
93
server/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
vendored
Normal file
93
server/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
vendored
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
param($installPath, $toolsPath, $package, $project)
|
||||||
|
|
||||||
|
# open json.net splash page on package install
|
||||||
|
# don't open if json.net is installed as a dependency
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$url = "http://james.newtonking.com/json"
|
||||||
|
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
|
||||||
|
|
||||||
|
if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
|
||||||
|
{
|
||||||
|
# user is installing from VS NuGet console
|
||||||
|
# get reference to the window, the console host and the input history
|
||||||
|
# show webpage if "install-package newtonsoft.json" was last input
|
||||||
|
|
||||||
|
$consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
|
||||||
|
|
||||||
|
$props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
|
||||||
|
[System.Reflection.BindingFlags]::NonPublic)
|
||||||
|
|
||||||
|
$prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
|
||||||
|
if ($prop -eq $null) { return }
|
||||||
|
|
||||||
|
$hostInfo = $prop.GetValue($consoleWindow)
|
||||||
|
if ($hostInfo -eq $null) { return }
|
||||||
|
|
||||||
|
$history = $hostInfo.WpfConsole.InputHistory.History
|
||||||
|
|
||||||
|
$lastCommand = $history | select -last 1
|
||||||
|
|
||||||
|
if ($lastCommand)
|
||||||
|
{
|
||||||
|
$lastCommand = $lastCommand.Trim().ToLower()
|
||||||
|
if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
|
||||||
|
{
|
||||||
|
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# user is installing from VS NuGet dialog
|
||||||
|
# get reference to the window, then smart output console provider
|
||||||
|
# show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
|
||||||
|
|
||||||
|
$instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
|
||||||
|
[System.Reflection.BindingFlags]::NonPublic)
|
||||||
|
$consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
|
||||||
|
[System.Reflection.BindingFlags]::NonPublic)
|
||||||
|
if ($instanceField -eq $null -or $consoleField -eq $null) { return }
|
||||||
|
|
||||||
|
$instance = $instanceField.GetValue($null)
|
||||||
|
if ($instance -eq $null) { return }
|
||||||
|
|
||||||
|
$consoleProvider = $consoleField.GetValue($instance)
|
||||||
|
if ($consoleProvider -eq $null) { return }
|
||||||
|
|
||||||
|
$console = $consoleProvider.CreateOutputConsole($false)
|
||||||
|
|
||||||
|
$messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
|
||||||
|
[System.Reflection.BindingFlags]::NonPublic)
|
||||||
|
if ($messagesField -eq $null) { return }
|
||||||
|
|
||||||
|
$messages = $messagesField.GetValue($console)
|
||||||
|
if ($messages -eq $null) { return }
|
||||||
|
|
||||||
|
$operations = $messages -split "=============================="
|
||||||
|
|
||||||
|
$lastOperation = $operations | select -last 1
|
||||||
|
|
||||||
|
if ($lastOperation)
|
||||||
|
{
|
||||||
|
$lastOperation = $lastOperation.ToLower()
|
||||||
|
|
||||||
|
$lines = $lastOperation -split "`r`n"
|
||||||
|
|
||||||
|
$installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
|
||||||
|
|
||||||
|
if ($installMatch)
|
||||||
|
{
|
||||||
|
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
# stop potential errors from bubbling up
|
||||||
|
# worst case the splash page won't open
|
||||||
|
}
|
||||||
|
|
||||||
|
# yolo
|
Loading…
Add table
Add a link
Reference in a new issue