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
| <Application x:Class="HelloWorld.App" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="clr-namespace:HelloWorld"> | |
| <Application.Resources> | |
| <ResourceDictionary> | |
| <ResourceDictionary.MergedDictionaries> | |
| <ResourceDictionary> | |
| <local:HelloWorldBootStrapper x:Key="bootstrapper" /> | |
| </ResourceDictionary> |
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.ComponentModel.Composition; | |
| using System.ComponentModel.Composition.Hosting; | |
| using Autofac; | |
| using Autofac.Builder; | |
| namespace BootstrapTest | |
| { | |
| public sealed class Bootstrap | |
| { | |
| #region Static Fields |
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 partial class Window1 : Window | |
| { | |
| public Window1() | |
| { | |
| InitializeComponent(); | |
| } | |
| private void Window_MouseDown(object sender, MouseButtonEventArgs e) | |
| { | |
| if (e.ChangedButton == MouseButton.Left) | |
| DragMove(); |
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 Microsoft.Practices.Unity; | |
| using System.Collections.Generic; | |
| namespace Hazware.Commons.Unity | |
| { | |
| public class TypeTrackingExtension : UnityContainerExtension | |
| { | |
| #region Fields | |
| private readonly Dictionary<Type, HashSet<string>> _registeredTypes = new Dictionary<Type, HashSet<string>>(); |
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 Autofac; | |
| using Autofac.Core; | |
| using ReactiveUI; | |
| using Splat; | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace ReactiveUI |
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.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Runtime.InteropServices; | |
| namespace Utility | |
| { | |
| public class Loader |
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.Linq; | |
| using System.Windows; | |
| using Microsoft.VisualBasic.ApplicationServices; | |
| using StartupEventArgs = Microsoft.VisualBasic.ApplicationServices.StartupEventArgs; | |
| namespace Utility | |
| { | |
| public class SingleInstanceManager : WindowsFormsApplicationBase | |
| { |
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 ObjectExtensions | |
| { | |
| /// <summary> | |
| /// Returns the result of <paramref name="func"/> if <paramref name="obj"/> is not null. | |
| /// <example> | |
| /// <code> | |
| /// Request.Url.Evaluate(x => x.Query) | |
| /// </code> | |
| /// </example> | |
| /// </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 static class EventAggregatorExtensions | |
| { | |
| public static void Subscribe(this IEventAggregator eventAggregator, params IHandle[] handlers) | |
| { | |
| Subscribe(eventAggregator, (IEnumerable<IHandle>)handlers); | |
| } | |
| public static void Subscribe(this IEventAggregator eventAggregator, IEnumerable<IHandle> handlers) | |
| { | |
| foreach(var handler in handlers) |
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
| /// <summary> | |
| /// Extension to the ILog interface to allow for richer Error messages. | |
| /// Based on a discussion in the Caliburn.Micro discussion forum on Codeplex. | |
| /// See <see cref="http://caliburnmicro.codeplex.com/discussions/261656"/>. | |
| /// </summary> | |
| public interface ILogExtended : ILog | |
| { | |
| /// <summary> | |
| /// Logs the message as error. | |
| /// </summary> |