Exemplo n.º 1
0
        public void DefaultSerializer_ShouldSerializeAndDeserializeData()
        {
            var ev         = new TyreChangedEvent(Guid.NewGuid(), 0, new Tyre(), TyrePlacement.LeftFront);
            var serializer = new DefaultEventSerializer();
            var data       = serializer.Serialize(ev);
            var @event     = serializer.Deserialize <TyreChangedEvent>(data);

            Assert.Equal(TyrePlacement.LeftFront, @event.Placement);
        }
Exemplo n.º 2
0
        public App()
        {
            InitializeComponent();

            var eventSerializer = new DefaultEventSerializer();

            ServiceLocator.Instance.Register(new RemoteRelayConfiguration()
            {
                EventSerializer = eventSerializer,
                Handler         = new RelayHubCallbackHandler(eventSerializer),
            });
            ServiceLocator.Instance.Register <IViewModelFactory <ContentItemViewModel, ContentItem> >(new CustomContentItemViewModelFactoryFactory());

#if !DEBUG
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen;
#endif
        }