Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
leotse1983 committed Jul 9, 2011
0 parents commit 53df3c9
Show file tree
Hide file tree
Showing 119 changed files with 96,909 additions and 0 deletions.
Binary file added All.suo
Binary file not shown.
Binary file added Assemblies/HtmlAgilityPack.dll
Binary file not shown.
Binary file added Assemblies/Microsoft.Web.Infrastructure.dll
Binary file not shown.
Binary file added Assemblies/System.Web.Razor.dll
Binary file not shown.
Binary file added Assemblies/System.Web.WebPages.Deployment.dll
Binary file not shown.
Binary file added Assemblies/System.Web.WebPages.Razor.dll
Binary file not shown.
20 changes: 20 additions & 0 deletions DMGasPrice.Service/Controllers/HomeController.cs
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DMGasPrice.Service.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/

public ActionResult Index()
{
return View();
}

}
}
48 changes: 48 additions & 0 deletions DMGasPrice.Service/Controllers/PricesController.cs
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DMGasPrice.Service.Models;
using DMGasPrice.Service.Helpers;

namespace DMGasPrice.Service.Controllers
{
public class PricesController : Controller
{
public JsonResult Index()
{
List<GasPrice> prices = new List<GasPrice>();
foreach (int key in GasPriceCache.Instance.Keys)
{
prices.Add(GasPriceCache.Instance[key]);
}
return Json(GasPriceCache.Instance.ToList(), JsonRequestBehavior.AllowGet);
}

public JsonResult Details(int key)
{
if (GasPriceCache.Instance.ContainsKey(key))
{
return Json(GasPriceCache.Instance[key], JsonRequestBehavior.AllowGet);
}
return Json(null, JsonRequestBehavior.AllowGet);
}

public JsonResult DetailsOld(int key, string cityName)
{
if (GasPriceCache.Instance.ContainsKey(key))
{
GasPrice price = GasPriceCache.Instance[key];
return Json(new GasPrice()
{
CityName = cityName,
Price = price.Price,
PriceChange = price.PriceChange,
For = price.For
}, JsonRequestBehavior.AllowGet);
}
return Json(null, JsonRequestBehavior.AllowGet);
}
}
}
27 changes: 27 additions & 0 deletions DMGasPrice.Service/DMGasPrice.Service.Publish.xml
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<publishData>
<publishProfile publishUrl="C:\publish\DMGasPrice" deleteExistingFiles="False" ftpAnonymousLogin="False" ftpPassiveMode="True" msdeploySite="" msdeploySiteID="" msdeployRemoteSitePhysicalPath="" msdeployAllowUntrustedCertificate="False" msdeploySkipExtraFilesOnServer="True" msdeployMarkAsApp="False" profileName="Profile1" publishMethod="FileSystem" replaceMatchingFiles="True" userName="" savePWD="False" userPWD="" SelectedForPublish="True">
<file relUrl="Web.config" publishTime="07/06/2011 17:47:12" />
<file relUrl="bin/System.Web.WebPages.dll" publishTime="01/05/2011 15:45:38" />
<file relUrl="bin/EntityFramework.dll" publishTime="07/04/2011 21:37:49" />
<file relUrl="Views/Shared/_Layout.cshtml" publishTime="07/04/2011 21:37:42" />
<file relUrl="bin/Microsoft.Web.Infrastructure.dll" publishTime="01/05/2011 15:45:38" />
<file relUrl="bin/System.Web.WebPages.Deployment.dll" publishTime="01/05/2011 15:45:38" />
<file relUrl="bin/System.Web.Helpers.xml" publishTime="12/19/2010 23:59:38" />
<file relUrl="bin/System.Web.WebPages.xml" publishTime="12/19/2010 23:59:38" />
<file relUrl="bin/HtmlAgilityPack.dll" publishTime="10/03/2009 14:05:38" />
<file relUrl="bin/DMGasPrice.Service.dll" publishTime="07/06/2011 17:47:06" />
<file relUrl="bin/EntityFramework.xml" publishTime="07/04/2011 21:37:49" />
<file relUrl="Views/Home/Index.cshtml" publishTime="07/04/2011 21:56:02" />
<file relUrl="bin/System.Web.Helpers.dll" publishTime="01/05/2011 15:45:38" />
<file relUrl="Views/Web.config" publishTime="07/04/2011 21:37:42" />
<file relUrl="Views/Shared/Error.cshtml" publishTime="07/04/2011 21:37:42" />
<file relUrl="Views/_ViewStart.cshtml" publishTime="07/04/2011 21:37:42" />
<file relUrl="bin/DMGasPrice.Service.pdb" publishTime="07/06/2011 17:47:06" />
<file relUrl="Global.asax" publishTime="07/04/2011 21:37:42" />
<file relUrl="bin/System.Web.WebPages.Razor.dll" publishTime="02/25/2011 10:00:59" />
<file relUrl="bin/System.Web.Mvc.dll" publishTime="01/05/2011 17:42:16" />
<file relUrl="bin/System.Web.Razor.dll" publishTime="01/05/2011 15:45:38" />
<file relUrl="bin/System.Web.Mvc.xml" publishTime="02/09/2011 13:26:24" />
</publishProfile>
</publishData>
151 changes: 151 additions & 0 deletions DMGasPrice.Service/DMGasPrice.Service.csproj
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AF06631C-52C3-40DA-8959-D230E862F3A1}</ProjectGuid>
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DMGasPrice.Service</RootNamespace>
<AssemblyName>DMGasPrice.Service</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack">
<HintPath>..\Assemblies\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\Assemblies\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Data.Entity" />
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\Assemblies\System.Web.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.WebPages.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\Assemblies\System.Web.WebPages.Deployment.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\Assemblies\System.Web.WebPages.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\PricesController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Helpers\GasPriceCache.cs" />
<Compile Include="Helpers\TimerProcess.cs" />
<Compile Include="Helpers\Utils.cs" />
<Compile Include="Models\GasPrice.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Global.asax" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Views\Web.config" />
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Home\Index.cshtml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.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> -->
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>1252</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>
</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
31 changes: 31 additions & 0 deletions DMGasPrice.Service/DMGasPrice.Service.csproj.user
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>SpecificPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
1 change: 1 addition & 0 deletions DMGasPrice.Service/Global.asax
@@ -0,0 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="DMGasPrice.Service.MvcApplication" Language="C#" %>

0 comments on commit 53df3c9

Please sign in to comment.