Skip to content

Commit

Permalink
Fix StyleCop rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Chakrit Wichian committed Jul 20, 2010
1 parent 4a2dde1 commit 153184b
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 22 deletions.
1 change: 1 addition & 0 deletions FuSharp.sln
Expand Up @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{7F3B5420-4
ci.build.xml = ci.build.xml
FuAssemblyInfo.cs = FuAssemblyInfo.cs
README.markdown = README.markdown
Settings.StyleCop = Settings.StyleCop
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fu", "src\Fu\Fu.csproj", "{1583A6C9-45DA-46B4-9DBD-B86461DB893B}"
Expand Down
6 changes: 4 additions & 2 deletions samples/FileServer/Program.cs
Expand Up @@ -9,9 +9,11 @@

namespace FileServer
{
class Program
public class Program
{
static void Main(string[] args)
internal static void Main() { (new Program()).Run(); }

public void Run()
{
var pipeline = fu.If(isFolder,
listFiles(),
Expand Down
7 changes: 4 additions & 3 deletions samples/FormData/Program.cs
@@ -1,15 +1,16 @@

using System.Collections.Generic;

using Fu;
using Fu.Presets;
using Fu.Services.Web;
using Fu.Steps;
using System.Collections.Generic;

namespace FormData
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main(string[] args)
{
var app = new SimpleApp(fu.Map.Urls(new Dictionary<string, Continuation>
{
Expand Down
4 changes: 2 additions & 2 deletions samples/HelloWorld/Program.cs
Expand Up @@ -5,9 +5,9 @@

namespace HelloWorld
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main(string[] args)
{
var app = new SimpleApp(fu.Static.Text("Hello World!!"));
app.Start();
Expand Down
4 changes: 2 additions & 2 deletions samples/ModelBinder/Program.cs
Expand Up @@ -7,9 +7,9 @@

namespace ModelBinder
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main(string[] args)
{
var app = new SimpleApp(fu.Map.Urls(new ContMap() {
{ "^/$", fu.Static.File("index.html") },
Expand Down
4 changes: 2 additions & 2 deletions samples/RestStyle/Program.cs
Expand Up @@ -5,9 +5,9 @@

namespace RestStyle
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main(string[] args)
{
var step = fu.Map.Controller(new NotesController());

Expand Down
6 changes: 4 additions & 2 deletions samples/StronglyTypedSession/Program.cs
Expand Up @@ -7,9 +7,11 @@

namespace StronglyTypedSession
{
class Program
public class Program
{
static void Main(string[] args)
internal static void Main() { (new Program()).Run(); }

public void Run()
{
var app = new SimpleApp(fu.Map.Controller(new MyController()));

Expand Down
14 changes: 8 additions & 6 deletions samples/UploadFile/Program.cs
Expand Up @@ -9,9 +9,12 @@

namespace UploadFile
{
class Program
public class Program
{
private static void Main(string[] args)
internal static void Main() { (new Program()).Run(); }


public void Run()
{
var services = new[] { new MultipartFormDataParser() };
var steps = new[] {
Expand Down Expand Up @@ -43,10 +46,9 @@ private static Continuation makeSepia()
for (var j = 0; j < bmp.Height; j++) {
var pixel = bmp.GetPixel(i, j);
pixel = Color.FromArgb(
(int)Math.Min(255, pixel.R * .393 + pixel.G * .769 + pixel.B * .189),
(int)Math.Min(255, pixel.R * .349 + pixel.G * .686 + pixel.B * .168),
(int)Math.Min(255, pixel.R * .272 + pixel.G * .534 + pixel.B * .131)
);
(int)Math.Min(255, (pixel.R * .393) + (pixel.G * .769) + (pixel.B * .189)),
(int)Math.Min(255, (pixel.R * .349) + (pixel.G * .686) + (pixel.B * .168)),
(int)Math.Min(255, (pixel.R * .272) + (pixel.G * .534) + (pixel.B * .131)));
bmp.SetPixel(i, j, pixel);
}
Expand Down
4 changes: 2 additions & 2 deletions samples/WildcardSubdomains/Program.cs
Expand Up @@ -5,9 +5,9 @@

namespace WildcardSubdomains
{
class Program
public class Program
{
static void Main(string[] args)
public static void Main(string[] args)
{
var app = new App(null, null, echoSubDomain());

Expand Down
2 changes: 1 addition & 1 deletion src/Fu/Steps/Cache.cs
Expand Up @@ -9,7 +9,7 @@ namespace Fu.Steps
// TODO: Still needs tests in the wild to make sure these work properly
public static class Cache
{
protected const long OneSecond = 10000 * 1000 /* 10,000 ticks = 1 ms */;
private const long OneSecond = 10000 * 1000 /* 10,000 ticks = 1 ms */;


public static Continuation Expires(this ICacheSteps _, TimeSpan time)
Expand Down

0 comments on commit 153184b

Please sign in to comment.