Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jun 7, 2011
1 parent 6febac9 commit 25f3377
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Binary file not shown.
Expand Up @@ -56,6 +56,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="ClientBin\StocksApplicationSL.xap" /> <Content Include="ClientBin\StocksApplicationSL.xap" />
<Content Include="htmlclient\jquery-1.6.1.min.js" />
<Content Include="htmlclient\json2.min.js" />
<Content Include="htmlclient\scripts.js" />
<Content Include="htmlclient\Stocks.html" />
<Content Include="Silverlight.js" /> <Content Include="Silverlight.js" />
<Content Include="StocksApplicationSLTestPage.aspx" /> <Content Include="StocksApplicationSLTestPage.aspx" />
<Content Include="StocksApplicationSLTestPage.html" /> <Content Include="StocksApplicationSLTestPage.html" />
Expand Down
6 changes: 2 additions & 4 deletions StocksApplication/StocksApplication.Web/StocksService.svc.cs
Expand Up @@ -24,15 +24,13 @@ public IEnumerable<Stocks.StockQuote> FetchStockData(string quote, string from,
Contract.Assert(todate <= DateTime.Now, "Future not allowed yet..."); Contract.Assert(todate <= DateTime.Now, "Future not allowed yet...");


var uri = Stocks.MakeUrl(quote, fromdate, todate); var uri = Stocks.MakeUrl(quote, fromdate, todate);
var result = Enumerable.Empty<Stocks.StockQuote>();


try { try {
result = Stocks.GetResult(uri); return Stocks.GetResult(uri);
}catch(System.Net.WebException){ }catch(System.Net.WebException){
//throw; //throw;
result = Enumerable.Repeat(new Stocks.StockQuote(todate, -1.0), 1); return Enumerable.Repeat(new Stocks.StockQuote(todate, -1.0), 1);
} }
return result;
} }
// example: http://localhost:49624/StocksService.svc/Symbol/MSFT/20100905/20100910 // example: http://localhost:49624/StocksService.svc/Symbol/MSFT/20100905/20100910
} }
Expand Down
4 changes: 2 additions & 2 deletions StocksApplication/StocksApplication.Web/htmlclient/scripts.js
@@ -1,4 +1,4 @@
window.onload = function() $(document).ready(function()
{ {
//Debug: //Debug:
function concatObject(obj) { function concatObject(obj) {
Expand Down Expand Up @@ -63,6 +63,6 @@ window.onload = function()
error: function(res){alert("Communication error...");} error: function(res){alert("Communication error...");}
}); });
}); });
} });




0 comments on commit 25f3377

Please sign in to comment.