-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from CluedIn-io/feature/Apply-Enricher-Provider
Apply Enricher Provider (AB#6516)
- Loading branch information
Showing
25 changed files
with
420 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<Project> | ||
<!-- Ensure the targets for Central package management are imported --> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.Build.CentralPackageVersions"/> | ||
<!-- Ensure the targets for Central package management are imported --> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.Build.CentralPackageVersions"/> | ||
|
||
<Target Name="ValidateAssemblyMeta" BeforeTargets="Build"> | ||
<Warning Code="CIQ0001" Text="`Product` [$(Product)] must be 'CluedIn'." Condition="'$(Product)' != 'CluedIn'"/> | ||
<Warning Code="CIQ0002" Text="`AssemblyTitle` [$(AssemblyTitle)] must match project name [$(MSBuildProjectName)]." Condition="'$(AssemblyTitle)' != '$(MSBuildProjectName)'"/> | ||
<Warning Code="CIQ0003" Text="`AssemblyName` [$(AssemblyName)] must match `Product.AssemblyTitle` [$(Product).$(AssemblyTitle)]." Condition="'$(AssemblyName)' != '$(Product).$(AssemblyTitle)'"/> | ||
<Warning Code="CIQ0004" Text="`RootNamespace` [$(RootNamespace)] must match `AssemblyName` [$(AssemblyName)]." Condition="'$(RootNamespace)' != '$(AssemblyName)'"/> | ||
</Target> | ||
|
||
<Target Name="ValidateAssemblyMeta" BeforeTargets="Build"> | ||
<Warning Code="CIQ0001" Text="`Product` [$(Product)] must be 'CluedIn'." Condition="'$(Product)' != 'CluedIn'"/> | ||
<Warning Code="CIQ0002" Text="`AssemblyTitle` [$(AssemblyTitle)] must match project name [$(MSBuildProjectName)]." Condition="'$(AssemblyTitle)' != '$(MSBuildProjectName)'"/> | ||
<Warning Code="CIQ0003" Text="`AssemblyName` [$(AssemblyName)] must match `Product.AssemblyTitle` [$(Product).$(AssemblyTitle)]." Condition="'$(AssemblyName)' != '$(Product).$(AssemblyTitle)'"/> | ||
<Warning Code="CIQ0004" Text="`RootNamespace` [$(RootNamespace)] must match `AssemblyName` [$(AssemblyName)]." Condition="'$(RootNamespace)' != '$(AssemblyName)'"/> | ||
</Target> | ||
|
||
<Target Name="ValidatePackMeta" BeforeTargets="Pack" Condition="'$(IsPackable)' == 'true'"> | ||
<Warning Code="CIQ1001" Text="`PackageId` [$(PackageId)] must match `AssemblyName` [$(AssemblyName)] for packable projects." Condition="'$(PackageId)' != '$(AssemblyName)'"/> | ||
<Warning Code="CIQ1002" Text="`PackageVersion` [$(PackageVersion)] must match `Version` [$(Version)] for packable projects." Condition="'$(PackageVersion)' != '$(Version)'"/> | ||
<Warning Code="CIQ1003" Text="`Authors` [$(Authors)] must match `Company` [$(Company)] for packable projects." Condition="'$(Authors)' != '$(Company)'"/> | ||
<Warning Code="CIQ1004" Text="`Title` [$(Title)] must match `RootNamespace` [$(RootNamespace)] for packable projects." Condition="'$(Title)' != '$(RootNamespace)'"/> | ||
<Warning Code="CIQ1005" Text="`Description` must be provided for packable projects." Condition="'$(Description)' == ''"/> | ||
<Warning Code="CIQ1006" Text="`Copyright` must be provided for packable projects." Condition="'$(Copyright)' == ''"/> | ||
</Target> | ||
<Target Name="ValidatePackMeta" BeforeTargets="Pack" Condition="'$(IsPackable)' == 'true'"> | ||
<Warning Code="CIQ1001" Text="`PackageId` [$(PackageId)] must match `AssemblyName` [$(AssemblyName)] for packable projects." Condition="'$(PackageId)' != '$(AssemblyName)'"/> | ||
<Warning Code="CIQ1002" Text="`PackageVersion` [$(PackageVersion)] must match `Version` [$(Version)] for packable projects." Condition="'$(PackageVersion)' != '$(Version)'"/> | ||
<Warning Code="CIQ1003" Text="`Authors` [$(Authors)] must match `Company` [$(Company)] for packable projects." Condition="'$(Authors)' != '$(Company)'"/> | ||
<Warning Code="CIQ1004" Text="`Title` [$(Title)] must match `RootNamespace` [$(RootNamespace)] for packable projects." Condition="'$(Title)' != '$(RootNamespace)'"/> | ||
<Warning Code="CIQ1005" Text="`Description` must be provided for packable projects." Condition="'$(Description)' == ''"/> | ||
<Warning Code="CIQ1006" Text="`Copyright` must be provided for packable projects." Condition="'$(Copyright)' == ''"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
### Features | ||
- Implemented Provider Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,41 @@ | ||
|
||
<Project> | ||
<PropertyGroup Label="Dependency Versions"> | ||
<_ComponentHost>2.0.0-alpha-14</_ComponentHost> | ||
<_AutoFixture>4.11.0</_AutoFixture> | ||
<_CluedIn>3.3.0-*</_CluedIn> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Dependency Versions"> | ||
<_ComponentHost>2.0.0</_ComponentHost> | ||
<_AutoFixture>4.11.0</_AutoFixture> | ||
<_CluedIn>3.3.0-alpha*</_CluedIn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- | ||
<ItemGroup> | ||
<!-- | ||
Specified versions for dependencies in test projects | ||
MUST SPECIFY IN CSPROJ AS <PackageReference Name="<depName>" /> | ||
--> | ||
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.5.0" /> | ||
<PackageReference Update="AutoFixture.Xunit2" Version="$(_AutoFixture)" /> | ||
<PackageReference Update="AutoFixture.Idioms" Version="$(_AutoFixture)" /> | ||
<PackageReference Update="AutoFixture.AutoMoq" Version="$(_AutoFixture)" /> | ||
<PackageReference Update="coverlet.msbuild" Version="2.8.0" /> | ||
<PackageReference Update="Serilog.Sinks.XUnit" Version="1.0.21" /> | ||
<PackageReference Update="xunit" Version="2.4.1" /> | ||
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" /> | ||
<PackageReference Update="Moq" Version="4.13.1" /> | ||
<PackageReference Update="Shouldly" Version="3.0.2" /> | ||
<PackageReference Update="CluedIn.Testing.Base" Version="$(_CluedIn)" /> | ||
</ItemGroup> | ||
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.5.0" /> | ||
<PackageReference Update="AutoFixture.Xunit2" Version="$(_AutoFixture)" /> | ||
<PackageReference Update="AutoFixture.Idioms" Version="$(_AutoFixture)" /> | ||
<PackageReference Update="AutoFixture.AutoMoq" Version="$(_AutoFixture)" /> | ||
<PackageReference Update="coverlet.msbuild" Version="2.8.0" /> | ||
<PackageReference Update="Serilog.Sinks.XUnit" Version="1.0.21" /> | ||
<PackageReference Update="xunit" Version="2.4.1" /> | ||
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" /> | ||
<PackageReference Update="Moq" Version="4.13.1" /> | ||
<PackageReference Update="Shouldly" Version="3.0.2" /> | ||
<PackageReference Update="CluedIn.Testing.Base" Version="$(_CluedIn)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<!-- | ||
<ItemGroup> | ||
<!-- | ||
Specified versions for dependencies across the solution | ||
MUST SPECIFY IN CSPROJ AS <PackageReference Name="<depName>" /> | ||
--> | ||
<PackageReference Update="ComponentHost" Version="$(_ComponentHost)" /> | ||
<PackageReference Update="CluedIn.Crawling" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.CrawlerIntegrationTesting" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Core" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Core.Agent" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Server" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Server.Common.WebApi" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.ExternalSearch" Version="$(_CluedIn)" /> | ||
<PackageReference Update="ComponentHost" Version="$(_ComponentHost)" /> | ||
<PackageReference Update="CluedIn.Crawling" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.CrawlerIntegrationTesting" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Core" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Core.Agent" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Server" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.Server.Common.WebApi" Version="$(_CluedIn)" /> | ||
<PackageReference Update="CluedIn.ExternalSearch" Version="$(_CluedIn)" /> | ||
|
||
</ItemGroup> | ||
</ItemGroup> | ||
</Project> |
52 changes: 52 additions & 0 deletions
52
src/ExternalSearch.Providers.GoogleMaps.Provider/GoogleMapsProviderProviderComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System.Reflection; | ||
using Castle.MicroKernel.Registration; | ||
using CluedIn.Core; | ||
using CluedIn.Core.Providers; | ||
using CluedIn.Core.Server; | ||
using CluedIn.ExternalSearch.Providers.GoogleMaps; | ||
using ComponentHost; | ||
using Constants = CluedIn.ExternalSearch.Providers.GoogleMaps.Constants; | ||
|
||
namespace CluedIn.Provider.GoogleMaps | ||
{ | ||
[Component(Constants.ComponentName, "Providers", ComponentType.Service, ServerComponents.ProviderWebApi, Components.Server, Components.DataStores, Isolation = ComponentIsolation.NotIsolated)] | ||
public sealed class GoogleMapsProviderProviderComponent : ServiceApplicationComponent<IServer> | ||
{ | ||
/********************************************************************************************************** | ||
* CONSTRUCTOR | ||
**********************************************************************************************************/ | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="GoogleMapsProviderProviderComponent" /> class. | ||
/// </summary> | ||
/// <param name="componentInfo">The component information.</param> | ||
public GoogleMapsProviderProviderComponent(ComponentInfo componentInfo) : base(componentInfo) | ||
{ | ||
// Dev. Note: Potential for compiler warning here ... CA2214: Do not call overridable methods in constructors | ||
// this class has been sealed to prevent the CA2214 waring being raised by the compiler | ||
Container.Register(Component.For<GoogleMapsProviderProviderComponent>().Instance(this)); | ||
} | ||
|
||
/********************************************************************************************************** | ||
* METHODS | ||
**********************************************************************************************************/ | ||
|
||
/// <summary>Starts this instance.</summary> | ||
public override void Start() | ||
{ | ||
var asm = Assembly.GetAssembly(typeof(GoogleMapsProviderProviderComponent)); | ||
Container.Register(Types.FromAssembly(asm).BasedOn<IProvider>().WithServiceFromInterface().If(t => !t.IsAbstract).LifestyleSingleton()); | ||
|
||
State = ServiceState.Started; | ||
} | ||
|
||
/// <summary>Stops this instance.</summary> | ||
public override void Stop() | ||
{ | ||
if (State == ServiceState.Stopped) | ||
return; | ||
|
||
State = ServiceState.Stopped; | ||
} | ||
} | ||
} |
Oops, something went wrong.