generated from jfversluis/Plugin.Maui.Feature
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup common project for both implementations for Xamarin
- Loading branch information
Showing
5 changed files
with
138 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Plugin.Shared.OCR; | ||
|
||
namespace Plugin.Xamarin.OCR; | ||
|
||
partial class OcrImplementation : IOcrService | ||
{ | ||
public Task InitAsync(CancellationToken ct = default) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public Task<OcrResult> RecognizeTextAsync(byte[] imageData, CancellationToken ct = default) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
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,19 @@ | ||
using System; | ||
using Plugin.Shared.OCR; | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
|
||
namespace Plugin.Xamarin.OCR; | ||
|
||
partial class OcrImplementation : IOcrService | ||
{ | ||
public Task InitAsync(CancellationToken ct = default) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public Task<OcrResult> RecognizeTextAsync(byte[] imageData, CancellationToken ct = default) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
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,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Plugin.Shared.OCR; | ||
|
||
namespace Plugin.Xamarin.OCR; | ||
|
||
public static class OCR | ||
{ | ||
static IOcrService? s_defaultImplementation; | ||
|
||
/// <summary> | ||
/// Provides the default implementation for static usage of this API. | ||
/// </summary> | ||
public static IOcrService Default => | ||
s_defaultImplementation ??= new OcrImplementation(); | ||
|
||
internal static void SetDefault(IOcrService? implementation) => | ||
s_defaultImplementation = implementation; | ||
} |
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,74 @@ | ||
<Project Sdk="MSBuild.Sdk.Extras/3.0.22"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;Xamarin.iOS10;MonoAndroid13.0</TargetFrameworks> | ||
<LangVersion>latest</LangVersion> | ||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<!-- NuGet --> | ||
<Authors>kfrancis</Authors> | ||
<Copyright>Copyright © Kori Francis</Copyright> | ||
<IsPackable>True</IsPackable> | ||
<PackageProjectUrl>https://github.com/kfrancis/ocr</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/kfrancis/ocr</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>dotnet-maui;maui;plugin;</PackageTags> | ||
<IncludeSymbols>True</IncludeSymbols> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<Title>.NET Xamarin OCR Plugin</Title> | ||
<Description>Plugin.Xamarin.OCR provides the ability to perform OCR on an image using platform API.</Description> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> | ||
<DebugType>portable</DebugType> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
|
||
</PropertyGroup> | ||
|
||
<!-- Package additions --> | ||
<ItemGroup> | ||
<None Include="..\..\nuget.png" PackagePath="icon.png" Pack="true" /> | ||
<None Include="..\..\README.md" Pack="true" PackagePath="\" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="**\*.shared.cs" /> | ||
<Compile Include="**\*.shared.*.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) "> | ||
<Compile Include="**\*.netstandard.cs" /> | ||
<Compile Include="**\*.netstandard.*.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) "> | ||
<Compile Include="**\*.android.cs" /> | ||
<Compile Include="**\*.android.*.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" $(TargetFramework.StartsWith('Xamarin.iOS')) "> | ||
<Compile Include="**\*.ios.cs" /> | ||
<Compile Include="**\*.ios.*.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="Ocr.shared.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Plugin.Shared.OCR\Plugin.Shared.OCR.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |