Browse files

Would help if I added that class

  • Loading branch information...
1 parent e76bf55 commit e689f678278031b481a0c886b91e6c055aa72834 @jchannon jchannon committed Dec 20, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 src/Nancy.ViewEngines.Razor/TextResourceFinder.cs
View
26 src/Nancy.ViewEngines.Razor/TextResourceFinder.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Dynamic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+
+namespace Nancy.ViewEngines.Razor
+{
+ public class TextResourceFinder: DynamicObject
+ {
+ private readonly ITextResource textResource;
+
+ public TextResourceFinder(ITextResource textResource)
+ {
+ this.textResource = textResource;
+ }
+
+ public override bool TryGetMember(GetMemberBinder binder, out object result)
+ {
+ result = this.textResource[binder.Name];
+ return true;
+ }
+ }
+}

0 comments on commit e689f67

Please sign in to comment.