Skip to content

Commit

Permalink
Core Namespace Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pgodwin committed Jun 24, 2017
1 parent 0b9fcb3 commit 6b7d566
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions GopherServer.Core/Helpers/HtmlExtensions.cs
Expand Up @@ -7,6 +7,7 @@
using System.Net;
using System.Text;
using System.Threading.Tasks;
using GopherServer.Core.Models;

namespace GopherServer.Core.Helpers
{
Expand Down
3 changes: 2 additions & 1 deletion GopherServer.Core/Helpers/StringExtensions.cs
@@ -1,4 +1,5 @@
using GopherServer.Core.Results;
using GopherServer.Core.Models;
using GopherServer.Core.Results;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
5 changes: 3 additions & 2 deletions GopherServer.Core/Models/DirectoryItem.cs
@@ -1,10 +1,11 @@
using System;
using GopherServer.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GopherServer.Core.Results
namespace GopherServer.Core.Models
{
public class DirectoryItem
{
Expand Down
2 changes: 1 addition & 1 deletion GopherServer.Core/Models/ExternalUrlItem.cs
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using System.Threading.Tasks;

namespace GopherServer.Core.Results
namespace GopherServer.Core.Models
{
public class ExternalUrlItem : DirectoryItem
{
Expand Down
6 changes: 3 additions & 3 deletions GopherServer.Core/Models/ItemType.cs
@@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace GopherServer.Core.Results
namespace GopherServer.Core.Models
{
public class ItemType
{
Expand Down Expand Up @@ -56,8 +57,7 @@ private static void BuildDictionary()
{
_typeDictionary = new Dictionary<char, ItemType>();
var type = typeof(ItemType);
var fields = type.GetFields(System.Reflection.BindingFlags.Static)
.Where(t => t.FieldType == typeof(ItemType));
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static).Where(f=>f.FieldType == typeof(ItemType));

foreach (var p in fields)
{
Expand Down
3 changes: 2 additions & 1 deletion GopherServer.Core/Results/BaseResult.cs
@@ -1,4 +1,5 @@
using System;
using GopherServer.Core.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down
3 changes: 2 additions & 1 deletion GopherServer.Core/Results/ByteResult.cs
@@ -1,4 +1,5 @@
using System;
using GopherServer.Core.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down
4 changes: 3 additions & 1 deletion GopherServer.Core/Results/DirectoryResult.cs
@@ -1,4 +1,5 @@
using System;
using GopherServer.Core.Models;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -36,6 +37,7 @@ public override void WriteResult(Stream stream)
streamWriter.WriteLine(".");
// Server should close connection after this point.
}
itemsString = null;
}


Expand Down
3 changes: 2 additions & 1 deletion GopherServer.Core/Results/ErrorResult.cs
@@ -1,4 +1,5 @@
using System;
using GopherServer.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
2 changes: 1 addition & 1 deletion GopherServer.Core/Results/GifResult.cs
Expand Up @@ -14,7 +14,7 @@ public class GifResult : ByteResult
{
public GifResult(string url)
{
this.ItemType = ItemType.GIF;
this.ItemType = Models.ItemType.GIF;
this.ResultBytes = ImageToGif.ConvertImageToGif(url);
}
}
Expand Down
1 change: 0 additions & 1 deletion GopherServer.Core/Routes/PrebuiltRoutes.cs
@@ -1,5 +1,4 @@
using GopherServer.Core.Results;
using GopherServer.Core.Results;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down

0 comments on commit 6b7d566

Please sign in to comment.