This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:753:in `read': Invalid argument - <internal:lib/rubygems/custom_require> (Errno::EINVAL) | |
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:753:in `inline_templates=' | |
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:706:in `set' | |
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:715:in `block in enable' | |
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:715:in `each' | |
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:715:in `enable' | |
from (__DELEGATE__):2:in `enable' | |
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra.rb:7:in `<top (required)>' | |
from <internal:lib/rubygems/custom_require>:33:in `require' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<% (1..25).each do |i| | |
num = "%03d" % i | |
%> | |
<li><a href='/gallery/<%= num %>.jpg'><img src="/gallery/<%= num %>small.jpg" alt="" /></a></li> | |
<% end %> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string CombinePath(string path1, string path2, params string[] additionalPaths) | |
{ | |
return additionalPaths.Aggregate(Path.Combine(path1, path2), Path.Combine); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DisposableCollection : ReadOnlyCollection<IDisposable>, IDisposable | |
{ | |
public DisposableCollection(params IDisposable[] list) : base(list) | |
{ | |
} | |
protected virtual void Dispose(bool disposing) | |
{ | |
if (disposing) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestFixture] | |
#if SILVERLIGHT | |
[Ignore("Not supported in Silverlight 4")] | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object IMappingEngineRunner.CreateObject(ResolutionContext context) | |
{ | |
var typeMap = context.TypeMap; | |
var destinationType = context.DestinationType; | |
if (typeMap != null) | |
if (typeMap.DestinationCtor != null) | |
return typeMap.DestinationCtor(context.SourceValue); | |
else if (typeMap.ConstructDestinationUsingServiceLocator && context.Options.ServiceCtor != null) | |
return context.Options.ServiceCtor(destinationType); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web.Mvc; | |
using Raven.Client; | |
using TekPub.Profiler.BackOffice.Tasks; | |
namespace TekPub.Profiler.BackOffice.Controllers | |
{ | |
public class RavenController : Controller | |
{ | |
protected IDocumentSession documentSession; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RavenDbMessageModule : IMessageModule | |
{ | |
private readonly IDocumentStore documentStore; | |
[ThreadStatic] | |
private static IDocumentSession currentSession; | |
public static IDocumentSession CurrentSession | |
{ | |
get { return currentSession; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SimpleUnitOfWorkBehaviour : IActionBehavior | |
{ | |
readonly IFubuRequest _fubuRequest; | |
readonly ISessionFactory _sessionFactory; | |
ISession _session; | |
public IActionBehavior InnerBehavior { get; set; } | |
public SimpleUnitOfWorkBehaviour(ISessionFactory sessionFactory, | |
IFubuRequest fubuRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Invoke() | |
{ | |
_fubuRequest.Set(new Lazy<ISession>(() => | |
_session ?? (_session = CreateTransactionalSession()))); |
OlderNewer