Started work on Item Filter Preview module

This commit is contained in:
Ben Wallis 2015-12-19 23:02:32 +00:00
parent 2f2a57e77a
commit 014107c76b
31 changed files with 1222 additions and 24 deletions

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Filtration.ItemFilterPreview.Tests</RootNamespace>
<AssemblyName>Filtration.ItemFilterPreview.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>True</IsCodedUITest>
<TestProjectType>CodedUITest</TestProjectType>
<IsWindowsStoreCodedUITest>True</IsWindowsStoreCodedUITest>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.0.5813.39031, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
<Visible>False</Visible>
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\TestItemBlockItemMatcher.cs" />
<Compile Include="Services\TestItemFilterProcessor.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Filtration.ItemFilterPreview\Filtration.ItemFilterPreview.csproj">
<Project>{3ab98b6e-05db-44fa-9dad-584aa88f0739}</Project>
<Name>Filtration.ItemFilterPreview</Name>
</ProjectReference>
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
<Name>Filtration.ObjectModel</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Filtration.ItemFilterPreview.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Filtration.ItemFilterPreview.Tests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("58cd3b9c-ebba-4527-a81c-78b7ea9ca298")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,127 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Filtration.ItemFilterPreview.Model;
using Filtration.ItemFilterPreview.Services;
using Filtration.ObjectModel.BlockItemTypes;
using Filtration.ObjectModel.Enums;
using Moq;
using NUnit.Framework;
namespace Filtration.ItemFilterPreview.Tests.Services
{
[TestFixture]
public class TestItemBlockItemMatcher
{
private ItemBlockItemMatcherTestUtility _testUtility;
[SetUp]
public void ItemBlockItemMatcherTestSetUp()
{
_testUtility = new ItemBlockItemMatcherTestUtility();
}
[TestCase("Test Base Type", true)]
[TestCase("Test Bas", true)]
[TestCase("T", true)]
[TestCase("Base Type", false)]
public void BaseTypeBlockItemMatch_SingleBlockItemValue_ReturnsTrue(string testInputBaseType, bool expectedResult)
{
//Arrange
var testInputItem = Mock.Of<IItem>(i => i.BaseType == "Test Base Type");
var testInputBaseTypeBlockItem = new BaseTypeBlockItem();
testInputBaseTypeBlockItem.Items.Add(testInputBaseType);
//Act
var result = _testUtility.ItemBlockItemMatcher.BaseTypeBlockItemMatch(testInputBaseTypeBlockItem, testInputItem);
//Assert
Assert.AreEqual(expectedResult, result);
}
[TestCase("Test Base Type", true)]
[TestCase("Test Bas", true)]
[TestCase("T", true)]
[TestCase("Base Type", false)]
public void BaseTypeBlockItemMatch_MultipleBlockItemValues_ReturnsCorrectResult(string testInputBaseType, bool expectedResult)
{
//Arrange
var testInputItem = Mock.Of<IItem>(i => i.BaseType == "Test Base Type");
var testInputBlockItem = new BaseTypeBlockItem();
testInputBlockItem.Items.Add("Something else");
testInputBlockItem.Items.Add(testInputBaseType);
testInputBlockItem.Items.Add("Blah");
//Act
var result = _testUtility.ItemBlockItemMatcher.BaseTypeBlockItemMatch(testInputBlockItem, testInputItem);
//Assert
Assert.AreEqual(expectedResult, result);
}
[TestCase("Test Item Class", true)]
[TestCase("Test It", true)]
[TestCase("T", true)]
[TestCase("Item Class", false)]
public void ItemClassBlockItemMatch_SingleBlockItemValue_ReturnsCorrectResult(string testInputBlockItemItemClass, bool expectedResult)
{
//Arrange
var testInputItem = Mock.Of<IItem>(i => i.ItemClass == "Test Item Class");
var testInputBlockItem = new ClassBlockItem();
testInputBlockItem.Items.Add(testInputBlockItemItemClass);
//Act
var result = _testUtility.ItemBlockItemMatcher.ClassBlockItemMatch(testInputBlockItem, testInputItem);
//Assert
Assert.AreEqual(expectedResult, result);
}
[TestCase(FilterPredicateOperator.Equal, 49, false)]
[TestCase(FilterPredicateOperator.Equal, 50, true)]
[TestCase(FilterPredicateOperator.Equal, 51, false)]
[TestCase(FilterPredicateOperator.GreaterThan, 49, true)]
[TestCase(FilterPredicateOperator.GreaterThan, 50, false)]
[TestCase(FilterPredicateOperator.GreaterThan, 51, false)]
[TestCase(FilterPredicateOperator.GreaterThanOrEqual, 49, true)]
[TestCase(FilterPredicateOperator.GreaterThanOrEqual, 50, true)]
[TestCase(FilterPredicateOperator.GreaterThanOrEqual, 51, false)]
[TestCase(FilterPredicateOperator.LessThan, 49, false)]
[TestCase(FilterPredicateOperator.LessThan, 50, false)]
[TestCase(FilterPredicateOperator.LessThan, 51, true)]
[TestCase(FilterPredicateOperator.LessThanOrEqual, 49, false)]
[TestCase(FilterPredicateOperator.LessThanOrEqual, 50, true)]
[TestCase(FilterPredicateOperator.LessThanOrEqual, 51, true)]
[TestCase(-1, 51, false)]
public void DropLevelBlockItemMatch_ReturnsCorrectResult(FilterPredicateOperator testInputFilterPredicateOperator, int testInputBlockItemDropLevel, bool expectedResult)
{
//Arrange
var testInputItem = Mock.Of<IItem>(i => i.DropLevel == 50);
var testInputBlockItem = new DropLevelBlockItem(testInputFilterPredicateOperator, testInputBlockItemDropLevel);
//Act
var result = _testUtility.ItemBlockItemMatcher.DropLevelBlockItemMatch(testInputBlockItem, testInputItem);
//Assert
Assert.AreEqual(expectedResult, result);
}
private class ItemBlockItemMatcherTestUtility
{
public ItemBlockItemMatcherTestUtility()
{
// Mock setups
// Class under-test instantiation
ItemBlockItemMatcher = new ItemBlockItemMatcher();
}
public ItemBlockItemMatcher ItemBlockItemMatcher { get; private set; }
}
}
}

