This file contains 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 Morcatko.AspNetCore.JsonMergePatch.Builder; | |
using Newtonsoft.Json; | |
using Xunit; | |
namespace UnitTests | |
{ | |
class ClassOne | |
{ | |
[JsonProperty("id")] | |
public int Id { get; set; } = 1; |
This file contains 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
%%didn't put in all the words, but you get the gist | |
Words = "tools, Automation, Expertise, guidance, solutions, driven, quality, Collaborative, innovation, Passion, Expertise, innovation,collaborative, quality, Guidance, R&D, Scalable solutions, quality". | |
LoweredWords = [X || X<-[string:to_lower(Y)|| Y <- [Z|| Z <- string:tokens(Words,", \n")]]]. | |
lists:reverse(lists:keysort(2,lists:usort([{A, length(lists:filter(fun(B)->B=:=A end,LoweredWords))}||A<-LoweredWords]))). | |
==outputs | |
[{"quality",3}, | |
{"solutions",2}, | |
{"innovation",2}, |
This file contains 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
<UserControl x:Class="SimpleConductorOneActive.Views.RandomScreenView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
mc:Ignorable="d" | |
d:DesignHeight="300" d:DesignWidth="300"> | |
<Grid Background="AliceBlue"> | |
<StackPanel Orientation="Vertical"> | |
<Button Content="Close" HorizontalAlignment="Right" Margin="5" x:Name="CloseScreen" /> |
This file contains 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
<Window x:Class="SimpleConductorOneActive.Views.ShellView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="550" Background="CornflowerBlue"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> |
This file contains 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 ShellViewModel : Conductor<Screen>.Collection.OneActive | |
{ | |
public void NewScreen() | |
{ | |
ActivateItem(new RandomScreenViewModel()); | |
} | |
} |
This file contains 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 ShellViewModel : Conductor<Screen>.Collection.OneActive | |
{ | |
public int ScreenCount | |
{ | |
get { return this.Items.Count; } | |
} | |
public ShellViewModel() | |
{ |
This file contains 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 RandomScreenViewModel:Screen | |
{ | |
public RandomScreenViewModel() | |
{ | |
Guid id = Guid.NewGuid(); | |
DisplayName = id.ToString(); | |
} | |
private int onInitializeCalls = 0; |
This file contains 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
itemsControl.ItemTemplate = DefaultDataTemplate; |
This file contains 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
#if !SILVERLIGHT && !WP7 | |
if (itemsControl.ItemTemplateSelector == null) | |
{ | |
itemsControl.ItemTemplate = DefaultDataTemplate; | |
} | |
#else | |
itemsControl.ItemTemplate = DefaultDataTemplate; | |
#endif |