Skip to content

Commit

Permalink
Merge pull request #75 from gqy117/CSharp6
Browse files Browse the repository at this point in the history
C sharp6
  • Loading branch information
gqy117 committed May 13, 2016
2 parents cd86a91 + 8f849cb commit 495fdac
Show file tree
Hide file tree
Showing 134 changed files with 915 additions and 1,369 deletions.
1 change: 0 additions & 1 deletion WebSite/DataAccess/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace DependencyInjection
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using WebToolRepository;
using WebToolService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace DependencyInjection
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using WebToolRepository;
using WebToolService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace DependencyInjection
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using WebToolRepository;
using WebToolService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace DependencyInjection
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using WebToolRepository;
using WebToolService;
Expand Down
11 changes: 0 additions & 11 deletions WebSite/DependencyInjection/DependencyInjection/BootStrap.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
namespace WebTool
{
using System;
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web;
using System.Web.Compilation;
using System.Web.Mvc;
using AutoMapper;
using DependencyInjection;
using Microsoft.Practices.ObjectBuilder2;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;
using Microsoft.Practices.Unity.Mvc;
using Microsoft.SqlServer.Server;
using WebToolRepository;
using WebToolService;

public class BootStrap
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.4.0.40804.0\lib\net40\System.Web.Mvc.dll</HintPath>
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
Expand Down Expand Up @@ -136,5 +136,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
14 changes: 13 additions & 1 deletion WebSite/DependencyInjection/DependencyInjection/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<packages>
<package id="AutoMapper" version="4.2.0" targetFramework="net45" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.40804.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="StyleCop.MSBuild" version="4.7.53.0" targetFramework="net45" developmentDependency="true" />
<package id="Unity" version="4.0.1" targetFramework="net45" />
Expand Down
3 changes: 0 additions & 3 deletions WebSite/Service/WebToolService/Attribute/RequiredExt.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class RequiredExtAttribute : System.ComponentModel.DataAnnotations.RequiredAttribute
Expand Down
8 changes: 0 additions & 8 deletions WebSite/Service/WebToolService/Base/ServiceBase.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.Remoting.Contexts;
using System.Text;
using AutoMapper;
using Microsoft.Practices.Unity;
using Utilities;
using WebToolRepository;
using WebToolService;

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Justification")]
public abstract class ServiceBase
Expand Down
5 changes: 0 additions & 5 deletions WebSite/Service/WebToolService/Interface/ITotalRecords.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public interface ITotalRecords
{
int TotalRecords { get; set; }
Expand Down
5 changes: 0 additions & 5 deletions WebSite/Service/WebToolService/Interface/ListWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
namespace WebToolService
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public class ListWrapper<T> : ITotalRecords
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

[Serializable]
public class LogOnBaseModel
Expand Down
3 changes: 0 additions & 3 deletions WebSite/Service/WebToolService/Models/Account/LogonModel.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using WebToolCulture.Resource;

[Serializable]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using WebToolCulture.Resource;

public class RegisterModel : LogOnModel
Expand Down
3 changes: 0 additions & 3 deletions WebSite/Service/WebToolService/Models/Account/UserModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

[Serializable]
public class UserModel : LogOnModel
Expand Down
3 changes: 0 additions & 3 deletions WebSite/Service/WebToolService/Models/Home/LanguageModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebToolCulture;

public class LanguageModel
Expand Down
13 changes: 2 additions & 11 deletions WebSite/Service/WebToolService/Models/JQueryTable.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;

/// <summary>
/// Represents the direction of sorting for a column.
Expand All @@ -20,12 +17,6 @@ public enum SortingDirection

public class JQueryTable
{
public JQueryTable()
{
this.iDisplayStart = 0;
this.iDisplayLength = 10;
}

/// <summary>
/// Gets or sets if the Global search is regex or not.
/// </summary>
Expand Down Expand Up @@ -54,12 +45,12 @@ public JQueryTable()
/// <summary>
/// Gets or sets the number of records to display.
/// </summary>
public int iDisplayLength { get; set; }
public int iDisplayLength { get; set; } = 10;

/// <summary>
/// Gets or sets the display start point.
/// </summary>
public int iDisplayStart { get; set; }
public int iDisplayStart { get; set; } = 0;

/// <summary>
/// Gets or sets column being sorted on (you will need to decode this number for your database).
Expand Down
5 changes: 0 additions & 5 deletions WebSite/Service/WebToolService/Models/SortedColumn.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

/// <summary>
/// Represents a sorted column from DataTables.
/// </summary>
Expand Down
33 changes: 10 additions & 23 deletions WebSite/Service/WebToolService/Models/WOLModel.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,25 @@
namespace WebToolService
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Utilities;

public class WolModel : ITotalRecords
{
public WolModel()
{
this.CmdHelper = new CmdHelper();
this.FileName = string.Empty;
this.Port = 9;
this.HostName = string.Empty;
this.SubnetMask = "255.255.255.255";
this.MacAddress = string.Empty;
}

public string Arguments { get; set; }

public ICmdHelper CmdHelper { get; set; }
public ICmdHelper CmdHelper { get; set; } = new CmdHelper();

public string FileName { get; set; }
public string FileName { get; set; } = string.Empty;

public string HostName { get; set; }
public string HostName { get; set; } = string.Empty;

public string MacAddress { get; set; }
public string MacAddress { get; set; } = string.Empty;

public int Port { get; set; }
public int Port { get; set; } = 9;

public string Protocol { get; set; }

public string SubnetMask { get; set; }
public string SubnetMask { get; set; } = "255.255.255.255";

public int TotalRecords { get; set; }

Expand All @@ -46,10 +33,10 @@ public void PrepareArgument()
{
List<string> argumentList = new List<string>();

argumentList.Add(string.Format("\"{0}\"", this.MacAddress));
argumentList.Add(string.Format("\"{0}\"", this.HostName));
argumentList.Add(string.Format("\"{0}\"", this.SubnetMask));
argumentList.Add(string.Format("\"{0}\"", this.Port));
argumentList.Add($"\"{MacAddress}\"");
argumentList.Add($"\"{HostName}\"");
argumentList.Add($"\"{SubnetMask}\"");
argumentList.Add($"\"{Port}\"");

this.Arguments = string.Join(" ", argumentList.ToArray());
}
Expand Down
1 change: 0 additions & 1 deletion WebSite/Service/WebToolService/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
Loading

0 comments on commit 495fdac

Please sign in to comment.