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
<time datetime="0000-00-00"> | |
<Display property="CurrentTime.DayOfWeek" /> | |
<Display property="CurrentTime.TimeOfDay" /> | |
<Display property="CurrentTime.Date" /> | |
</time> |
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 IProjectionConvention<T> | |
{ | |
bool Matches(Accessor accessor); | |
void Modify(Accessor accessor, Projection<T> projection); | |
} |
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 static class AppStartFubuMVC | |
{ | |
public static void Start() | |
{ | |
ObjectFactory.Initialize(x => | |
{ | |
// Custom container configuration | |
}); | |
FubuApplication |
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
Backbone.Model.prototype.dependentProperty = function (name, origin, evaluator) { | |
var update = function () { | |
var value = evaluator.call(this); | |
var hash = {}; | |
hash[name] = value; | |
this.set(hash); | |
}; | |
this.bind('change:' + origin, function () { | |
update.call(this); | |
}); |
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
$.continuations.applyPolicy({ | |
matches: function (continuation) { | |
return $('#' + continuation.correlationId).size() != 0; | |
}, | |
execute: function (continuation) { | |
if (!continuation.errors) { | |
continuation.errors = []; | |
} | |
$.fubuvalidation.process(continuation); | |
} |
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 IActivity | |
{ | |
void Run(); | |
bool Matches(int i); | |
} | |
public class PluginActivator | |
{ | |
private readonly IContainer _container; | |
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
$(document).ready(function() { | |
var preview = $('#mainForm').data('validation-preview'); | |
$(':input', '#mainForm').change(function() { | |
$.ajax({ | |
type: 'POST', | |
data: $('#mainForm').formSerialize(), | |
url: preview, | |
beforeSend: function(xhr) { | |
this.correlationId = 'mainForm'; | |
$.continuations.setupRequest.call(this, xhr); |
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 RequestCorrelation : IConfigurationAction | |
{ | |
public void Configure(BehaviorGraph graph) | |
{ | |
graph | |
.Behaviors | |
.Each(chain => chain.Prepend(new Wrapper(typeof(SetCorrelationHeaders)))); | |
} | |
} |
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
var correlationPolicy = { | |
matches: function (continuation) { | |
return continuation.correlationId != null && continuation.correlationId != ''; | |
}, | |
execute: function (continuation) { | |
if (continuation.errors && continuation.errors.length != 0) { | |
return; | |
} | |
var dialog = $('#' + continuation.correlationId).parents('.dialog'); |
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
{ | |
success: true/false, | |
refresh: true/false | |
message: '', | |
errors: [] | |
} |