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 DownloadDataModel | |
{ | |
public string Data { get; set; } | |
public string Filename { get; set; } | |
public string MimeType { get; set; } | |
} | |
public class DownloadDataBehavior : BasicBehavior | |
{ | |
private readonly IFubuRequest _request; |
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
define [..., 'mustache', 'text!dashboard-template.html'], (..., Mustache, dashboardTemplate) -> | |
class Router extends Backbone.Router | |
... | |
routes: | |
'': 'dashboard' | |
'about': 'about' | |
dashboard: -> | |
$.get 'dashboard', (data) => @render(Mustache.render(dashboardTemplate, data)) | |
... |
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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using NUnit.Framework; | |
namespace StringReplace | |
{ | |
public static class Program |
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
using Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation; | |
using Microsoft.Practices.EnterpriseLibrary.Logging; | |
using Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation; | |
using System.Diagnostics; | |
using System.Management.Instrumentation; | |
namespace Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners | |
{ | |
/// <summary> |
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 Person | |
{ | |
public string Name { get; set; } | |
public string Address { get; set; } | |
} | |
public class InputModel | |
{ | |
public string GroupId { get; set; } | |
public Person Person { get; set; } |
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 Mustache | |
{ | |
public const string MasterTemplate = @" | |
<html> | |
<body> | |
<h1>TMNT</h1> | |
<div>{{{Content}}} | |
</div> | |
</body> | |
</html>"; |
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
[TestFixture] | |
public class Spark | |
{ | |
public const string MasterTemplate = @" | |
<html> | |
<body> | |
<h1>TMNT</h1> | |
<div>{{{Content}}} | |
</div> | |
</body> |
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 ExpandoJsonWriter : IJsonWriter | |
{ | |
private readonly IOutputWriter _outputWriter; | |
private readonly JavaScriptSerializer _jsonSerializer; | |
public ExpandoJsonWriter(IOutputWriter outputWriter) | |
{ | |
_outputWriter = outputWriter; | |
_jsonSerializer = new JavaScriptSerializer(); | |
} |
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 MemorySmtpServer | |
{ | |
private readonly bool _redirectSmtpConfiguration; | |
private const int Port = 62352; | |
private readonly Configuration _configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); | |
private MailSettingsSectionGroup _mailSettings; | |
private string _originalHost; | |
private int _originalPort; | |
private SmtpServer _server; |