Skip to content

Commit 22a2f40

Browse files
committed
本地提交
1 parent e87080b commit 22a2f40

File tree

161 files changed

+145891
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+145891
-0
lines changed

.nuget/NuGet.Config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

.nuget/NuGet.exe

4.07 MB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
21+
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
22+
<!--
23+
<PackageSource Include="https://www.nuget.org/api/v2/" />
24+
<PackageSource Include="https://my-nuget-source/nuget/" />
25+
-->
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
29+
<!-- Windows specific commands -->
30+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
34+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
35+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
36+
</PropertyGroup>
37+
38+
<PropertyGroup>
39+
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
40+
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
41+
</PropertyGroup>
42+
43+
<PropertyGroup>
44+
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
45+
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
46+
</PropertyGroup>
47+
48+
<PropertyGroup>
49+
<!-- NuGet command -->
50+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
51+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
52+
53+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
54+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>
55+
56+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
57+
58+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
59+
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
60+
61+
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
62+
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
63+
64+
<!-- Commands -->
65+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
66+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
67+
68+
<!-- We need to ensure packages are restored prior to assembly resolve -->
69+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
70+
RestorePackages;
71+
$(BuildDependsOn);
72+
</BuildDependsOn>
73+
74+
<!-- Make the build depend on restore packages -->
75+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
76+
$(BuildDependsOn);
77+
BuildPackage;
78+
</BuildDependsOn>
79+
</PropertyGroup>
80+
81+
<Target Name="CheckPrerequisites">
82+
<!-- Raise an error if we're unable to locate nuget.exe -->
83+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
84+
<!--
85+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
86+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
87+
parallel builds will have to wait for it to complete.
88+
-->
89+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
90+
</Target>
91+
92+
<Target Name="_DownloadNuGet">
93+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
94+
</Target>
95+
96+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
97+
<Exec Command="$(RestoreCommand)"
98+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
99+
100+
<Exec Command="$(RestoreCommand)"
101+
LogStandardErrorAsError="true"
102+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
103+
</Target>
104+
105+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
106+
<Exec Command="$(BuildCommand)"
107+
Condition=" '$(OS)' != 'Windows_NT' " />
108+
109+
<Exec Command="$(BuildCommand)"
110+
LogStandardErrorAsError="true"
111+
Condition=" '$(OS)' == 'Windows_NT' " />
112+
</Target>
113+
114+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
115+
<ParameterGroup>
116+
<OutputFilename ParameterType="System.String" Required="true" />
117+
</ParameterGroup>
118+
<Task>
119+
<Reference Include="System.Core" />
120+
<Using Namespace="System" />
121+
<Using Namespace="System.IO" />
122+
<Using Namespace="System.Net" />
123+
<Using Namespace="Microsoft.Build.Framework" />
124+
<Using Namespace="Microsoft.Build.Utilities" />
125+
<Code Type="Fragment" Language="cs">
126+
<![CDATA[
127+
try {
128+
OutputFilename = Path.GetFullPath(OutputFilename);
129+
130+
Log.LogMessage("Downloading latest version of NuGet.exe...");
131+
WebClient webClient = new WebClient();
132+
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
133+
134+
return true;
135+
}
136+
catch (Exception ex) {
137+
Log.LogErrorFromException(ex);
138+
return false;
139+
}
140+
]]>
141+
</Code>
142+
</Task>
143+
</UsingTask>
144+
</Project>

