This file contains hidden or 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
if (!this.stream.CanSeek) | |
{ | |
var tcs = new TaskCompletionSource<Stream>(); | |
var buffer = | |
new MemoryStream((int)this.stream.Length); | |
this.stream.CopyTo(buffer, (source, destination, ex) => | |
{ | |
if (ex != null) | |
{ |
This file contains hidden or 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 interface IJudgeDredd | |
{ | |
void IAmTheLaw(); | |
} | |
public interface IRoboCop : IJudgeDredd | |
{ | |
void ServeThePublicTrust(); | |
This file contains hidden or 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 DefaultViewCache : IViewCache | |
{ | |
private readonly ConcurrentDictionary<ViewLocationResult, object> cache; | |
public DefaultViewCache() | |
{ | |
this.cache = new ConcurrentDictionary<ViewLocationResult, object>(); | |
} | |
public TCompiledView GetOrAdd<TCompiledView>(string viewLocationResult, Func<string, TCompiledView> valueFactory) |