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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading; | |
| namespace ConsoleApplication4 { | |
| public class Input { | |
| public string DataYouGotFromSomeDataSource { 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 Order : Aggregate { | |
| public Order Place(Customer customer, ...) { | |
| customer.GuardPlaceOrder(); | |
| //... | |
| } | |
| } | |
| public class Customer Aggregate { | |
| private bool _hasMoreThanFiveOutstandingInvoices; |
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
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://current.bootstrapcdn.com/bootstrap-v204/css/bootstrap-combined.min.css"></link> | |
| <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-2.1.0.js"></script> | |
| <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.js"></script> | |
| <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.21/jquery-ui.js"></script> | |
| <script type="text/javascript" src="http://current.bootstrapcdn.com/bootstrap-v204/js/bootstrap.min.js"></script> | |
| <script type="text/javascript"> | |
| var PageViewModel = function() { | |
| if (!this instanceof PageViewModel) { |
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 TextInput = function (validationOptions) { | |
| if (!this instanceof TextInput) { | |
| return new TextInput(validationOptions); | |
| } | |
| validationOptions = validationOptions || { | |
| rules: {}, | |
| messages: {} | |
| }; |
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 Trigger = function () { | |
| if (!this instanceof Trigger) { | |
| return new Trigger(); | |
| } | |
| var self = PausableSubscriberExtension( | |
| DisposableExtension( | |
| FocusExtension( | |
| EnableExtension( | |
| VisibleExtension( |
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 ThingInputViewModel=function() { | |
| if(!this instanceof ThingInputViewModel) { | |
| return new ThingInputViewModel(); | |
| } | |
| var states={ none: 0, adding: 1,modifying: 2 }; | |
| var self=this, | |
| statemachine=new SimpleStatemachine({ initialState: states.none }), | |
| baseData, |
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 ThingInputViewModel=function() { | |
| if(!this instanceof ThingInputViewModel) { | |
| return new ThingInputViewModel(); | |
| } | |
| var self=this; | |
| self.Name=new TextInput({ | |
| rules: { | |
| required: true, |
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 PageViewModel = function() { | |
| if(!this instanceof PageViewModel) { | |
| return new PageViewModel(); | |
| } | |
| var self=this; | |
| self.Navigation=new NavigationViewModel(); | |
| self.List=new ListViewModel(); | |
| self.Detail= new ThingDetailViewModel(); |
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 ThingDetailViewModel = function() { | |
| if (!this instanceof ThingDetailViewModel) { | |
| return new ThingDetailViewModel(); | |
| } | |
| var self = this, | |
| states = { none: 0, adding: 1, modifying: 2}, | |
| statemachine = new SimpleStatemachine(states.none), | |
| baseData = null, | |
| buildCommand; |
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
| <div class="setup-table"> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th colspan="2">Name</th> | |
| </tr> | |
| </thead> | |
| <tbody data-bind="foreach: List.Items"> | |
| <tr data-bind="css : { selected : IsSelected }"> | |
| <td data-bind="click: Select.Command, text: Name.Value"> |
OlderNewer