WebApplication8.sln

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.21005.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication8", "WebApplication8\WebApplication8.csproj", "{4A8935C0-6599-4859-8DFB-42CE359C7BA6}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B541BFDC-EA53-485B-91A9-10D4045BC7A4}"
9+
ProjectSection(SolutionItems) = preProject
10+
.nuget\NuGet.Config = .nuget\NuGet.Config
11+
.nuget\NuGet.exe = .nuget\NuGet.exe
12+
.nuget\NuGet.targets = .nuget\NuGet.targets
13+
EndProjectSection
14+
EndProject
15+
Global
16+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
17+
Debug|Any CPU = Debug|Any CPU
18+
Release|Any CPU = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{4A8935C0-6599-4859-8DFB-42CE359C7BA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{4A8935C0-6599-4859-8DFB-42CE359C7BA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{4A8935C0-6599-4859-8DFB-42CE359C7BA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{4A8935C0-6599-4859-8DFB-42CE359C7BA6}.Release|Any CPU.Build.0 = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(SolutionProperties) = preSolution
27+
HideSolutionNode = FALSE
28+
EndGlobalSection
29+
EndGlobal

WebApplication8.v12.suo

21 KB
Binary file not shown.

WebApplication8/HttpHelper.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Net;
6+
using System.Net.Http;
7+
using System.Threading.Tasks;
8+
using System.Text;
9+
10+
11+
public class HttpHelper
12+
{
13+
public static string GetJson(string url)
14+
{
15+
WebClient wc = new WebClient();
16+
byte[] bResponse = wc.DownloadData(url);
17+
string strResponse = Encoding.UTF8.GetString(bResponse);
18+
return strResponse;
19+
20+
}
21+
}

WebApplication8/MyHub.cs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using Microsoft.AspNet.SignalR;
6+
using Microsoft.AspNet.SignalR.Hubs;
7+
using System.Net;
8+
using System.Text;
9+
10+
namespace WebApplication8
11+
{
12+
[HubName("myhub")]
13+
public class MyHub : Hub
14+
{
15+
16+
17+
public void SendMessage(string name, string message)
18+
{
19+
20+
string AddressIP = string.Empty;
21+
foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
22+
{
23+
if (_IPAddress.AddressFamily.ToString() == "InterNetwork")
24+
{
25+
AddressIP = _IPAddress.ToString();
26+
}
27+
}
28+
29+
string url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=" + AddressIP;
30+
31+
var result = HttpHelper.GetJson(url);
32+
33+
var city = Newtonsoft.Json.JsonConvert.DeserializeObject<info>(result).city;
34+
35+
Clients.All.receiveMessage(city+ "网友" , message);
36+
}
37+
}
38+
39+
public class info
40+
{
41+
public string city { get; set; }
42+
43+
44+
}
45+
46+
47+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// 有关程序集的常规信息通过下列特性集
6+
// 控制。更改这些特性值可修改
7+
// 与程序集关联的信息。
8+
[assembly: AssemblyTitle("WebApplication8")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("WebApplication8")]
13+
[assembly: AssemblyCopyright("版权所有(C) 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// 将 ComVisible 设置为 false 会使此程序集中的类型
18+
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的某个类型,
19+
// 请针对该类型将 ComVisible 特性设置为 true。
20+
[assembly: ComVisible(false)]
21+
22+
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23+
[assembly: Guid("a1993928-b677-44c2-8462-dc4601ab96a0")]
24+
25+
// 程序集的版本信息由下列四个值组成:
26+
//
27+
// 主版本
28+
// 次版本
29+
// 内部版本号
30+
// 修订号
31+
//
32+
// 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
33+
// 方法是按如下所示使用“*”:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
您 Web 项目的发布/打包进程将使用此文件。您可以通过编辑此 MSBuild 文件
4+
来自定义该进程的行为。若要了解与此相关的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkID=208121。
5+
-->
6+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
7+
<PropertyGroup>
8+
<WebPublishMethod>FileSystem</WebPublishMethod>
9+
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
10+
<LastUsedPlatform>Any CPU</LastUsedPlatform>
11+
<SiteUrlToLaunchAfterPublish />
12+
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
13+
<ExcludeApp_Data>False</ExcludeApp_Data>
14+
<publishUrl>C:\Users\Administrator.SC-201703152226\Desktop\Back</publishUrl>
15+
<DeleteExistingFiles>False</DeleteExistingFiles>
16+
</PropertyGroup>
17+
</Project>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
您 Web 项目的发布/打包进程将使用此文件。您可以通过编辑此 MSBuild 文件
4+
来自定义该进程的行为。若要了解与此相关的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkID=208121。
5+
-->
6+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
7+
<PropertyGroup>
8+
<TimeStampOfAssociatedLegacyPublishXmlFile />
9+
<_PublishTargetUrl>C:\Users\Administrator.SC-201703152226\Desktop\Back</_PublishTargetUrl>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<File Include="bin/Microsoft.AspNet.SignalR.Core.dll">
13+
<publishTime>01/18/2017 12:27:33</publishTime>
14+
</File>
15+
<File Include="bin/Microsoft.AspNet.SignalR.SystemWeb.dll">
16+
<publishTime>01/18/2017 12:27:33</publishTime>
17+
</File>
18+
<File Include="bin/Microsoft.Owin.dll">
19+
<publishTime>01/18/2017 12:27:33</publishTime>
20+
</File>
21+
<File Include="bin/Microsoft.Owin.Host.SystemWeb.dll">
22+
<publishTime>01/18/2017 12:27:33</publishTime>
23+
</File>
24+
<File Include="bin/Microsoft.Owin.Security.dll">
25+
<publishTime>01/18/2017 12:27:33</publishTime>
26+
</File>
27+
<File Include="bin/Microsoft.Web.Infrastructure.dll">
28+
<publishTime>01/17/2017 17:46:51</publishTime>
29+
</File>
30+
<File Include="bin/Newtonsoft.Json.dll">
31+
<publishTime>01/18/2017 12:27:32</publishTime>
32+
</File>
33+
<File Include="bin/Owin.dll">
34+
<publishTime>01/18/2017 12:27:33</publishTime>
35+
</File>
36+
<File Include="bin/WebApplication8.dll">
37+
<publishTime>01/18/2017 14:07:16</publishTime>
38+
</File>
39+
<File Include="danmu.aspx">
40+
<publishTime>01/18/2017 10:37:46</publishTime>
41+
</File>
42+
<File Include="index.aspx">
43+
<publishTime>01/18/2017 13:39:45</publishTime>
44+
</File>
45+
<File Include="packages.config">
46+
<publishTime>01/18/2017 12:27:38</publishTime>
47+
</File>
48+
<File Include="Scripts/damoo.min.js">
49+
<publishTime>01/18/2017 10:29:54</publishTime>
50+
</File>
51+
<File Include="Scripts/jquery-1.6.4.js">
52+
<publishTime>01/17/2017 17:44:42</publishTime>
53+
</File>
54+
<File Include="Scripts/jquery-1.6.4.min.js">
55+
<publishTime>01/17/2017 17:44:42</publishTime>
56+
</File>
57+
<File Include="Scripts/jquery.signalR-2.2.1.js">
58+
<publishTime>01/17/2017 17:44:42</publishTime>
59+
</File>
60+
<File Include="Scripts/jquery.signalR-2.2.1.min.js">
61+
<publishTime>01/17/2017 17:44:42</publishTime>
62+
</File>
63+
<File Include="Web.config">
64+
<publishTime>01/18/2017 13:32:41</publishTime>
65+
</File>
66+
</ItemGroup>
67+
</Project>

0 commit comments

Comments
 (0)