jgauffin / Griffin.WebServer

A web server built on top of Griffin.Framework
107 stars 42 forks source link

Add a default file to DiskFileService #30

Closed cjmurph closed 8 years ago

cjmurph commented 8 years ago

Added a default file to be served from the file service if none is specified by the client (e.g. index.html)

jgauffin commented 8 years ago

Thank you for your pull request!

Some small issues:

cjmurph commented 8 years ago

Hi, no worries, I'll make the changes. It's worth noting however that private methods should be camelCase not PascalCase, though if that's what you've chosen to do in your project I'll adopt it. I didn't notice sorry.

jgauffin commented 8 years ago

No, private methods should not be camelCase. Look at the .NET Design Guidelines: https://msdn.microsoft.com/en-us/library/ms229012(v=vs.110).aspx

jgauffin commented 8 years ago

You forgot this one:

  if (fullPath == _basePath)
           fullPath = getDefaultFile();

Don't think that the code compiles as is?

cjmurph commented 8 years ago

Indeed! Sorry, I was sitting at the airport and my flight got called. I shouldn't have synced up until I built.

You win on the guidelines. Funny, every project I've been involved in with c sharp has adopted the camelCase private method standard, They all went by a document I'm struggling to find now. You live and learn. I have a lot of re-factoring to do today!