View File

@ -0,0 +1,10 @@
using NUnit.Framework;
namespace Filtration.ItemFilterPreview.Tests.Services
{
[TestFixture]
public class TestItemFilterProcessor
{
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Moq" version="4.2.1510.2205" targetFramework="net46" />
<package id="NUnit" version="3.0.1" targetFramework="net46" />
</packages>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>

View File

@ -0,0 +1,9 @@
<Application x:Class="Filtration.ItemFilterPreview.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Filtration.ItemFilterPreview"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace Filtration.ItemFilterPreview
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Filtration.ItemFilterPreview</RootNamespace>
<AssemblyName>Filtration.ItemFilterPreview</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Model\Item.cs" />
<Compile Include="Model\ItemCollection.cs" />
<Compile Include="Model\Socket.cs" />
<Compile Include="Model\SocketGroup.cs" />
<Compile Include="Services\ItemBlockItemMatcher.cs" />
<Compile Include="Services\ItemFilterProcessor.cs" />
<Compile Include="UserControls\ItemSocketsControl.xaml.cs">
<DependentUpon>ItemSocketsControl.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="UserControls\ItemSocketsControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
<Name>Filtration.ObjectModel</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,28 @@
<Window x:Class="Filtration.ItemFilterPreview.MainWindow"
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:local="clr-namespace:Filtration.ItemFilterPreview"
xmlns:userControls="clr-namespace:Filtration.ItemFilterPreview.UserControls"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid Background="Black">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<userControls:ItemSocketsControl />
</Grid>
</Grid>
</Window>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Filtration.ItemFilterPreview
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Filtration.ObjectModel.Enums;
namespace Filtration.ItemFilterPreview.Model
{
public interface IItem
{
List<SocketGroup> SocketGroups { get; set; }
string ItemClass { get; set; }
string BaseType { get; set; }
int DropLevel { get; set; }
int ItemLevel { get; set; }
int Height { get; set; }
int Width { get; set; }
int Quality { get; set; }
ItemRarity ItemRarity { get; set; }
int Sockets { get; }
int LinkedSockets { get; }
}
public class Item : IItem
{
private List<SocketGroup> _socketGroups;
public Item(List<SocketGroup> socketGroups)
{
}
public List<SocketGroup> SocketGroups
{
get { return _socketGroups; }
set
{
var socketCount = value.Sum(s => s.Count);
if (socketCount < 1 || socketCount > 6)
{
throw new InvalidOperationException("An item must have between 1 and 6 sockets");
}
var evenSocketCount = socketCount % 2 == 0;
var maxSocketGroups = evenSocketCount ? socketCount / 2 : socketCount - 1;
var maxLinkedSocketGroups = evenSocketCount ? maxSocketGroups : maxSocketGroups - 1;
if (value.Count > maxSocketGroups)
{
throw new InvalidOperationException("Invalid number of socket groups for the socket count of this item");
}
if (value.Count(s => s.Linked) > maxLinkedSocketGroups)
{
throw new InvalidOperationException("Invalid number of linked socket groups for the socket count of this item");
}
_socketGroups = value;
Sockets = socketCount;
LinkedSockets = value.Where(s => s.Linked).Max(s => s.Count);
}
}
public string ItemClass { get; set; }
public string BaseType { get; set; }
public int DropLevel { get; set; }
public int ItemLevel { get; set; }
public int Height { get; set; }
public int Width { get; set; }
public int Quality { get; set; }
public ItemRarity ItemRarity { get; set; }
public int Sockets { get; private set; }
public int LinkedSockets { get; private set; }
}
}

View File

@ -0,0 +1,9 @@
using System.Collections.Generic;
namespace Filtration.ItemFilterPreview.Model
{
class FilteredItemDictionary : Dictionary<Item, bool>
{
}
}

View File

@ -0,0 +1,14 @@
using System.Windows.Media;
namespace Filtration.ItemFilterPreview.Model
{
public class Socket
{
public Socket(Color color)
{
Color = color;
}
public Color Color { get; }
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
namespace Filtration.ItemFilterPreview.Model
{
public class SocketGroup : List<Socket>
{
public SocketGroup(List<Socket> sockets, bool linked)
{
if (sockets.Count < 1 || sockets.Count > 6)
{
throw new InvalidOperationException("A socket group must have between 2 and 6 sockets");
}
if (linked && sockets.Count < 2)
{
throw new InvalidOperationException("A linked socket group must have at least 2 sockets");
}
AddRange(sockets);
Linked = linked;
}
public bool Linked { get; }
}
}

View File

@ -0,0 +1,59 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Filtration.ItemFilterPreview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Filtration.ItemFilterPreview")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Filtration.ItemFilterPreview.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Filtration.ItemFilterPreview.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Filtration.ItemFilterPreview.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,65 @@
using System;
using System.Linq;
using Filtration.ItemFilterPreview.Model;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.BlockItemTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ItemFilterPreview.Services
{
internal interface IItemBlockItemMatcher
{
bool BaseTypeBlockItemMatch(BaseTypeBlockItem baseTypeBlockItem, IItem item);
bool ClassBlockItemMatch(ClassBlockItem classBlockItem, IItem item);
bool DropLevelBlockItemMatch(DropLevelBlockItem dropLevelBlockItem, IItem item);
}
internal class ItemBlockItemMatcher : IItemBlockItemMatcher
{
public bool BaseTypeBlockItemMatch(BaseTypeBlockItem baseTypeBlockItem, IItem item)
{
return baseTypeBlockItem.Items.Any(b => item.BaseType.StartsWith(b));
}
public bool ClassBlockItemMatch(ClassBlockItem classBlockItem, IItem item)
{
return classBlockItem.Items.Any(c => item.ItemClass.StartsWith(c));
}
public bool DropLevelBlockItemMatch(DropLevelBlockItem dropLevelBlockItem, IItem item)
{
return NumericFilterPredicateBlockItemMatch(dropLevelBlockItem, item.DropLevel);
}
private bool NumericFilterPredicateBlockItemMatch<T>(T numericFilterPredicateBlockItem, int matchValue) where T : NumericFilterPredicateBlockItem
{
switch (numericFilterPredicateBlockItem.FilterPredicate.PredicateOperator)
{
case FilterPredicateOperator.Equal:
{
return matchValue == numericFilterPredicateBlockItem.FilterPredicate.PredicateOperand;
}
case FilterPredicateOperator.GreaterThan:
{
return matchValue > numericFilterPredicateBlockItem.FilterPredicate.PredicateOperand;
}
case FilterPredicateOperator.GreaterThanOrEqual:
{
return matchValue >= numericFilterPredicateBlockItem.FilterPredicate.PredicateOperand;
}
case FilterPredicateOperator.LessThan:
{
return matchValue < numericFilterPredicateBlockItem.FilterPredicate.PredicateOperand;
}
case FilterPredicateOperator.LessThanOrEqual:
{
return matchValue <= numericFilterPredicateBlockItem.FilterPredicate.PredicateOperand;
}
default:
{
return false;
}
}
}
}
}

View File

@ -0,0 +1,34 @@
using System.Linq;
using Filtration.ItemFilterPreview.Model;
using Filtration.ObjectModel;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.BlockItemTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ItemFilterPreview.Services
{
public class ItemFilterProcessor
{
private IItemFilterScript _itemFilterScript;
public ItemFilterProcessor()
{
}
public void LoadItemFilterScript(IItemFilterScript itemFilterScript)
{
_itemFilterScript = itemFilterScript;
}
public void ItemIsVisible(IItem item)
{
foreach (var block in _itemFilterScript.ItemFilterBlocks)
{
}
}
}
}

View File

@ -0,0 +1,55 @@
<UserControl x:Class="Filtration.ItemFilterPreview.UserControls.ItemSocketsControl"
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"
xmlns:local="clr-namespace:Filtration.ItemFilterPreview.UserControls"
mc:Ignorable="d" SizeChanged="ItemSocketsControl_OnSizeChanged" RenderOptions.EdgeMode="Aliased"
Height="30" Width="20" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="3" Background="Tomato" />
<Border Grid.Row="1" Grid.Column="3" Background="White" />
<Border Grid.Row="0" Grid.RowSpan="3" Grid.Column="4" Grid.ColumnSpan="3" Background="GreenYellow" />
<Border Grid.Row="3" Grid.Column="5" Background="White" />
<Border Grid.Row="4" Grid.RowSpan="3" Grid.Column="4" Grid.ColumnSpan="3" Background="GreenYellow" />
<Border Grid.Row="5" Grid.Column="3" Background="White" />
<Border Grid.Row="4" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="3" Background="CornflowerBlue" />
<Border Grid.Row="7" Grid.Column="1" Background="White" />
<Border Grid.Row="8" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="3" Background="CornflowerBlue" />
<Border Grid.Row="9" Grid.Column="3" Background="White" />
<Border Grid.Row="8" Grid.RowSpan="3" Grid.Column="4" Grid.ColumnSpan="3" Background="Tomato" />
</Grid>
</UserControl>

View File

@ -0,0 +1,18 @@
using System.Windows;
namespace Filtration.ItemFilterPreview.UserControls
{
public partial class ItemSocketsControl
{
public ItemSocketsControl()
{
InitializeComponent();
}
private void ItemSocketsControl_OnSizeChanged(object sender, SizeChangedEventArgs e)
{
const double ratio = 2d/3d;
Width = Height * ratio;
}
}
}

View File

@ -6,8 +6,6 @@ namespace Filtration.ObjectModel.Enums
{
[Description("=")]
Equal,
[Description("!=")]
NotEqual,
[Description("<")]
LessThan,
[Description("<=")]

View File

@ -88,12 +88,7 @@ namespace Filtration.ObjectModel
return false;
}
if (startingBlockGroup.ParentGroup != null)
{
return HasBlockGroupInParentHierarchy(targetBlockGroup, startingBlockGroup.ParentGroup);
}
return false;
return startingBlockGroup.ParentGroup != null && HasBlockGroupInParentHierarchy(targetBlockGroup, startingBlockGroup.ParentGroup);
}
private void OnBlockGroupStatusChanged(object sender, EventArgs e)

View File

@ -7,7 +7,19 @@ using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel
{
public class ItemFilterScript
public interface IItemFilterScript
{
ObservableCollection<ItemFilterBlock> ItemFilterBlocks { get; }
ObservableCollection<ItemFilterBlockGroup> ItemFilterBlockGroups { get; }
ThemeComponentCollection ThemeComponents { get; set; }
string FilePath { get; set; }
string Description { get; set; }
DateTime DateModified { get; set; }
List<string> Validate();
void ReplaceColors(ReplaceColorsParameterSet replaceColorsParameterSet);
}
public class ItemFilterScript : IItemFilterScript
{
public ItemFilterScript()
{

View File

@ -346,7 +346,7 @@ namespace Filtration.Tests.Translators
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" LinkedSockets != 1";
" LinkedSockets > 1";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, null);
@ -356,7 +356,7 @@ namespace Filtration.Tests.Translators
Assert.AreEqual(1, result.BlockItems.Count(b => b is LinkedSocketsBlockItem));
var blockItem = result.BlockItems.OfType<LinkedSocketsBlockItem>().First();
Assert.AreEqual(1, blockItem.FilterPredicate.PredicateOperand);
Assert.AreEqual(FilterPredicateOperator.NotEqual, blockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(FilterPredicateOperator.GreaterThan, blockItem.FilterPredicate.PredicateOperator);
}
[Test]
@ -364,7 +364,7 @@ namespace Filtration.Tests.Translators
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" Width != 1";
" Width = 1";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, null);
@ -374,7 +374,7 @@ namespace Filtration.Tests.Translators
Assert.AreEqual(1, result.BlockItems.Count(b => b is WidthBlockItem));
var blockItem = result.BlockItems.OfType<WidthBlockItem>().First();
Assert.AreEqual(1, blockItem.FilterPredicate.PredicateOperand);
Assert.AreEqual(FilterPredicateOperator.NotEqual, blockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(FilterPredicateOperator.Equal, blockItem.FilterPredicate.PredicateOperator);
}
[Test]
@ -628,7 +628,7 @@ namespace Filtration.Tests.Translators
" JunkLine Let's ignore this one!" + Environment.NewLine +
" #Quality Commented out quality line" + Environment.NewLine +
" Sockets >= 3" + Environment.NewLine +
" LinkedSockets != 2" + Environment.NewLine +
" LinkedSockets = 2" + Environment.NewLine +
" SocketGroup RGBB RGBWW" + Environment.NewLine +
" SetTextColor 50 100 3 200" + Environment.NewLine +
" SetBackgroundColor 255 100 5" + Environment.NewLine +
@ -673,7 +673,7 @@ namespace Filtration.Tests.Translators
Assert.AreEqual(3, socketsblockItem.FilterPredicate.PredicateOperand);
var linkedSocketsblockItem = result.BlockItems.OfType<LinkedSocketsBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.NotEqual, linkedSocketsblockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(FilterPredicateOperator.Equal, linkedSocketsblockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(2, linkedSocketsblockItem.FilterPredicate.PredicateOperand);
var socketGroupblockItem = result.BlockItems.OfType<SocketGroupBlockItem>().First();
@ -1076,9 +1076,9 @@ namespace Filtration.Tests.Translators
{
// Arrange
var expectedResult = "Show" + Environment.NewLine +
" LinkedSockets != 3";
" LinkedSockets = 3";
_testUtility.TestBlock.BlockItems.Add(new LinkedSocketsBlockItem(FilterPredicateOperator.NotEqual, 3));
_testUtility.TestBlock.BlockItems.Add(new LinkedSocketsBlockItem(FilterPredicateOperator.Equal, 3));
// Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);
@ -1321,7 +1321,7 @@ namespace Filtration.Tests.Translators
var expectedResult = "Show" + Environment.NewLine +
" ItemLevel > 70" + Environment.NewLine +
" ItemLevel <= 85" + Environment.NewLine +
" DropLevel != 56" + Environment.NewLine +
" DropLevel > 56" + Environment.NewLine +
" Quality > 2" + Environment.NewLine +
" Rarity = Unique" + Environment.NewLine +
" Sockets <= 6" + Environment.NewLine +
@ -1341,7 +1341,7 @@ namespace Filtration.Tests.Translators
_testUtility.TestBlock.BlockItems.Add(new ActionBlockItem(BlockAction.Show));
_testUtility.TestBlock.BlockItems.Add(new ItemLevelBlockItem(FilterPredicateOperator.GreaterThan, 70));
_testUtility.TestBlock.BlockItems.Add(new ItemLevelBlockItem(FilterPredicateOperator.LessThanOrEqual, 85));
_testUtility.TestBlock.BlockItems.Add(new DropLevelBlockItem(FilterPredicateOperator.NotEqual, 56));
_testUtility.TestBlock.BlockItems.Add(new DropLevelBlockItem(FilterPredicateOperator.GreaterThan, 56));
_testUtility.TestBlock.BlockItems.Add(new QualityBlockItem(FilterPredicateOperator.GreaterThan, 2));
_testUtility.TestBlock.BlockItems.Add(new RarityBlockItem(FilterPredicateOperator.Equal, (int)ItemRarity.Unique));
var classItemblockItem = new ClassBlockItem();

View File

@ -66,7 +66,6 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>

View File

@ -21,51 +21,198 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.Common", "Filtra
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.Common.Tests", "Filtration.Common.Tests\Filtration.Common.Tests.csproj", "{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.ItemFilterPreview", "Filtration.ItemFilterPreview\Filtration.ItemFilterPreview.csproj", "{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.ItemFilterPreview.Tests", "Filtration.ItemFilterPreview.Tests\Filtration.ItemFilterPreview.Tests.csproj", "{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}"
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|ARM.Build.0 = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|x64.ActiveCfg = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|x64.Build.0 = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|x86.ActiveCfg = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Debug|x86.Build.0 = Debug|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|Any CPU.Build.0 = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|ARM.ActiveCfg = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|ARM.Build.0 = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|x64.ActiveCfg = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|x64.Build.0 = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|x86.ActiveCfg = Release|Any CPU
{55E0A34C-E039-43D7-A024-A4045401CDDA}.Release|x86.Build.0 = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|ARM.Build.0 = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|x64.ActiveCfg = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|x64.Build.0 = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|x86.ActiveCfg = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Debug|x86.Build.0 = Debug|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|Any CPU.Build.0 = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|ARM.ActiveCfg = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|ARM.Build.0 = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x64.ActiveCfg = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x64.Build.0 = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x86.ActiveCfg = Release|Any CPU
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x86.Build.0 = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|ARM.ActiveCfg = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|ARM.Build.0 = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|x64.ActiveCfg = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|x64.Build.0 = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|x86.ActiveCfg = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Debug|x86.Build.0 = Debug|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|Any CPU.Build.0 = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|ARM.ActiveCfg = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|ARM.Build.0 = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|x64.ActiveCfg = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|x64.Build.0 = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|x86.ActiveCfg = Release|Any CPU
{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}.Release|x86.Build.0 = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|ARM.ActiveCfg = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|ARM.Build.0 = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|x64.ActiveCfg = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|x64.Build.0 = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|x86.ActiveCfg = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Debug|x86.Build.0 = Debug|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|Any CPU.Build.0 = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|ARM.ActiveCfg = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|ARM.Build.0 = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x64.ActiveCfg = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x64.Build.0 = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x86.ActiveCfg = Release|Any CPU
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x86.Build.0 = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|ARM.ActiveCfg = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|ARM.Build.0 = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|x64.ActiveCfg = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|x64.Build.0 = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|x86.ActiveCfg = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Debug|x86.Build.0 = Debug|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|Any CPU.Build.0 = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|ARM.ActiveCfg = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|ARM.Build.0 = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|x64.ActiveCfg = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|x64.Build.0 = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|x86.ActiveCfg = Release|Any CPU
{41B8F5C2-65AA-42F0-A20B-6F95B13A9F48}.Release|x86.Build.0 = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|ARM.ActiveCfg = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|ARM.Build.0 = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|x64.ActiveCfg = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|x64.Build.0 = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|x86.ActiveCfg = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Debug|x86.Build.0 = Debug|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|Any CPU.Build.0 = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|ARM.ActiveCfg = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|ARM.Build.0 = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x64.ActiveCfg = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x64.Build.0 = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x86.ActiveCfg = Release|Any CPU
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x86.Build.0 = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|ARM.Build.0 = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|x64.ActiveCfg = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|x64.Build.0 = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|x86.ActiveCfg = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Debug|x86.Build.0 = Debug|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|Any CPU.Build.0 = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|ARM.ActiveCfg = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|ARM.Build.0 = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|x64.ActiveCfg = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|x64.Build.0 = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|x86.ActiveCfg = Release|Any CPU
{0F333344-7695-47B2-B0E6-172E4DE74819}.Release|x86.Build.0 = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|ARM.Build.0 = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|x64.ActiveCfg = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|x64.Build.0 = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|x86.ActiveCfg = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Debug|x86.Build.0 = Debug|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|Any CPU.Build.0 = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|ARM.ActiveCfg = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|ARM.Build.0 = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|x64.ActiveCfg = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|x64.Build.0 = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|x86.ActiveCfg = Release|Any CPU
{8CB44F28-2956-4C2A-9314-72727262EDD4}.Release|x86.Build.0 = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|ARM.Build.0 = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|x64.ActiveCfg = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|x64.Build.0 = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|x86.ActiveCfg = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Debug|x86.Build.0 = Debug|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|Any CPU.Build.0 = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|ARM.ActiveCfg = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|ARM.Build.0 = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x64.ActiveCfg = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x64.Build.0 = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x86.ActiveCfg = Release|Any CPU
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x86.Build.0 = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|ARM.ActiveCfg = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|ARM.Build.0 = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|x64.ActiveCfg = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|x64.Build.0 = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|x86.ActiveCfg = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Debug|x86.Build.0 = Debug|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|Any CPU.Build.0 = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|ARM.ActiveCfg = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|ARM.Build.0 = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|x64.ActiveCfg = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|x64.Build.0 = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|x86.ActiveCfg = Release|Any CPU
{3AB98B6E-05DB-44FA-9DAD-584AA88F0739}.Release|x86.Build.0 = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|ARM.ActiveCfg = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|ARM.Build.0 = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|x64.ActiveCfg = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|x64.Build.0 = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|x86.ActiveCfg = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Debug|x86.Build.0 = Debug|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|Any CPU.Build.0 = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|ARM.ActiveCfg = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|ARM.Build.0 = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x64.ActiveCfg = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x64.Build.0 = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.ActiveCfg = Release|Any CPU
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -254,7 +254,7 @@ namespace Filtration.Translators
private static void SetNumericFilterPredicateFromString(NumericFilterPredicate predicate, string inputString)
{
var result = Regex.Match(inputString, @"^\w+\s+([><!=]{0,2})\s*(\d{0,3})$");
var result = Regex.Match(inputString, @"^\w+\s+([><=]{0,2})\s*(\d{0,3})$");
if (result.Groups.Count != 3) return;
predicate.PredicateOperator =