Permalink
Browse files

Fix StyleCop rules

  • Loading branch information...
Chakrit Wichian
Chakrit Wichian committed Jul 20, 2010
1 parent 4a2dde1 commit 153184b233a43cbe9375b8bfffa9da26b9dd2f8e
View
@@ -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}"
@@ -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(),
@@ -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>
{
@@ -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();
@@ -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") },
@@ -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());
@@ -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()));
@@ -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[] {
@@ -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);
}
@@ -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());
View
@@ -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)

0 comments on commit 153184b

Please sign in to comment.