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
| private void Initialize() | |
| { | |
| container = new Container(); | |
| container.Register<IEventAggregator>(new EventAggregator()); | |
| container.Register<IDatabase>(new Database()); | |
| container.Register<MainViewModel>(c => new MainViewModel( | |
| c.Resolve<IEventAggregator>(), | |
| c.Resolve<IDatabase>())); |
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
| private void Initialize() | |
| { | |
| // Create the IoC container. | |
| container = new Container(); | |
| // Initialize the ViewModelFactory with the Funq ViewModelResolver. | |
| ViewModelFactory.InitializeResolver(new FunqViewModelResolver(container)); | |
| // Register the dependency composition. | |
| container.Register<IEventAggregator>(new EventAggregator()); |
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
| <phone:PhoneApplicationPage | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:vm="clr-namespace:kellafeed.ViewModels"> | |
| <phone:PhoneApplicationPage.Resources> | |
| <vm:MainViewModelFactory x:Key="MainViewModelFactgoryDataSource" | |
| d:IsDataSource="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
| # | |
| # Commands executed in Cassandra | |
| # | |
| /* | |
| connect 127.0.0.1/9160; | |
| create keyspace twitter; | |
| use twitter; | |
| # Create a column family to contain the rowcount of how many tweets I have. | |
| CREATE COLUMN FAMILY rowcounts |
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.Globalization; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace TweetStreamTest | |
| { | |
| public class FastLoopTest | |
| { |
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
| /* BUG SUMMARY | |
| * | |
| * Initializing 2 endpoints at the same time and immediately | |
| * publishing a message doesn't always arrive to the subscriber. | |
| * | |
| * In this sample the expected output is: | |
| * | |
| * Initializing CommandHandler... | |
| * Done | |
| * Initializing Client... |
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 FluentCassandra; | |
| using FluentCassandra.Types; | |
| namespace CassandraGettingStartedSample | |
| { | |
| class FluentCassandraSample | |
| { | |
| public static void GetPosts() | |
| { |
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 Cassandraemon; | |
| namespace CassandraGettingStartedSample | |
| { | |
| public class Post | |
| { | |
| public string user { 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <configSections> | |
| <section name="hibernate-configuration" | |
| type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /> | |
| </configSections> | |
| <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> | |
| <session-factory> | |
| <!-- <property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</property>--> |
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
| // CQS (Command-Query Separation) | |
| // Bertrand Meyer devised the CQS principle | |
| // It states that every method should either be a command that performs an action, or a | |
| // query that returns data to the caller, but not both. In other words, asking a question | |
| // should not change the answer. More formally, methods should return a value only if they | |
| // are referentially transparent and hence possess no side effects. | |
| // | |
| // Example: | |
| public class CustomerService |