user public private key test
This commit is contained in:
Родитель
bb66bc9ab5
Коммит
9f967d0faa
|
@ -224,18 +224,76 @@ namespace Microsoft.Hpc.Communicators.LinuxCommunicator
|
|||
|
||||
public void StartJobAndTask(string nodeName, StartJobAndTaskArg arg, string userName, string password, ProcessStartInfo startInfo, NodeCommunicatorCallBack<StartJobAndTaskArg> callback)
|
||||
{
|
||||
string privateKey = @"-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpQIBAAKCAQEAxJKBABhnOsE9eneGHvsjdoXKooHUxpTHI1JVunAJkVmFy8JC
|
||||
qFt1pV98QCtKEHTC6kQ7tj1UT2N6nx1EY9BBHpZacnXmknpKdX4Nu0cNlSphLpru
|
||||
lscKPR3XVzkTwEF00OMiNJVknq8qXJF1T3lYx3rW5EnItn6C3nQm3gQPXP0ckYCF
|
||||
Jdtu/6SSgzV9kaapctLGPNp1Vjf9KeDQMrJXsQNHxnQcfiICp21NiUCiXosDqJrR
|
||||
AfzePdl0XwsNngouy8t0fPlNSngZvsx+kPGh/AKakKIYS0cO9W3FmdYNW8Xehzkc
|
||||
VzrtJhU8x21hXGfSC7V0ZeD7dMeTL3tQCVxCmwIDAQABAoIBAQCve8Jh3Wc6koxZ
|
||||
qh43xicwhdwSGyliZisoozYZDC/ebDb/Ydq0BYIPMiDwADVMX5AqJuPPmwyLGtm6
|
||||
9hu5p46aycrQ5+QA299g6DlF+PZtNbowKuvX+rRvPxagrTmupkCswjglDUEYUHPW
|
||||
05wQaNoSqtzwS9Y85M/b24FfLeyxK0n8zjKFErJaHdhVxI6cxw7RdVlSmM9UHmah
|
||||
wTkW8HkblbOArilAHi6SlRTNZG4gTGeDzPb7fYZo3hzJyLbcaNfJscUuqnAJ+6pT
|
||||
iY6NNp1E8PQgjvHe21yv3DRoVRM4egqQvNZgUbYAMUgr30T1UoxnUXwk2vqJMfg2
|
||||
Nzw0ESGRAoGBAPkfXjjGfc4HryqPkdx0kjXs0bXC3js2g4IXItK9YUFeZzf+476y
|
||||
OTMQg/8DUbqd5rLv7PITIAqpGs39pkfnyohPjOe2zZzeoyaXurYIPV98hhH880uH
|
||||
ZUhOxJYnlqHGxGT7p2PmmnAlmY4TSJrp12VnuiQVVVsXWOGPqHx4S4f9AoGBAMn/
|
||||
vuea7hsCgwIE25MJJ55FYCJodLkioQy6aGP4NgB89Azzg527WsQ6H5xhgVMKHWyu
|
||||
Q1snp+q8LyzD0i1veEvWb8EYifsMyTIPXOUTwZgzaTTCeJNHdc4gw1U22vd7OBYy
|
||||
nZCU7Tn8Pe6eIMNztnVduiv+2QHuiNPgN7M73/x3AoGBAOL0IcmFgy0EsR8MBq0Z
|
||||
ge4gnniBXCYDptEINNBaeVStJUnNKzwab6PGwwm6w2VI3thbXbi3lbRAlMve7fKK
|
||||
B2ghWNPsJOtppKbPCek2Hnt0HUwb7qX7Zlj2cX/99uvRAjChVsDbYA0VJAxcIwQG
|
||||
TxXx5pFi4g0HexCa6LrkeKMdAoGAcvRIACX7OwPC6nM5QgQDt95jRzGKu5EpdcTf
|
||||
g4TNtplliblLPYhRrzokoyoaHteyxxak3ktDFCLj9eW6xoCZRQ9Tqd/9JhGwrfxw
|
||||
MS19DtCzHoNNewM/135tqyD8m7pTwM4tPQqDtmwGErWKj7BaNZCRUlhFxwOoemsv
|
||||
R6DbZyECgYEAhjL2N3Pc+WW+8x2bbIBN3rJcMjBBIivB62AwgYZnA2D5wk5o0DKD
|
||||
eesGSKS5l22ZMXJNShgzPKmv3HpH22CSVpO0sNZ6R+iG8a3oq4QkU61MT1CfGoMI
|
||||
a8lxTKnZCsRXU1HexqZs+DSc+30tz50bNqLdido/l5B4EJnQP03ciO0=
|
||||
-----END RSA PRIVATE KEY-----";
|
||||
string publicKey = @"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEkoEAGGc6wT16d4Ye+yN2hcqigdTGlMcjUlW6cAmRWYXLwkKoW3WlX3xAK0oQdMLqRDu2PVRPY3qfHURj0EEellpydeaSekp1fg27Rw2VKmEumu6Wxwo9HddXORPAQXTQ4yI0lWSerypckXVPeVjHetbkSci2foLedCbeBA9c/RyRgIUl227/pJKDNX2Rpqly0sY82nVWN/0p4NAyslexA0fGdBx+IgKnbU2JQKJeiwOomtEB/N492XRfCw2eCi7Ly3R8+U1KeBm+zH6Q8aH8ApqQohhLRw71bcWZ1g1bxd6HORxXOu0mFTzHbWFcZ9ILtXRl4Pt0x5Mve1AJXEKb hpclabsa@longhaulLN5-033\n";
|
||||
|
||||
this.SendRequest("startjobandtask", "taskcompleted", nodeName, (content, ex) =>
|
||||
{
|
||||
callback(nodeName, arg, ex);
|
||||
}, Tuple.Create(arg, startInfo));
|
||||
}, Tuple.Create(arg, startInfo, userName, password, privateKey, publicKey));
|
||||
}
|
||||
|
||||
public void StartJobAndTaskSoftCardCred(string nodeName, StartJobAndTaskArg arg, string userName, string password, byte[] certificate, ProcessStartInfo startInfo, NodeCommunicatorCallBack<StartJobAndTaskArg> callback)
|
||||
{
|
||||
string privateKey = @"-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpQIBAAKCAQEAxJKBABhnOsE9eneGHvsjdoXKooHUxpTHI1JVunAJkVmFy8JC
|
||||
qFt1pV98QCtKEHTC6kQ7tj1UT2N6nx1EY9BBHpZacnXmknpKdX4Nu0cNlSphLpru
|
||||
lscKPR3XVzkTwEF00OMiNJVknq8qXJF1T3lYx3rW5EnItn6C3nQm3gQPXP0ckYCF
|
||||
Jdtu/6SSgzV9kaapctLGPNp1Vjf9KeDQMrJXsQNHxnQcfiICp21NiUCiXosDqJrR
|
||||
AfzePdl0XwsNngouy8t0fPlNSngZvsx+kPGh/AKakKIYS0cO9W3FmdYNW8Xehzkc
|
||||
VzrtJhU8x21hXGfSC7V0ZeD7dMeTL3tQCVxCmwIDAQABAoIBAQCve8Jh3Wc6koxZ
|
||||
qh43xicwhdwSGyliZisoozYZDC/ebDb/Ydq0BYIPMiDwADVMX5AqJuPPmwyLGtm6
|
||||
9hu5p46aycrQ5+QA299g6DlF+PZtNbowKuvX+rRvPxagrTmupkCswjglDUEYUHPW
|
||||
05wQaNoSqtzwS9Y85M/b24FfLeyxK0n8zjKFErJaHdhVxI6cxw7RdVlSmM9UHmah
|
||||
wTkW8HkblbOArilAHi6SlRTNZG4gTGeDzPb7fYZo3hzJyLbcaNfJscUuqnAJ+6pT
|
||||
iY6NNp1E8PQgjvHe21yv3DRoVRM4egqQvNZgUbYAMUgr30T1UoxnUXwk2vqJMfg2
|
||||
Nzw0ESGRAoGBAPkfXjjGfc4HryqPkdx0kjXs0bXC3js2g4IXItK9YUFeZzf+476y
|
||||
OTMQg/8DUbqd5rLv7PITIAqpGs39pkfnyohPjOe2zZzeoyaXurYIPV98hhH880uH
|
||||
ZUhOxJYnlqHGxGT7p2PmmnAlmY4TSJrp12VnuiQVVVsXWOGPqHx4S4f9AoGBAMn/
|
||||
vuea7hsCgwIE25MJJ55FYCJodLkioQy6aGP4NgB89Azzg527WsQ6H5xhgVMKHWyu
|
||||
Q1snp+q8LyzD0i1veEvWb8EYifsMyTIPXOUTwZgzaTTCeJNHdc4gw1U22vd7OBYy
|
||||
nZCU7Tn8Pe6eIMNztnVduiv+2QHuiNPgN7M73/x3AoGBAOL0IcmFgy0EsR8MBq0Z
|
||||
ge4gnniBXCYDptEINNBaeVStJUnNKzwab6PGwwm6w2VI3thbXbi3lbRAlMve7fKK
|
||||
B2ghWNPsJOtppKbPCek2Hnt0HUwb7qX7Zlj2cX/99uvRAjChVsDbYA0VJAxcIwQG
|
||||
TxXx5pFi4g0HexCa6LrkeKMdAoGAcvRIACX7OwPC6nM5QgQDt95jRzGKu5EpdcTf
|
||||
g4TNtplliblLPYhRrzokoyoaHteyxxak3ktDFCLj9eW6xoCZRQ9Tqd/9JhGwrfxw
|
||||
MS19DtCzHoNNewM/135tqyD8m7pTwM4tPQqDtmwGErWKj7BaNZCRUlhFxwOoemsv
|
||||
R6DbZyECgYEAhjL2N3Pc+WW+8x2bbIBN3rJcMjBBIivB62AwgYZnA2D5wk5o0DKD
|
||||
eesGSKS5l22ZMXJNShgzPKmv3HpH22CSVpO0sNZ6R+iG8a3oq4QkU61MT1CfGoMI
|
||||
a8lxTKnZCsRXU1HexqZs+DSc+30tz50bNqLdido/l5B4EJnQP03ciO0=
|
||||
-----END RSA PRIVATE KEY-----";
|
||||
string publicKey = @"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEkoEAGGc6wT16d4Ye+yN2hcqigdTGlMcjUlW6cAmRWYXLwkKoW3WlX3xAK0oQdMLqRDu2PVRPY3qfHURj0EEellpydeaSekp1fg27Rw2VKmEumu6Wxwo9HddXORPAQXTQ4yI0lWSerypckXVPeVjHetbkSci2foLedCbeBA9c/RyRgIUl227/pJKDNX2Rpqly0sY82nVWN/0p4NAyslexA0fGdBx+IgKnbU2JQKJeiwOomtEB/N492XRfCw2eCi7Ly3R8+U1KeBm+zH6Q8aH8ApqQohhLRw71bcWZ1g1bxd6HORxXOu0mFTzHbWFcZ9ILtXRl4Pt0x5Mve1AJXEKb hpclabsa@longhaulLN5-033\n";
|
||||
|
||||
this.SendRequest("startjobandtask", "taskcompleted", nodeName, (content, ex) =>
|
||||
{
|
||||
callback(nodeName, arg, ex);
|
||||
}, Tuple.Create(arg, startInfo));
|
||||
}, Tuple.Create(arg, startInfo, userName, password, privateKey, publicKey));
|
||||
}
|
||||
|
||||
public void StartTask(string nodeName, StartTaskArg arg, ProcessStartInfo startInfo, NodeCommunicatorCallBack<StartTaskArg> callback)
|
||||
|
@ -264,7 +322,7 @@ namespace Microsoft.Hpc.Communicators.LinuxCommunicator
|
|||
}, null);
|
||||
}
|
||||
|
||||
private void SendRequest<T>(string action, string callbackAction, string nodeName, Action<HttpContent, Exception> callback, T arg) where T : NodeCommunicatorCallBackArg
|
||||
private void SendRequest<T>(string action, string callbackAction, string nodeName, Action<HttpContent, Exception> callback, T arg)
|
||||
{
|
||||
var request = new HttpRequestMessage(HttpMethod.Post, this.GetResoureUri(nodeName, action));
|
||||
request.Headers.Add(CallbackUriHeaderName, this.GetCallbackUri(nodeName, callbackAction));
|
||||
|
@ -291,33 +349,6 @@ namespace Microsoft.Hpc.Communicators.LinuxCommunicator
|
|||
}, this.cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
private void SendRequest<T, T1>(string action, string callbackAction, string nodeName, Action<HttpContent, Exception> callback, Tuple<T, T1> arg) where T : NodeCommunicatorCallBackArg
|
||||
{
|
||||
var request = new HttpRequestMessage(HttpMethod.Post, this.GetResoureUri(nodeName, action));
|
||||
request.Headers.Add(CallbackUriHeaderName, this.GetCallbackUri(nodeName, callbackAction));
|
||||
var formatter = new JsonMediaTypeFormatter();
|
||||
request.Content = new ObjectContent<Tuple<T, T1>>(arg, formatter);
|
||||
|
||||
this.client.SendAsync(request, this.cancellationTokenSource.Token).ContinueWith(t =>
|
||||
{
|
||||
Exception ex = t.Exception;
|
||||
|
||||
if (ex == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
t.Result.EnsureSuccessStatusCode();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ex = e;
|
||||
}
|
||||
}
|
||||
|
||||
callback(t.Result.Content, ex);
|
||||
}, this.cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
private Uri GetResoureUri(string nodeName, string action)
|
||||
{
|
||||
var hostName = this.LinuxServiceHost ?? nodeName;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.22310.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinuxCommunicator", "LinuxCommunicator.csproj", "{AA00383C-5CAA-47E2-AAAF-04AE2890B534}"
|
||||
EndProject
|
||||
|
@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonitoringTest", "..\Monito
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuncTest", "..\FuncTest\FuncTest.csproj", "{A7E995F9-4C5C-4D65-91C6-8E09DF8FDC47}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "..\Test\Test.csproj", "{ED4BB613-B234-446E-8FAF-2CB25BA055A2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -73,6 +75,18 @@ Global
|
|||
{A7E995F9-4C5C-4D65-91C6-8E09DF8FDC47}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A7E995F9-4C5C-4D65-91C6-8E09DF8FDC47}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A7E995F9-4C5C-4D65-91C6-8E09DF8FDC47}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{ED4BB613-B234-446E-8FAF-2CB25BA055A2}.Release|Win32.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg
поставляемый
Normal file
Двоичный файл не отображается.
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll
поставляемый
Normal file
Двоичный файл не отображается.
2094
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.xml
поставляемый
Normal file
2094
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll
поставляемый
Normal file
Двоичный файл не отображается.
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
11
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Content/web.config.transform
поставляемый
Normal file
11
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Content/web.config.transform
поставляемый
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg
поставляемый
Normal file
Двоичный файл не отображается.
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll
поставляемый
Normal file
Двоичный файл не отображается.
6664
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.xml
поставляемый
Normal file
6664
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/Microsoft.AspNet.WebApi.Owin.5.2.3.nupkg
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/Microsoft.AspNet.WebApi.Owin.5.2.3.nupkg
поставляемый
Normal file
Двоичный файл не отображается.
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/lib/net45/System.Web.Http.Owin.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/lib/net45/System.Web.Http.Owin.dll
поставляемый
Normal file
Двоичный файл не отображается.
195
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/lib/net45/System.Web.Http.Owin.xml
поставляемый
Normal file
195
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/lib/net45/System.Web.Http.Owin.xml
поставляемый
Normal file
|
@ -0,0 +1,195 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>System.Web.Http.Owin</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Net.Http.OwinHttpRequestMessageExtensions">
|
||||
<summary>Provides extension methods for the <see cref="T:System.Net.Http.HttpRequestMessage" /> class.</summary>
|
||||
</member>
|
||||
<member name="M:System.Net.Http.OwinHttpRequestMessageExtensions.GetOwinContext(System.Net.Http.HttpRequestMessage)">
|
||||
<summary>Gets the OWIN context for the specified request.</summary>
|
||||
<returns>The OWIN environment for the specified context, if available; otherwise <see cref="null" />.</returns>
|
||||
<param name="request">The HTTP request message.</param>
|
||||
</member>
|
||||
<member name="M:System.Net.Http.OwinHttpRequestMessageExtensions.GetOwinEnvironment(System.Net.Http.HttpRequestMessage)">
|
||||
<summary>Gets the OWIN environment for the specified request.</summary>
|
||||
<returns>The OWIN environment for the specified request, if available; otherwise <see cref="null" />.</returns>
|
||||
<param name="request">The HTTP request message.</param>
|
||||
</member>
|
||||
<member name="M:System.Net.Http.OwinHttpRequestMessageExtensions.SetOwinContext(System.Net.Http.HttpRequestMessage,Microsoft.Owin.IOwinContext)">
|
||||
<summary>Sets the OWIN context for the specified request.</summary>
|
||||
<param name="request">The HTTP request message.</param>
|
||||
<param name="context">The OWIN context to set.</param>
|
||||
</member>
|
||||
<member name="M:System.Net.Http.OwinHttpRequestMessageExtensions.SetOwinEnvironment(System.Net.Http.HttpRequestMessage,System.Collections.Generic.IDictionary{System.String,System.Object})">
|
||||
<summary>Sets the OWIN environment for the specified request.</summary>
|
||||
<param name="request">The HTTP request message.</param>
|
||||
<param name="environment">The OWIN environment to set.</param>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.HostAuthenticationAttribute">
|
||||
<summary>Represents an authentication attribute that authenticates via OWIN middleware.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.HostAuthenticationAttribute.#ctor(System.String)">
|
||||
<summary>Initializes a new instance of the <see cref="T:System.Web.Http.HostAuthenticationAttribute" /> class.</summary>
|
||||
<param name="authenticationType">The authentication type of the OWIN middleware to use.</param>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.HostAuthenticationAttribute.AllowMultiple"></member>
|
||||
<member name="M:System.Web.Http.HostAuthenticationAttribute.AuthenticateAsync(System.Web.Http.Filters.HttpAuthenticationContext,System.Threading.CancellationToken)"></member>
|
||||
<member name="P:System.Web.Http.HostAuthenticationAttribute.AuthenticationType">
|
||||
<summary>Gets the authentication type of the OWIN middleware to use.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.HostAuthenticationAttribute.ChallengeAsync(System.Web.Http.Filters.HttpAuthenticationChallengeContext,System.Threading.CancellationToken)"></member>
|
||||
<member name="T:System.Web.Http.HostAuthenticationFilter">
|
||||
<summary>Represents an authentication filter that authenticates via OWIN middleware.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.HostAuthenticationFilter.#ctor(System.String)">
|
||||
<summary>Initializes a new instance of the <see cref="T:System.Web.Http.HostAuthenticationFilter" /> class.</summary>
|
||||
<param name="authenticationType">The authentication type of the OWIN middleware to use.</param>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.HostAuthenticationFilter.AllowMultiple">
|
||||
<summary>Gets a value indicating whether the filter allows multiple authentication.</summary>
|
||||
<returns>true if the filter allows multiple authentication; otherwise, false.</returns>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.HostAuthenticationFilter.AuthenticateAsync(System.Web.Http.Filters.HttpAuthenticationContext,System.Threading.CancellationToken)">
|
||||
<summary>Asynchronously authenticates the request.</summary>
|
||||
<returns>The task that completes the authentication.</returns>
|
||||
<param name="context">The authentication context.</param>
|
||||
<param name="cancellationToken">The cancellation token.</param>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.HostAuthenticationFilter.AuthenticationType">
|
||||
<summary>Gets the authentication type of the OWIN middleware to use.</summary>
|
||||
<returns>The authentication type of the OWIN middleware to use.</returns>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.HostAuthenticationFilter.ChallengeAsync(System.Web.Http.Filters.HttpAuthenticationChallengeContext,System.Threading.CancellationToken)">
|
||||
<summary>Asynchronously challenges an authentication.</summary>
|
||||
<returns>The task that completes the challenge.</returns>
|
||||
<param name="context">The context.</param>
|
||||
<param name="cancellationToken">The cancellation token.</param>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.OwinHttpConfigurationExtensions">
|
||||
<summary>Provides extension methods for the <see cref="T:System.Web.Http.HttpConfiguration" /> class.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.OwinHttpConfigurationExtensions.SuppressDefaultHostAuthentication(System.Web.Http.HttpConfiguration)">
|
||||
<summary>Enables suppression of the host's default authentication.</summary>
|
||||
<param name="configuration">The server configuration.</param>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.Owin.HttpMessageHandlerAdapter">
|
||||
<summary>Represents an OWIN component that submits requests to an <see cref="T:System.Net.Http.HttpMessageHandler" /> when invoked.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.HttpMessageHandlerAdapter.#ctor(Microsoft.Owin.OwinMiddleware,System.Net.Http.HttpMessageHandler,System.Web.Http.Hosting.IHostBufferPolicySelector)">
|
||||
<summary>Initializes a new instance of the <see cref="T:System.Web.Http.Owin.HttpMessageHandlerAdapter" /> class.</summary>
|
||||
<param name="next">The next component in the pipeline.</param>
|
||||
<param name="messageHandler">The <see cref="T:System.Net.Http.HttpMessageHandler" /> to submit requests to.</param>
|
||||
<param name="bufferPolicySelector">The <see cref="T:System.Web.Http.Hosting.IHostBufferPolicySelector" /> that determines whether or not to buffer requests and responses.</param>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.HttpMessageHandlerAdapter.#ctor(Microsoft.Owin.OwinMiddleware,System.Web.Http.Owin.HttpMessageHandlerOptions)">
|
||||
<summary>Initializes a new instance of the <see cref="T:System.Web.Http.Owin.HttpMessageHandlerAdapter" /> class.</summary>
|
||||
<param name="next">The next component in the pipeline.</param>
|
||||
<param name="options">The options to configure this adapter.</param>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerAdapter.AppDisposing">
|
||||
<summary>Gets the cancellation token that triggers cleanup of this component.</summary>
|
||||
<returns>The cancellation token.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerAdapter.BufferPolicySelector">
|
||||
<summary>Gets the <see cref="T:System.Web.Http.Hosting.IHostBufferPolicySelector" /> that determines whether or not to buffer requests and responses.</summary>
|
||||
<returns>The <see cref="T:System.Web.Http.Hosting.IHostBufferPolicySelector" /> that determines whether or not to buffer requests and responses.</returns>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.HttpMessageHandlerAdapter.Dispose">
|
||||
<summary>Releases all resources used by the current instance of the <see cref="T:System.Web.Http.Owin.HttpMessageHandlerAdapter" /> class.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.HttpMessageHandlerAdapter.Dispose(System.Boolean)">
|
||||
<summary>Releases unmanaged and optionally managed resources.</summary>
|
||||
<param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerAdapter.ExceptionHandler">
|
||||
<summary>Gets the <see cref="T:System.Web.Http.ExceptionHandling.IExceptionHandler" /> to use to process unhandled exceptions.</summary>
|
||||
<returns>The <see cref="T:System.Web.Http.ExceptionHandling.IExceptionHandler" /> to use to process unhandled exceptions.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerAdapter.ExceptionLogger">
|
||||
<summary>Gets the <see cref="T:System.Web.Http.ExceptionHandling.IExceptionLogger" /> to use to log unhandled exceptions.</summary>
|
||||
<returns>The <see cref="T:System.Web.Http.ExceptionHandling.IExceptionLogger" /> to use to log unhandled exceptions.</returns>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.HttpMessageHandlerAdapter.Invoke(Microsoft.Owin.IOwinContext)">
|
||||
<returns>Returns <see cref="T:System.Threading.Tasks.Task" />.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerAdapter.MessageHandler">
|
||||
<summary>Gets the <see cref="T:System.Net.Http.HttpMessageHandler" /> to submit requests to.</summary>
|
||||
<returns>The <see cref="T:System.Net.Http.HttpMessageHandler" /> to submit requests to.</returns>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.Owin.HttpMessageHandlerOptions">
|
||||
<summary>Represents the options for configuring an <see cref="T:System.Web.Http.Owin.HttpMessageHandlerAdapter" />.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.HttpMessageHandlerOptions.#ctor">
|
||||
<summary>Initializes a new instance of the<see cref="T:System.Web.Http.Owin.HttpMessageHandlerOptions" /> class.</summary>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerOptions.AppDisposing">
|
||||
<summary>Gets or sets the <see cref="T:System.Threading.CancellationToken" /> that triggers cleanup of the <see cref="T:System.Web.Http.Owin.HttpMessageHandlerAdapter" />.</summary>
|
||||
<returns>The <see cref="T:System.Threading.CancellationToken" /> that triggers cleanup of the <see cref="T:System.Web.Http.Owin.HttpMessageHandlerAdapter" />.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerOptions.BufferPolicySelector">
|
||||
<summary>Gets or sets the <see cref="T:System.Web.Http.Hosting.IHostBufferPolicySelector" /> that determines whether or not to buffer requests and responses.</summary>
|
||||
<returns>The <see cref="T:System.Web.Http.Hosting.IHostBufferPolicySelector" /> that determines whether or not to buffer requests and responses.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerOptions.ExceptionHandler">
|
||||
<summary>Gets or sets the <see cref="T:System.Web.Http.ExceptionHandling.IExceptionHandler" /> to use to process unhandled exceptions.</summary>
|
||||
<returns>The <see cref="T:System.Web.Http.ExceptionHandling.IExceptionHandler" /> to use to process unhandled exceptions.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerOptions.ExceptionLogger">
|
||||
<summary>Gets or sets the <see cref="T:System.Web.Http.ExceptionHandling.IExceptionLogger" /> to use to log unhandled exceptions.</summary>
|
||||
<returns>The <see cref="T:System.Web.Http.ExceptionHandling.IExceptionLogger" /> to use to log unhandled exceptions.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.HttpMessageHandlerOptions.MessageHandler">
|
||||
<summary>Gets or sets the <see cref="T:System.Net.Http.HttpMessageHandler" /> to submit requests to.</summary>
|
||||
<returns>The <see cref="T:System.Net.Http.HttpMessageHandler" /> to submit requests to.</returns>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.Owin.OwinBufferPolicySelector">
|
||||
<summary>Provides the default implementation of <see cref="T:System.Web.Http.Hosting.IHostBufferPolicySelector" /> used by the OWIN Web API adapter.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.OwinBufferPolicySelector.#ctor">
|
||||
<summary>Initializes a new instance of the <see cref="T:System.Web.Http.Owin.OwinBufferPolicySelector" /> class.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.OwinBufferPolicySelector.UseBufferedInputStream(System.Object)">
|
||||
<summary>Determines whether the host should buffer the HttpRequestMessage entity body.</summary>
|
||||
<returns>true if buffering should be used; otherwise a streamed request should be used.</returns>
|
||||
<param name="hostContext">The host context.</param>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.OwinBufferPolicySelector.UseBufferedOutputStream(System.Net.Http.HttpResponseMessage)">
|
||||
<summary>Determines whether the host should buffer the HttpResponseMessage entity body.</summary>
|
||||
<returns>true if buffering should be used; otherwise a streamed response should be used.</returns>
|
||||
<param name="response">The response.</param>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.Owin.OwinExceptionCatchBlocks">
|
||||
<summary>Provides the catch blocks used within this assembly.</summary>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.OwinExceptionCatchBlocks.HttpMessageHandlerAdapterBufferContent">
|
||||
<summary>Gets the catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.BufferContent.</summary>
|
||||
<returns>The catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.BufferContent.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.OwinExceptionCatchBlocks.HttpMessageHandlerAdapterBufferError">
|
||||
<summary>Gets the catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.BufferError.</summary>
|
||||
<returns>The catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.BufferError.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.OwinExceptionCatchBlocks.HttpMessageHandlerAdapterComputeContentLength">
|
||||
<summary>Gets the catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.ComputeContentLength.</summary>
|
||||
<returns>The catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.ComputeContentLength.</returns>
|
||||
</member>
|
||||
<member name="P:System.Web.Http.Owin.OwinExceptionCatchBlocks.HttpMessageHandlerAdapterStreamContent">
|
||||
<summary>Gets the catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.StreamContent.</summary>
|
||||
<returns>The catch block in System.Web.Http.Owin.HttpMessageHandlerAdapter.StreamContent.</returns>
|
||||
</member>
|
||||
<member name="T:System.Web.Http.Owin.PassiveAuthenticationMessageHandler">
|
||||
<summary>Represents a message handler that treats all OWIN authentication middleware as passive.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.PassiveAuthenticationMessageHandler.#ctor">
|
||||
<summary>Initializes a new instance of the <see cref="T:System.Web.Http.Owin.PassiveAuthenticationMessageHandler" /> class.</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.Http.Owin.PassiveAuthenticationMessageHandler.SendAsync(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)">
|
||||
<summary>Asynchronously sends a message request.</summary>
|
||||
<returns>The task that completes the asynchronous operation.</returns>
|
||||
<param name="request">The message request.</param>
|
||||
<param name="cancellationToken">The cancellation token.</param>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.OwinSelfHost.5.2.3/Microsoft.AspNet.WebApi.OwinSelfHost.5.2.3.nupkg
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Microsoft.AspNet.WebApi.OwinSelfHost.5.2.3/Microsoft.AspNet.WebApi.OwinSelfHost.5.2.3.nupkg
поставляемый
Normal file
Двоичный файл не отображается.
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg
поставляемый
Normal file
Двоичный файл не отображается.
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
9108
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.xml
поставляемый
Normal file
9108
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
8251
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.xml
поставляемый
Normal file
8251
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
8558
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.xml
поставляемый
Normal file
8558
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
8558
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.xml
поставляемый
Normal file
8558
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
8083
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.xml
поставляемый
Normal file
8083
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
7711
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
поставляемый
Normal file
7711
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичные данные
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll
поставляемый
Normal file
Двоичный файл не отображается.
8083
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
поставляемый
Normal file
8083
LinuxCommunicator/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
поставляемый
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
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<repositories>
|
||||
<repository path="..\..\Test\packages.config" />
|
||||
<repository path="..\packages.config" />
|
||||
</repositories>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
byte[] abc = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
|
||||
string test = "ttt";
|
||||
HttpClient c = new HttpClient();
|
||||
JsonMediaTypeFormatter f = new JsonMediaTypeFormatter();
|
||||
MemoryStream ms = new MemoryStream();
|
||||
f.WriteToStream(typeof(Tuple<byte[], string>), Tuple.Create(abc, test), ms, Encoding.Default);
|
||||
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
var obj = f.ReadFromStream(typeof(Tuple<byte[], string>), ms, Encoding.Default, null);
|
||||
var t = (Tuple<byte[], string>)obj;
|
||||
var abc1 = t.Item1;
|
||||
|
||||
StreamReader sr = new StreamReader(ms);
|
||||
|
||||
Console.WriteLine(sr.ReadToEnd());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{ED4BB613-B234-446E-8FAF-2CB25BA055A2}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Test</RootNamespace>
|
||||
<AssemblyName>Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Owin">
|
||||
<HintPath>..\LinuxCommunicator\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.HttpListener">
|
||||
<HintPath>..\LinuxCommunicator\packages\Microsoft.Owin.Host.HttpListener.2.0.2\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Hosting">
|
||||
<HintPath>..\LinuxCommunicator\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\LinuxCommunicator\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Owin">
|
||||
<HintPath>..\LinuxCommunicator\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<HintPath>..\LinuxCommunicator\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http">
|
||||
<HintPath>..\LinuxCommunicator\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Owin">
|
||||
<HintPath>..\LinuxCommunicator\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin" version="2.0.2" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
|
||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче