Refactored parsing services into separate project
This commit is contained in:
parent
86dc03f4ff
commit
8bfbe7cc66
|
@ -95,6 +95,14 @@
|
||||||
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||||
<Name>Filtration.ObjectModel</Name>
|
<Name>Filtration.ObjectModel</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser.Interface\Filtration.Parser.Interface.csproj">
|
||||||
|
<Project>{46383F20-02DF-48B4-B092-9088FA4ACD5A}</Project>
|
||||||
|
<Name>Filtration.Parser.Interface</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser\Filtration.Parser.csproj">
|
||||||
|
<Project>{10a7c2bc-ec6f-4a38-bdda-e35935004c02}</Project>
|
||||||
|
<Name>Filtration.Parser</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Filtration\Filtration.csproj">
|
<ProjectReference Include="..\Filtration\Filtration.csproj">
|
||||||
<Project>{55e0a34c-e039-43d7-a024-a4045401cdda}</Project>
|
<Project>{55e0a34c-e039-43d7-a024-a4045401cdda}</Project>
|
||||||
<Name>Filtration</Name>
|
<Name>Filtration</Name>
|
||||||
|
|
|
@ -7,7 +7,7 @@ using Filtration.ItemFilterPreview.Tests.Properties;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
using Filtration.ObjectModel.BlockItemTypes;
|
using Filtration.ObjectModel.BlockItemTypes;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
using Filtration.Translators;
|
using Filtration.Parser.Services;
|
||||||
using Moq;
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?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>{46383F20-02DF-48B4-B092-9088FA4ACD5A}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Filtration.Parser.Interface</RootNamespace>
|
||||||
|
<AssemblyName>Filtration.Parser.Interface</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<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="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Services\IBlockGroupHierarchyBuilder.cs" />
|
||||||
|
<Compile Include="Services\IItemFilterBlockTranslator.cs" />
|
||||||
|
<Compile Include="Services\IItemFilterScriptTranslator.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
||||||
|
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||||
|
<Name>Filtration.ObjectModel</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</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>
|
|
@ -0,0 +1,36 @@
|
||||||
|
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.Parser.Interface")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Filtration.Parser.Interface")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||||
|
[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("46383f20-02df-48b4-b092-9088fa4acd5a")]
|
||||||
|
|
||||||
|
// 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")]
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Filtration.ObjectModel;
|
||||||
|
|
||||||
|
namespace Filtration.Parser.Interface.Services
|
||||||
|
{
|
||||||
|
public interface IBlockGroupHierarchyBuilder
|
||||||
|
{
|
||||||
|
void Initialise(ItemFilterBlockGroup rootBlockGroup);
|
||||||
|
void Cleanup();
|
||||||
|
ItemFilterBlockGroup IntegrateStringListIntoBlockGroupHierarchy(IEnumerable<string> groupStrings);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using Filtration.ObjectModel;
|
||||||
|
using Filtration.ObjectModel.ThemeEditor;
|
||||||
|
|
||||||
|
namespace Filtration.Parser.Interface.Services
|
||||||
|
{
|
||||||
|
public interface IItemFilterBlockTranslator
|
||||||
|
{
|
||||||
|
IItemFilterBlock TranslateStringToItemFilterBlock(string inputString,
|
||||||
|
ThemeComponentCollection masterComponentCollection);
|
||||||
|
string TranslateItemFilterBlockToString(IItemFilterBlock block);
|
||||||
|
void ReplaceColorBlockItemsFromString(ObservableCollection<IItemFilterBlockItem> blockItems, string inputString);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using Filtration.ObjectModel;
|
||||||
|
|
||||||
|
namespace Filtration.Parser.Interface.Services
|
||||||
|
{
|
||||||
|
public interface IItemFilterScriptTranslator
|
||||||
|
{
|
||||||
|
ItemFilterScript TranslateStringToItemFilterScript(string inputString);
|
||||||
|
string TranslateItemFilterScriptToString(ItemFilterScript script);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,139 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Filtration.Parser.Tests</RootNamespace>
|
||||||
|
<AssemblyName>Filtration.Parser.Tests</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<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>False</IsCodedUITest>
|
||||||
|
<TestProjectType>UnitTest</TestProjectType>
|
||||||
|
<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="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.Core.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<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="PresentationCore" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Choose>
|
||||||
|
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||||
|
</ItemGroup>
|
||||||
|
</When>
|
||||||
|
<Otherwise>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Otherwise>
|
||||||
|
</Choose>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Services\TestBlockGroupHierarchyBuilder.cs" />
|
||||||
|
<Compile Include="Services\TestItemFilterBlockTranslator.cs" />
|
||||||
|
<Compile Include="Services\TestItemFilterScriptTranslator.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
||||||
|
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||||
|
<Name>Filtration.ObjectModel</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser.Interface\Filtration.Parser.Interface.csproj">
|
||||||
|
<Project>{46383f20-02df-48b4-b092-9088fa4acd5a}</Project>
|
||||||
|
<Name>Filtration.Parser.Interface</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser\Filtration.Parser.csproj">
|
||||||
|
<Project>{10a7c2bc-ec6f-4a38-bdda-e35935004c02}</Project>
|
||||||
|
<Name>Filtration.Parser</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\ThioleItemFilter.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\testscript.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Choose>
|
||||||
|
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
</When>
|
||||||
|
</Choose>
|
||||||
|
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||||
|
<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>
|
|
@ -0,0 +1,36 @@
|
||||||
|
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.Parser.Tests")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Filtration.Parser.Tests")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||||
|
[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("1f30cf6d-a5bf-4777-b8ba-e34f439fe8e5")]
|
||||||
|
|
||||||
|
// 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")]
|
|
@ -0,0 +1,120 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Parser.Tests.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()]
|
||||||
|
public 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)]
|
||||||
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Filtration.Parser.Tests.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)]
|
||||||
|
public static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to # Item Filter Script created by Filtration v0.1 - www.github.com/XVar/filtration
|
||||||
|
///# Begin Script Description
|
||||||
|
///# This is a test script
|
||||||
|
///#
|
||||||
|
///# End Script Description
|
||||||
|
///
|
||||||
|
///# First test condition booyah
|
||||||
|
///Show
|
||||||
|
/// ItemLevel = 32
|
||||||
|
/// DropLevel >= 85
|
||||||
|
/// Quality >= 15
|
||||||
|
/// Sockets < 4
|
||||||
|
/// LinkedSockets >= 3
|
||||||
|
/// SetFontSize 12
|
||||||
|
///
|
||||||
|
///# Section: Gud stuff u shud pick up m9
|
||||||
|
///
|
||||||
|
///# Second test condition
|
||||||
|
///Show
|
||||||
|
/// ItemLevel > 50
|
||||||
|
/// Quality >= 15
|
||||||
|
/// Rarity > Magic
|
||||||
|
/// Class "Test Class 1" "Test Class 2" "Test Class [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
public static string testscript {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("testscript", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to ###BETA VERSION 1.0.0.1-8
|
||||||
|
///#Please test and let me know via pm on reddit /u/brute_force or @Thiole in game if i am online
|
||||||
|
///
|
||||||
|
///#------------------------------------------------------------------
|
||||||
|
///#Fishing Rods First OFC
|
||||||
|
///Show
|
||||||
|
/// Class Fishing Rods
|
||||||
|
/// SetTextColor 0 0 0
|
||||||
|
/// SetBorderColor 0 0 0
|
||||||
|
/// SetBackgroundColor 255 255 255
|
||||||
|
///
|
||||||
|
///Show
|
||||||
|
/// Class "Quest Items"
|
||||||
|
///
|
||||||
|
///#####Shows better currency differently from lower currency for efficiency
|
||||||
|
///##### skill gems
|
||||||
|
///Show
|
||||||
|
/// Class "Active Skill Gems" "Support Skil [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
public static string ThioleItemFilter {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ThioleItemFilter", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,127 @@
|
||||||
|
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<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" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</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" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="ThioleItemFilter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\ThioleItemFilter.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
|
</data>
|
||||||
|
<data name="testscript" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\testscript.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
using Filtration.Translators;
|
using Filtration.Parser.Services;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Filtration.Tests.Translators
|
namespace Filtration.Parser.Tests.Services
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestBlockGroupHierarchyBuilder
|
public class TestBlockGroupHierarchyBuilder
|
|
@ -8,11 +8,12 @@ using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
using Filtration.ObjectModel.BlockItemTypes;
|
using Filtration.ObjectModel.BlockItemTypes;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
using Filtration.ObjectModel.ThemeEditor;
|
using Filtration.ObjectModel.ThemeEditor;
|
||||||
using Filtration.Translators;
|
using Filtration.Parser.Interface.Services;
|
||||||
|
using Filtration.Parser.Services;
|
||||||
using Moq;
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Filtration.Tests.Translators
|
namespace Filtration.Parser.Tests.Services
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestItemFilterBlockTranslator
|
public class TestItemFilterBlockTranslator
|
|
@ -1,19 +1,18 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
using Filtration.ObjectModel.BlockItemTypes;
|
using Filtration.ObjectModel.BlockItemTypes;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
using Filtration.ObjectModel.ThemeEditor;
|
using Filtration.ObjectModel.ThemeEditor;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
|
using Filtration.Parser.Services;
|
||||||
|
using Filtration.Parser.Tests.Properties;
|
||||||
using Filtration.Properties;
|
using Filtration.Properties;
|
||||||
using Filtration.Translators;
|
|
||||||
using Moq;
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Resources = Filtration.Tests.Properties.Resources;
|
|
||||||
|
|
||||||
namespace Filtration.Tests.Translators
|
namespace Filtration.Parser.Tests.Services
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestItemFilterScriptTranslator
|
public class TestItemFilterScriptTranslator
|
||||||
|
@ -48,6 +47,7 @@ namespace Filtration.Tests.Translators
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var testInput = Resources.testscript;
|
var testInput = Resources.testscript;
|
||||||
|
|
||||||
var expectedDescription = "Item Filter Script created by Filtration v0.1 - www.github.com/XVar/filtration" + Environment.NewLine +
|
var expectedDescription = "Item Filter Script created by Filtration v0.1 - www.github.com/XVar/filtration" + Environment.NewLine +
|
||||||
"Begin Script Description" + Environment.NewLine +
|
"Begin Script Description" + Environment.NewLine +
|
||||||
"This is a test script" + Environment.NewLine +
|
"This is a test script" + Environment.NewLine +
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net46" />
|
||||||
|
<package id="Moq" version="4.2.1510.2205" targetFramework="net46" />
|
||||||
|
<package id="NUnit" version="3.0.1" targetFramework="net46" />
|
||||||
|
</packages>
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?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>{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Filtration.Parser</RootNamespace>
|
||||||
|
<AssemblyName>Filtration.Parser</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<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="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\Filtration\Properties\Settings.Designer.cs">
|
||||||
|
<Link>Properties\Settings.Designer.cs</Link>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Services\BlockGroupHierarchyBuilder.cs" />
|
||||||
|
<Compile Include="Services\ItemFilterBlockTranslator.cs" />
|
||||||
|
<Compile Include="Services\ItemFilterScriptTranslator.cs" />
|
||||||
|
<Compile Include="WindsorInstaller.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\Filtration\Properties\Settings.settings">
|
||||||
|
<Link>Properties\Settings.settings</Link>
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Filtration.Common\Filtration.Common.csproj">
|
||||||
|
<Project>{8cb44f28-2956-4c2a-9314-72727262edd4}</Project>
|
||||||
|
<Name>Filtration.Common</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
||||||
|
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||||
|
<Name>Filtration.ObjectModel</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser.Interface\Filtration.Parser.Interface.csproj">
|
||||||
|
<Project>{46383f20-02df-48b4-b092-9088fa4acd5a}</Project>
|
||||||
|
<Name>Filtration.Parser.Interface</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</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>
|
|
@ -0,0 +1,39 @@
|
||||||
|
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.Parser")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Filtration.Parser")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||||
|
[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("10a7c2bc-ec6f-4a38-bdda-e35935004c02")]
|
||||||
|
|
||||||
|
// 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("Filtration.Parser.Tests")]
|
||||||
|
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
|
@ -2,16 +2,10 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
|
|
||||||
namespace Filtration.Translators
|
namespace Filtration.Parser.Services
|
||||||
{
|
{
|
||||||
internal interface IBlockGroupHierarchyBuilder
|
|
||||||
{
|
|
||||||
void Initialise(ItemFilterBlockGroup rootBlockGroup);
|
|
||||||
void Cleanup();
|
|
||||||
ItemFilterBlockGroup IntegrateStringListIntoBlockGroupHierarchy(IEnumerable<string> groupStrings);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class BlockGroupHierarchyBuilder : IBlockGroupHierarchyBuilder
|
internal class BlockGroupHierarchyBuilder : IBlockGroupHierarchyBuilder
|
||||||
{
|
{
|
||||||
private ItemFilterBlockGroup _rootBlockGroup;
|
private ItemFilterBlockGroup _rootBlockGroup;
|
|
@ -12,17 +12,10 @@ using Filtration.ObjectModel.BlockItemTypes;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
using Filtration.ObjectModel.Extensions;
|
using Filtration.ObjectModel.Extensions;
|
||||||
using Filtration.ObjectModel.ThemeEditor;
|
using Filtration.ObjectModel.ThemeEditor;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
|
|
||||||
namespace Filtration.Translators
|
namespace Filtration.Parser.Services
|
||||||
{
|
{
|
||||||
internal interface IItemFilterBlockTranslator
|
|
||||||
{
|
|
||||||
IItemFilterBlock TranslateStringToItemFilterBlock(string inputString,
|
|
||||||
ThemeComponentCollection masterComponentCollection);
|
|
||||||
string TranslateItemFilterBlockToString(IItemFilterBlock block);
|
|
||||||
void ReplaceColorBlockItemsFromString(ObservableCollection<IItemFilterBlockItem> blockItems, string inputString);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class ItemFilterBlockTranslator : IItemFilterBlockTranslator
|
internal class ItemFilterBlockTranslator : IItemFilterBlockTranslator
|
||||||
{
|
{
|
||||||
private readonly IBlockGroupHierarchyBuilder _blockGroupHierarchyBuilder;
|
private readonly IBlockGroupHierarchyBuilder _blockGroupHierarchyBuilder;
|
|
@ -5,16 +5,11 @@ using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Filtration.Common.Utilities;
|
using Filtration.Common.Utilities;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
using Filtration.Properties;
|
using Filtration.Properties;
|
||||||
|
|
||||||
namespace Filtration.Translators
|
namespace Filtration.Parser.Services
|
||||||
{
|
{
|
||||||
internal interface IItemFilterScriptTranslator
|
|
||||||
{
|
|
||||||
ItemFilterScript TranslateStringToItemFilterScript(string inputString);
|
|
||||||
string TranslateItemFilterScriptToString(ItemFilterScript script);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class ItemFilterScriptTranslator : IItemFilterScriptTranslator
|
internal class ItemFilterScriptTranslator : IItemFilterScriptTranslator
|
||||||
{
|
{
|
||||||
private readonly IItemFilterBlockTranslator _blockTranslator;
|
private readonly IItemFilterBlockTranslator _blockTranslator;
|
|
@ -0,0 +1,29 @@
|
||||||
|
using Castle.MicroKernel.Registration;
|
||||||
|
using Castle.MicroKernel.SubSystems.Configuration;
|
||||||
|
using Castle.Windsor;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
|
using Filtration.Parser.Services;
|
||||||
|
|
||||||
|
namespace Filtration.Parser
|
||||||
|
{
|
||||||
|
public class WindsorInstaller : IWindsorInstaller
|
||||||
|
{
|
||||||
|
public void Install(IWindsorContainer container, IConfigurationStore store)
|
||||||
|
{
|
||||||
|
container.Register(Component
|
||||||
|
.For<IBlockGroupHierarchyBuilder>()
|
||||||
|
.ImplementedBy<BlockGroupHierarchyBuilder>()
|
||||||
|
.LifestyleSingleton());
|
||||||
|
|
||||||
|
container.Register(Component
|
||||||
|
.For<IItemFilterBlockTranslator>()
|
||||||
|
.ImplementedBy<ItemFilterBlockTranslator>()
|
||||||
|
.LifestyleSingleton());
|
||||||
|
|
||||||
|
container.Register(Component
|
||||||
|
.For<IItemFilterScriptTranslator>()
|
||||||
|
.ImplementedBy<ItemFilterScriptTranslator>()
|
||||||
|
.LifestyleSingleton());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Castle.Core" version="3.3.0" targetFramework="net461" />
|
||||||
|
<package id="Castle.Windsor" version="3.3.0" targetFramework="net461" />
|
||||||
|
</packages>
|
|
@ -68,9 +68,6 @@
|
||||||
<Compile Include="Services\TestItemFilterPersistenceService.cs" />
|
<Compile Include="Services\TestItemFilterPersistenceService.cs" />
|
||||||
<Compile Include="Services\TestStaticDataService.cs" />
|
<Compile Include="Services\TestStaticDataService.cs" />
|
||||||
<Compile Include="Services\TestUpdateService.cs" />
|
<Compile Include="Services\TestUpdateService.cs" />
|
||||||
<Compile Include="Translators\TestBlockGroupHierarchyBuilder.cs" />
|
|
||||||
<Compile Include="Translators\TestItemFilterBlockTranslator.cs" />
|
|
||||||
<Compile Include="Translators\TestItemFilterScriptTranslator.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
|
@ -78,6 +75,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\" />
|
<Folder Include="Models\" />
|
||||||
|
<Folder Include="Resources\" />
|
||||||
|
<Folder Include="Translators\" />
|
||||||
<Folder Include="ViewModels\" />
|
<Folder Include="ViewModels\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -93,6 +92,10 @@
|
||||||
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||||
<Name>Filtration.ObjectModel</Name>
|
<Name>Filtration.ObjectModel</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser.Interface\Filtration.Parser.Interface.csproj">
|
||||||
|
<Project>{46383F20-02DF-48B4-B092-9088FA4ACD5A}</Project>
|
||||||
|
<Name>Filtration.Parser.Interface</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Filtration\Filtration.csproj">
|
<ProjectReference Include="..\Filtration\Filtration.csproj">
|
||||||
<Project>{55e0a34c-e039-43d7-a024-a4045401cdda}</Project>
|
<Project>{55e0a34c-e039-43d7-a024-a4045401cdda}</Project>
|
||||||
<Name>Filtration</Name>
|
<Name>Filtration</Name>
|
||||||
|
@ -104,12 +107,6 @@
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\ThioleItemFilter.txt" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\testscript.txt" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -59,62 +59,5 @@ namespace Filtration.Tests.Properties {
|
||||||
resourceCulture = value;
|
resourceCulture = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to # Item Filter Script created by Filtration v0.1 - www.github.com/XVar/filtration
|
|
||||||
///# Begin Script Description
|
|
||||||
///# This is a test script
|
|
||||||
///#
|
|
||||||
///# End Script Description
|
|
||||||
///
|
|
||||||
///# First test condition booyah
|
|
||||||
///Show
|
|
||||||
/// ItemLevel = 32
|
|
||||||
/// DropLevel >= 85
|
|
||||||
/// Quality >= 15
|
|
||||||
/// Sockets < 4
|
|
||||||
/// LinkedSockets >= 3
|
|
||||||
/// SetFontSize 12
|
|
||||||
///
|
|
||||||
///# Section: Gud stuff u shud pick up m9
|
|
||||||
///
|
|
||||||
///# Second test condition
|
|
||||||
///Show
|
|
||||||
/// ItemLevel > 50
|
|
||||||
/// Quality >= 15
|
|
||||||
/// Rarity > Magic
|
|
||||||
/// Class "Test Class 1" "Test Class 2" "Test Class [rest of string was truncated]";.
|
|
||||||
/// </summary>
|
|
||||||
internal static string testscript {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("testscript", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to ###BETA VERSION 1.0.0.1-8
|
|
||||||
///#Please test and let me know via pm on reddit /u/brute_force or @Thiole in game if i am online
|
|
||||||
///
|
|
||||||
///#------------------------------------------------------------------
|
|
||||||
///#Fishing Rods First OFC
|
|
||||||
///Show
|
|
||||||
/// Class Fishing Rods
|
|
||||||
/// SetTextColor 0 0 0
|
|
||||||
/// SetBorderColor 0 0 0
|
|
||||||
/// SetBackgroundColor 255 255 255
|
|
||||||
///
|
|
||||||
///Show
|
|
||||||
/// Class "Quest Items"
|
|
||||||
///
|
|
||||||
///#####Shows better currency differently from lower currency for efficiency
|
|
||||||
///##### skill gems
|
|
||||||
///Show
|
|
||||||
/// Class "Active Skill Gems" "Support Skil [rest of string was truncated]";.
|
|
||||||
/// </summary>
|
|
||||||
internal static string ThioleItemFilter {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("ThioleItemFilter", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,10 +118,5 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="testscript" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\testscript.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
|
||||||
</data>
|
|
||||||
<data name="ThioleItemFilter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\ThioleItemFilter.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -2,8 +2,8 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Filtration.Common.Services;
|
using Filtration.Common.Services;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
using Filtration.Services;
|
using Filtration.Services;
|
||||||
using Filtration.Translators;
|
|
||||||
using Moq;
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.ItemFilterPrevie
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.ItemFilterPreview.Tests", "Filtration.ItemFilterPreview.Tests\Filtration.ItemFilterPreview.Tests.csproj", "{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.ItemFilterPreview.Tests", "Filtration.ItemFilterPreview.Tests\Filtration.ItemFilterPreview.Tests.csproj", "{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.Parser", "Filtration.Parser\Filtration.Parser.csproj", "{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.Parser.Interface", "Filtration.Parser.Interface\Filtration.Parser.Interface.csproj", "{46383F20-02DF-48B4-B092-9088FA4ACD5A}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Filtration.Parser.Tests", "Filtration.Parser.Tests\Filtration.Parser.Tests.csproj", "{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -213,6 +219,54 @@ Global
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x64.Build.0 = 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.ActiveCfg = Release|Any CPU
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.Build.0 = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{10A7C2BC-EC6F-4A38-BDDA-E35935004C02}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{46383F20-02DF-48B4-B092-9088FA4ACD5A}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using Castle.Facilities.TypedFactory;
|
using Castle.Facilities.TypedFactory;
|
||||||
using Castle.MicroKernel.ModelBuilder.Inspectors;
|
using Castle.MicroKernel.ModelBuilder.Inspectors;
|
||||||
|
using Castle.MicroKernel.Registration;
|
||||||
using Castle.Windsor;
|
using Castle.Windsor;
|
||||||
using Castle.Windsor.Installer;
|
using Castle.Windsor.Installer;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
|
@ -38,6 +41,8 @@ namespace Filtration
|
||||||
|
|
||||||
_container.AddFacility<TypedFactoryFacility>();
|
_container.AddFacility<TypedFactoryFacility>();
|
||||||
_container.Install(FromAssembly.InThisApplication());
|
_container.Install(FromAssembly.InThisApplication());
|
||||||
|
_container.Install(FromAssembly.Named("Filtration.Parser")); // Not directly referenced so manually call its installers
|
||||||
|
|
||||||
|
|
||||||
Mapper.Configuration.ConstructServicesUsing(_container.Resolve);
|
Mapper.Configuration.ConstructServicesUsing(_container.Resolve);
|
||||||
|
|
||||||
|
@ -68,7 +73,7 @@ namespace Filtration
|
||||||
mainWindow.Show();
|
mainWindow.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
private static void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
Logger.Fatal(e.Exception);
|
Logger.Fatal(e.Exception);
|
||||||
var exception = e.Exception.Message + Environment.NewLine + e.Exception.StackTrace;
|
var exception = e.Exception.Message + Environment.NewLine + e.Exception.StackTrace;
|
||||||
|
|
|
@ -166,9 +166,6 @@
|
||||||
<Compile Include="Services\StaticDataService.cs" />
|
<Compile Include="Services\StaticDataService.cs" />
|
||||||
<Compile Include="Services\UpdateCheckService.cs" />
|
<Compile Include="Services\UpdateCheckService.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
<Compile Include="Settings.cs" />
|
||||||
<Compile Include="Translators\BlockGroupHierarchyBuilder.cs" />
|
|
||||||
<Compile Include="Translators\ItemFilterBlockTranslator.cs" />
|
|
||||||
<Compile Include="Translators\ItemFilterScriptTranslator.cs" />
|
|
||||||
<Compile Include="UserControls\AutoScrollingListBox.cs" />
|
<Compile Include="UserControls\AutoScrollingListBox.cs" />
|
||||||
<Compile Include="UserControls\BlockItemControl.xaml.cs">
|
<Compile Include="UserControls\BlockItemControl.xaml.cs">
|
||||||
<DependentUpon>BlockItemControl.xaml</DependentUpon>
|
<DependentUpon>BlockItemControl.xaml</DependentUpon>
|
||||||
|
@ -261,7 +258,6 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="WindsorInstallers\RepositoriesInstaller.cs" />
|
<Compile Include="WindsorInstallers\RepositoriesInstaller.cs" />
|
||||||
<Compile Include="WindsorInstallers\ServicesInstaller.cs" />
|
<Compile Include="WindsorInstallers\ServicesInstaller.cs" />
|
||||||
<Compile Include="WindsorInstallers\TranslatorsInstaller.cs" />
|
|
||||||
<Compile Include="WindsorInstallers\ViewModelsInstaller.cs" />
|
<Compile Include="WindsorInstallers\ViewModelsInstaller.cs" />
|
||||||
<Compile Include="WindsorInstallers\ViewsInstaller.cs" />
|
<Compile Include="WindsorInstallers\ViewsInstaller.cs" />
|
||||||
<Page Include="UserControls\ItemPreviewControl.xaml">
|
<Page Include="UserControls\ItemPreviewControl.xaml">
|
||||||
|
@ -507,12 +503,22 @@
|
||||||
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||||
<Name>Filtration.ObjectModel</Name>
|
<Name>Filtration.ObjectModel</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser.Interface\Filtration.Parser.Interface.csproj">
|
||||||
|
<Project>{46383f20-02df-48b4-b092-9088fa4acd5a}</Project>
|
||||||
|
<Name>Filtration.Parser.Interface</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Filtration.Parser\Filtration.Parser.csproj">
|
||||||
|
<Project>{10a7c2bc-ec6f-4a38-bdda-e35935004c02}</Project>
|
||||||
|
<Name>Filtration.Parser</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Filtration.ThemeEditor\Filtration.ThemeEditor.csproj">
|
<ProjectReference Include="..\Filtration.ThemeEditor\Filtration.ThemeEditor.csproj">
|
||||||
<Project>{41b8f5c2-65aa-42f0-a20b-6f95b13a9f48}</Project>
|
<Project>{41b8f5c2-65aa-42f0-a20b-6f95b13a9f48}</Project>
|
||||||
<Name>Filtration.ThemeEditor</Name>
|
<Name>Filtration.ThemeEditor</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Folder Include="Translators\" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(XamlSpyInstallPath)MSBuild\FirstFloor.XamlSpy.WPF.targets" Condition="'$(XamlSpyInstallPath)' != '' and '$(Configuration)' == 'DEBUG'" />
|
<Import Project="$(XamlSpyInstallPath)MSBuild\FirstFloor.XamlSpy.WPF.targets" Condition="'$(XamlSpyInstallPath)' != '' and '$(Configuration)' == 'DEBUG'" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Filtration.Common.Services;
|
using Filtration.Common.Services;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
using Filtration.Properties;
|
using Filtration.Properties;
|
||||||
using Filtration.Translators;
|
|
||||||
|
|
||||||
namespace Filtration.Services
|
namespace Filtration.Services
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,8 +14,8 @@ using Filtration.Common.ViewModels;
|
||||||
using Filtration.Interface;
|
using Filtration.Interface;
|
||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
using Filtration.Services;
|
using Filtration.Services;
|
||||||
using Filtration.Translators;
|
|
||||||
using GalaSoft.MvvmLight.CommandWpf;
|
using GalaSoft.MvvmLight.CommandWpf;
|
||||||
using GalaSoft.MvvmLight.Messaging;
|
using GalaSoft.MvvmLight.Messaging;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
|
|
@ -15,6 +15,7 @@ using Filtration.Interface;
|
||||||
using Filtration.Models;
|
using Filtration.Models;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
using Filtration.ObjectModel.ThemeEditor;
|
using Filtration.ObjectModel.ThemeEditor;
|
||||||
|
using Filtration.Parser.Interface.Services;
|
||||||
using Filtration.Properties;
|
using Filtration.Properties;
|
||||||
using Filtration.Repositories;
|
using Filtration.Repositories;
|
||||||
using Filtration.Services;
|
using Filtration.Services;
|
||||||
|
@ -22,7 +23,6 @@ using Filtration.ThemeEditor.Messages;
|
||||||
using Filtration.ThemeEditor.Providers;
|
using Filtration.ThemeEditor.Providers;
|
||||||
using Filtration.ThemeEditor.Services;
|
using Filtration.ThemeEditor.Services;
|
||||||
using Filtration.ThemeEditor.ViewModels;
|
using Filtration.ThemeEditor.ViewModels;
|
||||||
using Filtration.Translators;
|
|
||||||
using Filtration.Views;
|
using Filtration.Views;
|
||||||
using GalaSoft.MvvmLight.CommandWpf;
|
using GalaSoft.MvvmLight.CommandWpf;
|
||||||
using GalaSoft.MvvmLight.Messaging;
|
using GalaSoft.MvvmLight.Messaging;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using Filtration.Translators;
|
using Filtration.Parser.Interface.Services;
|
||||||
using GalaSoft.MvvmLight.Messaging;
|
using GalaSoft.MvvmLight.Messaging;
|
||||||
|
|
||||||
namespace Filtration.ViewModels.ToolPanes
|
namespace Filtration.ViewModels.ToolPanes
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
using Castle.MicroKernel.Registration;
|
|
||||||
using Castle.MicroKernel.SubSystems.Configuration;
|
|
||||||
using Castle.Windsor;
|
|
||||||
using Filtration.Translators;
|
|
||||||
|
|
||||||
namespace Filtration.WindsorInstallers
|
|
||||||
{
|
|
||||||
public class TranslatorsInstaller : IWindsorInstaller
|
|
||||||
{
|
|
||||||
public void Install(IWindsorContainer container, IConfigurationStore store)
|
|
||||||
{
|
|
||||||
container.Register(
|
|
||||||
Component.For<IItemFilterScriptTranslator>()
|
|
||||||
.ImplementedBy<ItemFilterScriptTranslator>()
|
|
||||||
.LifeStyle.Singleton);
|
|
||||||
|
|
||||||
container.Register(
|
|
||||||
Component.For<IItemFilterBlockTranslator>()
|
|
||||||
.ImplementedBy<ItemFilterBlockTranslator>()
|
|
||||||
.LifeStyle.Singleton);
|
|
||||||
|
|
||||||
container.Register(
|
|
||||||
Component.For<IBlockGroupHierarchyBuilder>()
|
|
||||||
.ImplementedBy<BlockGroupHierarchyBuilder>()
|
|
||||||
.LifeStyle.Singleton);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue