Skip to content

Commit

Permalink
Merge branch 'release/0.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
takuya-takeuchi committed Mar 26, 2021
2 parents b6d19df + 82026f0 commit 81c91f0
Show file tree
Hide file tree
Showing 20 changed files with 7,152 additions and 115 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docfx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: DocFX

on:
push:
branches:
- master

jobs:
build:
runs-on: windows-2019

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: DocFX
shell: cmd
run: |
choco install docfx -y
docfx docfx\docfx.json
- name: Upload DocFX packages
uses: actions/upload-artifact@v2
with:
name: docfx_site
path: ${{ github.workspace }}\docfx\_site

- name: Publish Documentation on GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docfx/_site
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Takuya Takeuchi
Copyright (c) 2018-2021 Takuya Takeuchi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![Alt text](nuget/fingerprint48.png "WinBiometric.Net") WinBiometric.Net [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)]()
# ![Alt text](nuget/fingerprint48.png "WinBiometricDotNet") WinBiometricDotNet [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)]()

Windows Biometric Framework .NET wrapper

Expand Down
9 changes: 9 additions & 0 deletions docfx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###############
# folder #
###############
/**/DROP/
/**/TEMP/
/**/packages/
/**/bin/
/**/obj/
_site
10 changes: 10 additions & 0 deletions docfx/RunDocumentServer.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$Current = $PSScriptRoot

$WinBiometricDotNetRoot = Split-Path $Current -Parent
$SourceRoot = Join-Path $WinBiometricDotNetRoot sources
$WinBiometricDotNetProjectRoot = Join-Path $SourceRoot WinBiometricDotNet
$DocumentDir = Join-Path $WinBiometricDotNetProjectRoot docfx
$Json = Join-Path $Current docfx.json

docfx "${Json}" --serve
Set-Location $Current
69 changes: 69 additions & 0 deletions docfx/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"metadata": [
{
"src": [
{
"files": [
"**/WinBiometricDotNet.csproj"
],
"src": "../sources/WinBiometricDotNet"
}
],
"dest": "api",
"disableGitFeatures": false,
"disableDefaultFilter": false
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"globalMetadataFiles": [],
"globalMetadata": {
"_appTitle": "WinBiometricDotNet API Document",
"_appLogoPath": "images/logo.png"
},
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
Binary file added docfx/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docfx/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# WinBiometricDotNet API Document

Windows Biometric Framework .NET wrapper
5 changes: 5 additions & 0 deletions docfx/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# - name: Articles
# href: articles/
- name: Api Documentation
href: api/
# homepage: api/index.md
16 changes: 16 additions & 0 deletions nuget/CreateAllPackage.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$targets = @(
"WinBiometricDotNet"
)

$ScriptPath = $PSScriptRoot
$WinBiometricDotNetRoot = Split-Path $ScriptPath -Parent

$source = Join-Path $WinBiometricDotNetRoot sources | `
Join-Path -ChildPath WinBiometricDotNet
dotnet restore ${source}
dotnet build -c Release ${source}

foreach ($target in $targets)
{
pwsh CreatePackage.ps1 $target
}
43 changes: 43 additions & 0 deletions nuget/CreatePackage.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#***************************************
#Arguments
#%1: Package Name
#***************************************
Param
(
[Parameter(
Mandatory=$True,
Position = 1
)][string]
$Package
)

$nuspec = Join-Path nuspec "${Package}.nuspec"
if (!(Test-Path ${nuspec}))
{
Write-Host "Error: ${nuspec} does not exist" -ForegroundColor Red
exit -1
}

$nugetPath = Join-Path $PSScriptRoot nuget.exe
if (!(Test-Path ${nugetPath}))
{
Write-Host "Error: ${nugetPath} does not exist" -ForegroundColor Red
exit -1
}

Write-Host "${nuspec}" -ForegroundColor Green

if ($global:IsWindows)
{
Invoke-Expression "${nugetPath} pack ${nuspec}"
}
else
{
Invoke-Expression "mono ${nugetPath} pack ${nuspec}"
}

if ($lastexitcode -ne 0)
{
Write-Host "Failed '${nugetPath} pack ${nuspec}" -ForegroundColor Red
exit -1
}
38 changes: 38 additions & 0 deletions nuget/Publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#***************************************
#Arguments
#%1: Version of Release (1.2.3.0)
#***************************************
Param([Parameter(
Mandatory=$True,
Position = 1
)][string]
$Version
)

$PublishTargets = ( "WinBiometricDotNet"
)

$Token = $env:WinBiometricDotNetNugetToken
if ([string]::IsNullOrWhitespace($Token))
{
Write-Host "nuget token is missing" -ForegroundColor Red
exit
}

# Precheck whether all package is present
foreach ($Target in $PublishTargets)
{
$Package = Join-Path $PSScriptRoot "${Target}.${Version}.nupkg"
if (!(Test-Path ${Package}))
{
Write-Host "${Package} is missing" -ForegroundColor Red
exit
}
}

foreach ($Target in $PublishTargets)
{
$Package = Join-Path $PSScriptRoot "${Target}.${Version}.nupkg"
Write-Host "Publish ${Package}" -ForegroundColor Green
dotnet nuget push ${Package} -k $Token -s https://api.nuget.org/v3/index.json
}
Binary file modified nuget/fingerprint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nuget/nuget.exe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>WinBiometricDotNet</id>
<version>0.9.0</version>
<version>0.9.1</version>
<title>WinBiometricDotNet</title>
<authors>Takuya Takeuchi</authors>
<owners>Takuya Takeuchi</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
<license type="file">LICENSE.txt</license>
<projectUrl>https://github.com/takuya-takeuchi/WinBiometricDotNet</projectUrl>
<iconUrl>https://github.com/takuya-takeuchi/WinBiometricDotNet/blob/master/nuget/fingerprint128.png?raw=true</iconUrl>
<icon>images\fingerprint128.png</icon>
<description>Windows Bitometric Framework .NET wrapper</description>
<releaseNotes></releaseNotes>
<copyright>© Takuya Takeuchi 2018</copyright>
<copyright>© Takuya Takeuchi 2018-2021</copyright>
<tags>windowsbiometricframework wbf biometric</tags>
<serviceable>true</serviceable>
<dependencies>
Expand All @@ -22,8 +22,12 @@
</dependencies>
</metadata>
<files>
<file src="..\sources\WinBiometricDotNet\bin\Release\netstandard2.0\WinBiometricDotNet.dll" target="lib\netstandard2.0" />
<file src="..\sources\WinBiometricDotNet\bin\Release\netstandard2.0\WinBiometricDotNet.xml" target="lib\netstandard2.0" />
<file src="..\sources\WinBiometricDotNet\docs\ja\*.xml" target="lib\netstandard2.0\ja" />
<file src="..\fingerprint128.png" target="images\" />
<file src="..\..\sources\WinBiometricDotNet\bin\Release\netstandard2.0\WinBiometricDotNet.dll" target="lib\netstandard2.0" />
<file src="..\..\sources\WinBiometricDotNet\bin\Release\netstandard2.0\WinBiometricDotNet.xml" target="lib\netstandard2.0" />
<file src="..\..\sources\WinBiometricDotNet\docs\ja\*.xml" target="lib\netstandard2.0\ja" />

<!-- license -->
<file src="..\..\LICENSE.txt" target="" />
</files>
</package>
53 changes: 53 additions & 0 deletions sources/WinBiometricDotNet/DataFlags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System;
using WinBiometricDotNet.Interop;
using WINBIO_BIR_DATA_FLAGS = System.Byte;

namespace WinBiometricDotNet
{

/// <summary>
/// The <see cref="DataFlags"/> enumeration specifies the type of processing to be applied to the captured sample.
/// </summary>
[Flags]
public enum DataFlags : WINBIO_BIR_DATA_FLAGS
{

/// <summary>
/// The data is encrypted.
/// </summary>
Privacy = SafeNativeMethods.WINBIO_DATA_FLAG_PRIVACY,

/// <summary>
/// The data is digitally signed or is protected by a message authentication code (MAC).
/// </summary>
Integrity = SafeNativeMethods.WINBIO_DATA_FLAG_INTEGRITY,

/// <summary>
/// If this flag and the <see cref="Integrity"/> flag are set, the data is signed. If this flag is not set but the <see cref="Integrity"/> flag is set, a MAC is computed on the data.
/// </summary>
Signed = SafeNativeMethods.WINBIO_DATA_FLAG_SIGNED,

/// <summary>
/// The data is in the format with which it was captured.
/// </summary>
Raw = SafeNativeMethods.WINBIO_DATA_FLAG_RAW,

/// <summary>
/// The data is not raw but has not been completely processed.
/// </summary>
Intermediate = SafeNativeMethods.WINBIO_DATA_FLAG_INTERMEDIATE,

/// <summary>
/// The data has been processed.
/// </summary>
Processed = SafeNativeMethods.WINBIO_DATA_FLAG_PROCESSED,

/// <summary>
/// The flag mask.
/// </summary>
/// <remarks>This value is always one (1).</remarks>
OptionMaskPresent = SafeNativeMethods.WINBIO_DATA_FLAG_OPTION_MASK_PRESENT

}

}
Loading

0 comments on commit 81c91f0

Please sign in to comment.