diff --git a/.forgejo/workflows/buildAndTest.yml b/.forgejo/workflows/buildAndTest.yml
index a0f3a375..86694c89 100644
--- a/.forgejo/workflows/buildAndTest.yml
+++ b/.forgejo/workflows/buildAndTest.yml
@@ -25,9 +25,9 @@ on:
jobs:
build:
-
runs-on: docker
-
+ container:
+ image: pazof/yavsc-build-env:debian13-dotnet10-android36-jdk21-v1
steps:
- name: Clone yavsc
run: |
@@ -39,10 +39,9 @@ jobs:
git checkout FETCH_HEAD
fi
git submodule update --init --recursive
- echo "Checked out at $(git rev-parse HEAD) on $(git branch --show-current 2>/dev/null || echo detached HEAD)"
- - name: Restore dependencies
- run: cd /src/_src && dotnet restore
- - name: Build
- run: cd /src/_src && dotnet build --no-restore
+ echo "✅ Checked out at $(git rev-parse HEAD) on $(git branch --show-current 2>/dev/null || echo detached HEAD)"
+
- name: Test
- run: cd /src/_src && dotnet test --no-build --verbosity normal
+ run: |
+ echo "🚀 Lancement des tests..."
+ cd /src/_src && dotnet test --verbosity normal && echo "✅ Success !"
diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml
index 3d4fc0ac..930c97b9 100644
--- a/.forgejo/workflows/release.yml
+++ b/.forgejo/workflows/release.yml
@@ -51,6 +51,8 @@ jobs:
# via l'API REST Forgejo (pas d'actions tierces Node).
release:
runs-on: docker
+ container:
+ image: pazof/yavsc-build-env:debian13-dotnet10-android36-jdk21-v1
steps:
- name: Clone du repo au tag demandé
env:
@@ -194,10 +196,10 @@ jobs:
# la racine du checkout pour que l'étape d'upload le trouve.
run: |
cd /src/_src
- APK=src/PostIt/PostIt.Android/bin/Release/net10.0-android/android-arm64/com.CompanyName.PostIt-Signed.apk
+ APK=src/PostIt/PostIt.Android/bin/Release/net10.0-android/android-arm64/fr.pschneider.postit-Signed.apk
if [[ ! -f "$APK" ]]; then
echo "::error::APK not found at $APK"
- ls -la src/PostIt/PostIt.Android/bin/Release/net10.0-android/ 2>/dev/null || true
+ ls -la src/PostIt/PostIt.Android/bin/Release/net10.0-android/android-arm64 2>/dev/null || true
exit 1
fi
cp "$APK" /src/_src/PostIt.Android.apk
diff --git a/.github/workflows/docker-publish-android.yml b/.github/workflows/docker-publish-android.yml
index b9ee364c..a4ce15aa 100644
--- a/.github/workflows/docker-publish-android.yml
+++ b/.github/workflows/docker-publish-android.yml
@@ -40,7 +40,7 @@ jobs:
- name: Extraire l'APK du conteneur Docker
run: |
docker create --name extractor postit-android
- docker cp extractor:/src/src/PostIt/PostIt.Android/bin/Release/net10.0-android/android-arm64/com.CompanyName.PostIt-Signed.apk ./PostIt.Android.apk
+ docker cp extractor:/src/src/PostIt/PostIt.Android/bin/Release/net10.0-android/android-arm64/fr.pschneider.postit-Signed.apk ./PostIt.Android.apk
docker rm extractor
- name: Téléverser l'APK en tant qu'Artéfact GitHub
diff --git a/.gitignore b/.gitignore
index a94475e3..b7813f60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,6 @@ DataDir/
*.tests.trx
*.tests.html
+
+*.log
+
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 76dc08d5..dc8d3c68 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,33 +1,57 @@
{
- // Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
- // Pointez pour afficher la description des attributs existants.
- // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "API",
- "type": "dotnet",
- "request": "launch",
- "projectPath": "${workspaceFolder}/src/Api/Api.csproj"
- },
- {
- "name": "Yavsc.Org",
- "type": "dotnet",
- "request": "launch",
- "projectPath": "${workspaceFolder}/src/Yavsc.Org/Yavsc.Org.csproj",
- },
- {
- "name": "Yavsc.Blogs",
- "type": "dotnet",
- "request": "launch",
- "projectPath": "${workspaceFolder}/src/Yavsc.Blogs/Yavsc.Blogs.csproj"
- },
- {
- "name": "PostIt",
- "type": "dotnet",
- "request": "launch",
- "projectPath": "${workspaceFolder}/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj",
-
- }
- ]
+ // Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
+ // Pointez pour afficher la description des attributs existants.
+ // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Android Debug",
+ "type": "mono",
+ "preLaunchTask": "run-debug-android",
+ "request": "attach",
+ "address": "localhost",
+ "port": 55555
+ },
+ {
+ "name": "Android Attach - Debug",
+ "type": "mono",
+ "request": "attach",
+ "address": "localhost",
+ "port": 55555
+ },
+ {
+ "name": "API",
+ "type": "dotnet",
+ "request": "launch",
+ "projectPath": "${workspaceFolder}/src/Api/Api.csproj"
+ },
+ {
+ "name": "Yavsc Org",
+ "type": "dotnet",
+ "request": "launch",
+ "projectPath": "${workspaceFolder}/src/Yavsc.Org/Yavsc.Org.csproj",
+ },
+ {
+ "name": "Yavsc Blogs",
+ "type": "dotnet",
+ "request": "launch",
+ "projectPath": "${workspaceFolder}/src/Yavsc.Blogs/Yavsc.Blogs.csproj"
+ },
+ {
+ "name": "PostIt Desktop",
+ "type": "dotnet",
+ "request": "launch",
+ "projectPath": "${workspaceFolder}/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj",
+ },
+ {
+ "name": "Test PostIt.Android launch (Xamarin.UITest)",
+ "type": "coreclr",
+ "request": "launch",
+ "program": "${workspaceFolder}/src/PostIt/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/src/PostIt/PostIt.Tests",
+ "console": "integratedTerminal",
+ "stopAtEntry": false
+ }
+ ]
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 16bbe483..915683fc 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -5,6 +5,7 @@
"appsettings",
"asciidoctor",
"ASPNETCORE",
+ "Avalonia",
"Configurabilité",
"Cratie",
"DESTDIR",
@@ -15,6 +16,7 @@
"Hsts",
"Newtonsoft",
"Npgsql",
+ "Oidc",
"PKCE",
"postit",
"pschneider",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index e45a9921..3c0c0bf2 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,6 +1,42 @@
{
"version": "2.0.0",
"tasks": [
+ {
+ "label": "run-debug-android",
+ "command": "dotnet",
+ "type": "shell",
+ "options": {
+ "cwd": "${workspaceFolder}/src/PostIt/PostIt.Android",
+ "env": {
+ "DOTNET_HOST_PATH": "/usr/share/dotnet",
+ "ANDROID_HOME": "/opt/android-sdk",
+ "JAVA_HOME": "/usr/lib/jvm/java-1.25.0-openjdk-amd64"
+ }
+ },
+ "args": [
+ "run",
+ "-p:TargetFramework=net10.0-android",
+ "-p:Configuration=Debug",
+ "-p:AndroidAttachDebugger=true",
+ "-p:AndroidSdbHostPort=55555",
+ "-p:AndroidSdbTargetPort=55555"
+ ],
+ "problemMatcher": [
+ {
+ "owner": "dotnet",
+ "fileLocation": ["relative", "${workspaceFolder}"],
+ "source": "dotnet",
+ "pattern": {
+ "regexp": "^(.*):(\\d+):(\\d+):\\s+(error):\\s+(.*)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "message": 5
+ }
+ }
+ ]
+ },
{
"label": "build",
"command": "dotnet",
@@ -39,59 +75,6 @@
"kind": "build"
},
"isBackground": true
- },
- {
- "label": "test blogs",
- "type": "process",
- "problemMatcher": ["$msCompile"],
- "command": "dotnet",
- "args": ["test"],
- "runOptions": {
- "instanceLimit": 1
- },
- "options": {
- "cwd": "src/Yavsc.Blogs",
- "env": {
- "DOTNET_CLI_UI_LANGUAGE": "en-US",
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "group": {
- "kind": "test"
- },
- "isBackground": true,
- "presentation": {
- "echo": true,
- "reveal": "always",
- "focus": false,
- "panel": "shared",
- "showReuseMessage": true,
- "clear": false
- }
- },
- {
- "label": "publish",
- "command": "dotnet",
- "type": "process",
- "args": [
- "publish",
- "/property:GenerateFullPaths=true",
- "/consoleloggerparameters:NoSummary;ForceNoAlign"
- ],
- "problemMatcher": "$msCompile"
- },
- {
- "label": "watch",
- "command": "dotnet",
- "type": "process",
- "args": ["watch", "--project",
- "src/Yavsc.Org/Yavsc.Org.csproj"
- ],
- "problemMatcher": "$msCompile",
- "runOptions": {
-
- }
-
}
]
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e2a446a0..6adf462a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,24 @@ Cette convention est partagée avec le dépôt
[`postit-debian`](https://forgejo.pschneider.fr/notazof/postit-debian)
pour la production des paquets `.deb`.
+## [1.0.8-rc3] - unstable
+
+### Added
+
+* a code cleanup,
+* a first Xamarin.UITest is successful, but disabled, because breaking the actual CI process,
+* Android app starts, the login process succeeds
+
+### Changed
+
+L'identifiant de l'application client Android a changé, il passe en minuscules :
+`fr.pschneider.postit`
+
+### Fixed
+
+nothing, [TODO] a bug persists laoding a blog post from PostIt, ACL sould come along with and should not need any "Refresh" button.
+Today, assigning ACL succeeds the first time, the following times result in a 409
+
## [1.0.8-rc1] - unstable
### Added
diff --git a/Directory.Build.props b/Directory.Build.props
index aec8c990..0ce825bd 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,6 +11,6 @@
from without conflicting names.
-->
true
- NU1701, NU1901, NU1902
+ NU1701, NU1901, NU1902, NU1507
diff --git a/external/dotnet-android-build-image b/external/dotnet-android-build-image
deleted file mode 160000
index 0695a6c1..00000000
--- a/external/dotnet-android-build-image
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 0695a6c1fea6508f1a88f7ad0ad9cb93733aa52d
diff --git a/src/PostIt.Tests/Directory.Packages.props b/src/PostIt.Tests/Directory.Packages.props
deleted file mode 100644
index 15c4e24b..00000000
--- a/src/PostIt.Tests/Directory.Packages.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/PostIt.Tests/pslist b/src/PostIt.Tests/pslist
deleted file mode 100644
index 0f1d73da..00000000
--- a/src/PostIt.Tests/pslist
+++ /dev/null
@@ -1,94 +0,0 @@
-UID PID PPID C STIME TTY TIME CMD
-paul 1155 1 0 13:18 ? 00:00:00 /usr/lib/systemd/systemd --user
-paul 1168 1155 0 13:18 ? 00:00:00 (sd-pam)
-paul 1361 1155 0 13:18 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
-paul 1364 1155 1 13:18 ? 00:01:19 /home/paul/.nvm/versions/node/v22.23.0/bin/node /home/paul/.nvm/versions/node/v22.23.0/lib/node_modules/openclaw/dist/index.js gateway --port 18789
-paul 1367 1155 0 13:18 ? 00:00:00 /usr/bin/pipewire
-paul 1372 1155 0 13:18 ? 00:00:00 /usr/bin/pipewire -c filter-chain.conf
-paul 1373 1155 0 13:18 ? 00:00:00 /usr/bin/wireplumber
-paul 1374 1155 0 13:18 ? 00:00:00 /usr/bin/pipewire-pulse
-paul 1444 1155 0 13:18 ? 00:00:00 /usr/bin/mpris-proxy
-paul 2593 1155 0 13:19 ? 00:00:00 /usr/bin/gnome-keyring-daemon --foreground --components=pkcs11,secrets --control-directory=/run/user/1000/keyring
-paul 2608 2487 0 13:19 tty2 00:00:00 /usr/libexec/gdm-x-session --run-script /usr/bin/gnome-session
-paul 2617 2608 1 13:19 tty2 00:01:12 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
-paul 2647 2608 0 13:19 tty2 00:00:00 /usr/libexec/gnome-session-binary
-paul 2785 1155 0 13:19 ? 00:00:00 /usr/libexec/at-spi-bus-launcher
-paul 2792 2785 0 13:19 ? 00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus_1
-paul 2802 1155 0 13:19 ? 00:00:00 /usr/libexec/gcr-ssh-agent --base-dir /run/user/1000/gcr
-paul 2803 1155 0 13:19 ? 00:00:00 /usr/libexec/gnome-session-ctl --monitor
-paul 2804 1155 0 13:19 ? 00:00:00 /usr/bin/ssh-agent -D
-paul 2814 1155 0 13:19 ? 00:00:00 /usr/libexec/gvfsd
-paul 2828 1155 0 13:19 ? 00:00:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f
-paul 2838 1155 0 13:19 ? 00:00:00 /usr/libexec/gnome-session-binary --systemd-service --session=gnome
-paul 2874 1155 3 13:19 ? 00:02:13 /usr/bin/gnome-shell
-paul 2896 2874 0 13:19 ? 00:00:01 /usr/libexec/mutter-x11-frames
-paul 2902 1155 0 13:19 ? 00:00:00 /usr/libexec/at-spi2-registryd --use-gnome-session
-paul 2918 1155 0 13:19 ? 00:00:00 /usr/libexec/xdg-desktop-portal
-paul 2933 1155 0 13:19 ? 00:00:00 /usr/libexec/xdg-permission-store
-paul 2938 1155 0 13:19 ? 00:00:00 /usr/libexec/xdg-document-portal
-paul 2971 1155 0 13:19 ? 00:00:00 /usr/libexec/gnome-shell-calendar-server
-paul 2976 1155 0 13:19 ? 00:00:00 /usr/libexec/dconf-service
-paul 2992 1155 0 13:19 ? 00:00:00 /usr/libexec/evolution-source-registry
-paul 2994 1155 0 13:19 ? 00:00:00 /usr/bin/gjs -m /usr/share/gnome-shell/org.gnome.Shell.Notifications
-paul 3012 1155 0 13:19 ? 00:00:12 /usr/bin/ibus-daemon --panel disable --xim
-paul 3013 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-a11y-settings
-paul 3014 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-color
-paul 3015 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-datetime
-paul 3016 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-housekeeping
-paul 3018 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-keyboard
-paul 3024 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-media-keys
-paul 3025 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-power
-paul 3027 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-print-notifications
-paul 3029 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-rfkill
-paul 3030 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-screensaver-proxy
-paul 3035 2838 0 13:19 ? 00:00:05 /usr/bin/gnome-software --gapplication-service
-paul 3037 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-sharing
-paul 3042 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-smartcard
-paul 3048 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-sound
-paul 3054 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-usb-protection
-paul 3057 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-wacom
-paul 3058 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-xsettings
-paul 3059 2838 0 13:19 ? 00:00:00 /usr/libexec/evolution-data-server/evolution-alarm-notify
-paul 3064 2838 0 13:19 ? 00:00:00 /usr/bin/kalendarac
-paul 3070 2838 0 13:19 ? 00:00:00 /usr/libexec/gsd-disk-utility-notify
-paul 3088 2838 0 13:19 ? 00:00:00 /usr/bin/kdeconnectd
-paul 3168 1155 0 13:19 ? 00:00:00 /usr/bin/gjs -m /usr/share/gnome-shell/org.gnome.ScreenSaver
-paul 3172 1155 0 13:19 ? 00:00:00 /usr/libexec/gsd-printer
-paul 3207 3012 0 13:19 ? 00:00:00 /usr/libexec/ibus-memconf
-paul 3208 3012 0 13:19 ? 00:00:06 /usr/libexec/ibus-extension-gtk3
-paul 3214 1155 0 13:19 ? 00:00:00 /usr/libexec/ibus-x11 --kill-daemon
-paul 3216 1155 0 13:19 ? 00:00:00 /usr/libexec/ibus-portal
-paul 3218 1155 0 13:19 ? 00:00:00 /usr/libexec/localsearch-3
-paul 3219 1155 0 13:19 ? 00:00:00 /usr/libexec/xdg-desktop-portal-gnome
-paul 3241 1155 0 13:19 ? 00:00:00 /usr/libexec/gvfs-udisks2-volume-monitor
-paul 3251 1155 0 13:19 ? 00:00:00 /usr/libexec/gvfs-mtp-volume-monitor
-paul 3259 1155 0 13:19 ? 00:00:00 /usr/libexec/gvfs-gphoto2-volume-monitor
-paul 3265 1155 0 13:20 ? 00:00:00 /usr/libexec/gvfs-goa-volume-monitor
-paul 3271 1155 0 13:20 ? 00:00:00 /usr/libexec/goa-daemon
-paul 3280 1155 0 13:20 ? 00:00:00 /usr/libexec/goa-identity-service
-paul 3287 1155 0 13:20 ? 00:00:00 /usr/libexec/gvfs-afc-volume-monitor
-paul 3303 3012 0 13:20 ? 00:00:02 /usr/libexec/ibus-engine-simple
-paul 3372 1155 0 13:20 ? 00:00:00 /usr/libexec/xdg-desktop-portal-gtk
-paul 3441 1155 0 13:20 ? 00:00:00 /usr/libexec/gvfsd-metadata
-paul 3453 1155 0 13:20 ? 00:00:00 /usr/libexec/evolution-calendar-factory
-paul 3495 1155 0 13:20 ? 00:00:00 /usr/libexec/evolution-addressbook-factory
-paul 4798 1155 0 13:26 ? 00:00:09 /usr/libexec/gnome-terminal-server
-paul 4810 4798 0 13:26 pts/0 00:00:00 bash
-paul 8614 1155 0 13:29 ? 00:00:01 /usr/bin/speech-dispatcher -s -t 0
-paul 8656 8614 0 13:29 ? 00:00:00 [sd_espeak-ng-mb]
-paul 8709 8614 0 13:29 ? 00:00:00 /usr/lib/speech-dispatcher-modules/sd_espeak-ng /etc/speech-dispatcher/modules/espeak-ng.conf
-paul 8785 8614 0 13:29 ? 00:00:00 /usr/lib/speech-dispatcher-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf
-paul 8799 8614 0 13:29 ? 00:00:00 /usr/lib/speech-dispatcher-modules/sd_espeak-ng /etc/speech-dispatcher/modules/
-paul 10028 1155 0 13:31 ? 00:00:00 adb -L tcp:5037 fork-server server --reply-fd 4
-paul 69578 2814 0 13:53 ? 00:00:00 /usr/libexec/gvfsd-http --spawner :1.22 /org/gtk/gvfs/exec_spaw/0
-paul 108341 1155 3 14:06 ? 00:00:48 /home/paul/.nvm/versions/node/v22.23.0/bin/node /home/paul/.nvm/versions/node/v22.23.0/lib/node_modules/acpx/dist/cli.js __queue-owner
-paul 108416 108341 0 14:06 ? 00:00:00 openclaw
-paul 108458 108416 2 14:06 ? 00:00:37 openclaw-acp
-paul 143553 1155 0 14:19 ? 00:00:05 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmpI2JxLw.tmp
-paul 149205 1155 0 14:21 ? 00:00:05 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmpitRyQG.tmp
-paul 151724 1155 0 14:22 ? 00:00:04 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmpJEsOZV.tmp
-paul 157447 1155 1 14:24 ? 00:00:05 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmpyM92DV.tmp
-paul 165231 1155 0 14:26 ? 00:00:01 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmp5CKC19.tmp
-paul 168472 1155 4 14:27 ? 00:00:09 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmpuRJsnQ.tmp
-paul 172147 1155 4 14:29 pts/0 00:00:05 /home/paul/Workspace/yavsc/src/PostIt.Tests/bin/Debug/net10.0/PostIt.Tests @@ /tmp/tmpxT8nje.tmp
-paul 172435 4810 99 14:31 pts/0 00:00:00 ps -fu paul
diff --git a/src/PostIt/Directory.Packages.props b/src/PostIt/Directory.Packages.props
index 88e06195..0d5fa50c 100644
--- a/src/PostIt/Directory.Packages.props
+++ b/src/PostIt/Directory.Packages.props
@@ -1,21 +1,39 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ true
+ 12.1.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/PostIt/Makefile b/src/PostIt/Makefile
new file mode 100644
index 00000000..1217976b
--- /dev/null
+++ b/src/PostIt/Makefile
@@ -0,0 +1,178 @@
+
+# Cibles pour installer PostIt.Android en Debug sur l'AVD qemu.
+#
+# Usage typique :
+# make qemu # lance l'AVD, attend le boot, build l'APK, l'installe
+# make android-install # (re)build l'APK et l'installe (AVD doit tourner)
+# make android-build # build l'APK seul (sans install)
+# make qemu-run # démarre l'AVD en background
+# make qemu-stop # arrête l'émulateur
+# make qemu-wait-boot # attend que l'AVD ait fini de booter
+#
+# Variables surchargeables (make VAR=valeur) :
+# AVD_NAME default: postit_test_avd
+# (l'AVD doit être listé par `avdmanager list avd`)
+# ADB_SERIAL default: emulator-5554
+# (port standard du premier émulateur lancé)
+# ANDROID_HOME default: /opt/android-sdk
+# (le SDK Android local; doit contenir
+# emulator/emulator et platform-tools/adb)
+# POSTIT_RID default: android-x64
+# (doit matcher l'ABI de l'AVD; `avdmanager list avd`
+# affiche la ligne Tag/ABI)
+# EMU_HEADLESS default: 0
+# (1 = lancer l'émulateur sans fenêtre, pour scripter)
+# CONFIG surcharge la variable CONFIG globale (Debug par
+# défaut dans ce Makefile). Passer à Release pour
+# un APK optimisé et signé release.
+# LOGCAT_LINES default: 200
+# (nombre de lignes dumpées par `make qemu-logcat`)
+# LOGCAT_FOLLOW default: 0
+# (1 = stream live via `make logcat`,
+# sinon dump one-shot des N dernières lignes)
+# LOGCAT_BOOT_WAIT default: 30
+# (secondes d'attente entre le clear du buffer,
+# le `am start`, et le dump final dans
+# `make qemu-logcat-boot`)
+AVD_NAME ?= postit_test_avd
+ADB_SERIAL ?= emulator-5554
+ANDROID_HOME ?= /opt/android-sdk
+POSTIT_RID ?= android-x64
+EMU_HEADLESS ?= 0
+LOGCAT_LINES ?= 600
+LOGCAT_FOLLOW ?= 0
+LOGCAT_BOOT_WAIT ?= 30
+
+ANDROID_PACKAGE_NAME = fr.pschneider.postit
+POSTIT_ANDROID_CSPROJ := PostIt.Android/PostIt.Android.csproj
+POSTIT_APK_DIR := PostIt.Android/bin/$(CONFIG)/net10.0-android/$(POSTIT_RID)
+POSTIT_APK := $(POSTIT_APK_DIR)/$(ANDROID_PACKAGE_NAME)-Signed.apk
+
+clean: clean-PostIt clean-PostIt.Android clean-PostIt.Desktop
+
+clean-%:
+ rm -rf $*/obj $*/bin
+
+qemu-run:
+ @echo " Starting AVD $(AVD_NAME) on $(ADB_SERIAL)..."
+ @mkdir -p /tmp/yavsc-emu
+ @EMU_ARGS=""; \
+ if [ "$(EMU_HEADLESS)" = "1" ]; then EMU_ARGS="-no-window -no-audio"; fi; \
+ $(ANDROID_HOME)/emulator/emulator -avd $(AVD_NAME) $$EMU_ARGS \
+ >/tmp/yavsc-emu/$(AVD_NAME).log 2>&1 & \
+ echo " ✅ Started emulator PID: $$!"
+
+qemu-stop:
+ adb -s $(ADB_SERIAL) emu kill
+ echo " ✅ Stopped emulator"
+
+qemu-wait-boot:
+ @echo " Waiting for $(ADB_SERIAL) to finish booting..."
+ adb -s $(ADB_SERIAL) wait-for-device
+ @for i in $$(seq 1 180); do \
+ BOOTED=$$(adb -s $(ADB_SERIAL) shell getprop sys.boot_completed 2>/dev/null | tr -d '\r\n'); \
+ if [ "$$BOOTED" = "1" ]; then \
+ echo " ✓ booted in $${i}s"; \
+ exit 0; \
+ fi; \
+ sleep 1; \
+ done; \
+ echo " 👿 ERROR: device did not boot within 180s." >&2; \
+ echo " Logs: /tmp/yavsc-emu/$(AVD_NAME).log" >&2; \
+ exit 1
+
+android-build:
+ # EmbedAssembliesIntoApk=true: without this, the Debug APK ships
+ # without the managed assemblies in it (they are pushed at runtime
+ # via `adb push`, "Fast Deployment"). On the qemu emulator, the
+ # runtime cannot find them in `files/.__override__//` and
+ # aborts at startup with "No assemblies found in '.__override__'"
+ # (monodroid-glue.cc:757, SIGABRT). Forcing this property on
+ # packages the .dlls into the APK as `assemblies//` so the
+ # runtime reads them directly.
+ #
+ # The Xamarin.Android SDK property is `EmbedAssembliesIntoApk`,
+ # not `AndroidEnableFastDeployment` (which exists in older
+ # templates but is a no-op in the .NET 10 SDK).
+ dotnet build $(POSTIT_ANDROID_CSPROJ) \
+ -c $(CONFIG) \
+ -p:RuntimeIdentifier=$(POSTIT_RID) \
+ -p:EmbedAssembliesIntoApk=true \
+ --nologo
+ @if [ ! -f "$(POSTIT_APK)" ]; then \
+ echo " APK not found at $(POSTIT_APK)." >&2; \
+ echo " Files in $(POSTIT_APK_DIR):" >&2; \
+ ls -la "$(POSTIT_APK_DIR)" 2>/dev/null || echo " (directory does not exist)" >&2; \
+ exit 1; \
+ fi
+
+
+android-install: android-build
+ @echo " Installing $(POSTIT_APK) on $(ADB_SERIAL)..."
+ adb -s $(ADB_SERIAL) install -r "$(POSTIT_APK)" -r
+ @echo " ✅ PostIt.Android installed on $(ADB_SERIAL)"
+
+qemu-uninstall:
+ adb -s $(ADB_SERIAL) uninstall $(ANDROID_PACKAGE_NAME)
+
+# Dump recent logcat output for the running PostIt.Android process.
+# By default, prints the last $(LOGCAT_LINES) lines (one-shot, with
+# `-d`). Set LOGCAT_FOLLOW=1 to follow the stream live instead.
+# Filtering is by PID (pidof $(ANDROID_PACKAGE_NAME)), not by tag,
+# because Mono/Xamarin can emit logs under several tags
+# (mono, PostIt.Android, Avalonia.Android) and tag-based filtering
+# would miss the ones not matching. PID-based filtering is exact.
+# If the app is not running, pidof returns empty and logcat exits
+# silently with no output; that is the expected behaviour for
+# "no logs yet".
+logcat:
+ @PID=$$(adb -s $(ADB_SERIAL) shell pidof $(ANDROID_PACKAGE_NAME) 2>/dev/null | tr -d '\r\n'); \
+ if [ -z "$$PID" ]; then \
+ echo " $(ANDROID_PACKAGE_NAME) is not running on $(ADB_SERIAL)."; \
+ echo " Start the app first (am start -n $(ANDROID_PACKAGE_NAME)/PostIt.Android.PostItMainActivity)"; \
+ exit 1; \
+ fi; \
+ echo " Following PID $$PID (LOGCAT_FOLLOW=$(LOGCAT_FOLLOW), LOGCAT_LINES=$(LOGCAT_LINES))"; \
+ if [ "$(LOGCAT_FOLLOW)" = "1" ]; then \
+ adb -s $(ADB_SERIAL) logcat -v time --pid=$$PID $(ANDROID_PACKAGE_NAME); \
+ else \
+ adb -s $(ADB_SERIAL) logcat -d -v time -t $(LOGCAT_LINES) --pid=$$PID $(ANDROID_PACKAGE_NAME); \
+ fi
+
+# Clear logcat, launch PostIt.Android, then dump everything that was
+# emitted during the startup window. Targets the "démarrage KO" case
+# where the process starts but Avalonia never renders a frame — the
+# logcat trace from process start to first frame is what diagnoses it.
+#
+# Override LOGCAT_BOOT_WAIT to extend the post-launch wait
+# (default 15s; raise to 30+ if the device is slow to boot Avalonia).
+LOGCAT_BOOT_WAIT ?= 15
+
+
+android-start:
+ @echo " Clearing logcat buffer..."
+ adb -s $(ADB_SERIAL) logcat -c
+ @echo " Launching $(ANDROID_PACKAGE_NAME)..."
+ adb -s $(ADB_SERIAL) shell am start \
+ -n $(ANDROID_PACKAGE_NAME)/PostIt.Android.PostItMainActivity
+ @echo " ✅ $(ANDROID_PACKAGE_NAME) started on $(ADB_SERIAL)"
+
+qemu-logcat-boot: android-start
+ @echo " Waiting $(LOGCAT_BOOT_WAIT)s for the app to start rendering..."
+ @sleep $(LOGCAT_BOOT_WAIT)
+
+ @echo " Dumping logcat (PostIt PID + system buffer):"
+ @PID=$$(adb -s $(ADB_SERIAL) shell pidof $(ANDROID_PACKAGE_NAME) 2>/dev/null | tr -d '\r\n'); \
+ if [ -n "$$PID" ]; then \
+ echo " ✅ (PID $$PID at dump time)"; \
+ sleep 10; \
+ adb -s $(ADB_SERIAL) logcat -d -v time -t $(LOGCAT_LINES) --pid=$$PID; \
+ else \
+ echo " 👿 (PostIt process not running at dump time — dumping last $(LOGCAT_LINES) lines unfiltered)"; \
+ adb -s $(ADB_SERIAL) logcat -d -v time -t $(LOGCAT_LINES); \
+ exit 1; \
+ fi
+
+qemu: qemu-run qemu-wait-boot android-install
+
+.PHONY: clean qemu qemu-run qemu-stop qemu-wait-boot android-build android-install logcat qemu-logcat-boot
diff --git a/src/PostIt/PostIt.Android/Application.cs b/src/PostIt/PostIt.Android/Application.cs
index fb6b08d3..f5a7908d 100644
--- a/src/PostIt/PostIt.Android/Application.cs
+++ b/src/PostIt/PostIt.Android/Application.cs
@@ -2,6 +2,12 @@
using Android.Runtime;
using Avalonia;
using Avalonia.Android;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Avalonia.Controls;
+using Avalonia.Styling;
+using Yavsc.Api.Client;
namespace PostIt.Android
{
diff --git a/src/PostIt/PostIt.Android/MainActivity.cs b/src/PostIt/PostIt.Android/MainActivity.cs
index 86ce394a..ad8455ef 100644
--- a/src/PostIt/PostIt.Android/MainActivity.cs
+++ b/src/PostIt/PostIt.Android/MainActivity.cs
@@ -1,8 +1,11 @@
+
using Android.App;
-using Android.Content.PM;
using Android.Content;
-using Avalonia;
+using Android.Content.PM;
+using AndroidX.Core.Provider;
+using AndroidX.Emoji2.Text;
using Avalonia.Android;
+using PostIt.Droid.Services;
namespace PostIt.Android;
@@ -12,26 +15,28 @@ namespace PostIt.Android;
Theme = "@style/MyTheme.NoActionBar",
Icon = "@drawable/icon",
MainLauncher = true,
- LaunchMode = LaunchMode.SingleTask,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
public class MainActivity : AvaloniaMainActivity
{
///
- /// Strongly-typed handle to the current MainActivity instance, set in
- /// and consumed by platform services such as
- /// which need to launch
- /// Chrome Custom Tabs.
+ /// The current MainActivity instance.
///
public static MainActivity? Current { get; private set; }
protected override void OnCreate(global::Android.OS.Bundle? savedInstanceState)
{
+ FontRequest fontRequest = new FontRequest(
+ "com.google.android.gms.fonts",
+ "com.google.android.gms",
+ "Noto Color Emoji Compat",
+ Yavsc.Resource.Array.com_google_android_gms_fonts_certs); //com_google_android_gms_fonts_certs
+ EmojiCompat.Config config = new FontRequestEmojiCompatConfig(this, fontRequest);
+ EmojiCompat.Init(config);
+ PlatformBootstrap.InitPlatform();
base.OnCreate(savedInstanceState);
- PlatformBootstrap.EnsureInitialized();
Current = this;
}
-
- ///
+ ///
/// Receives the deep-link Intent fired by the system browser after the
/// user completes the OIDC login on https://yavsc.pschneider.fr. The
/// Intent URI has the shape android://postit-signin?code=...&state=....
@@ -43,7 +48,13 @@ public class MainActivity : AvaloniaMainActivity
protected override void OnNewIntent(Intent? intent)
{
base.OnNewIntent(intent);
- if (intent is not null) AndroidOidcCallbackSink.Handle(intent);
+
+ var url = intent?.DataString;
+ if (!string.IsNullOrEmpty(url) && url.StartsWith("postit://callback"))
+ {
+ OidcCallbackManager.SetResult(url);
+ }
+
}
internal static class AndroidOidcCallbackSink
@@ -63,4 +74,4 @@ public class MainActivity : AvaloniaMainActivity
tcs?.TrySetResult(intent?.Data?.ToString() ?? string.Empty);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/PostIt/PostIt.Android/PlatformBootstrap.cs b/src/PostIt/PostIt.Android/PlatformBootstrap.cs
index d59b154f..f208f9ce 100644
--- a/src/PostIt/PostIt.Android/PlatformBootstrap.cs
+++ b/src/PostIt/PostIt.Android/PlatformBootstrap.cs
@@ -12,14 +12,9 @@ namespace PostIt.Android;
///
internal static class PlatformBootstrap
{
- private static int _initialized;
-
- internal static void EnsureInitialized()
+ internal static void InitPlatform()
{
- if (System.Threading.Interlocked.Exchange(ref _initialized, 1) != 0)
- return;
- Platform.DefaultRedirectUri = ViewModels.Settings.AndroidRedirectUri;
Platform.CreateBrowser = () =>
{
var activity = MainActivity.Current;
diff --git a/src/PostIt/PostIt.Android/PostIt.Android.csproj b/src/PostIt/PostIt.Android/PostIt.Android.csproj
index b34b88d4..62b494f8 100644
--- a/src/PostIt/PostIt.Android/PostIt.Android.csproj
+++ b/src/PostIt/PostIt.Android/PostIt.Android.csproj
@@ -2,35 +2,30 @@
Exe
net10.0-android
-
- android-arm64;android-x64
- 23.0.0
+ 23
enable
- com.CompanyName.PostIt
+ fr.pschneider.postit
1
1.0
apk
false
- android-arm;android-arm64;android-x86;android-x64
- 1.1.0.0
- 1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
- 1.1.0-beta.1
+
Resources\drawable\Icon.png
+
-
+
+
+
-
-
-
+
diff --git a/src/PostIt/PostIt.Android/Properties/AndroidManifest.xml b/src/PostIt/PostIt.Android/Properties/AndroidManifest.xml
index 2472d06d..8793aae8 100644
--- a/src/PostIt/PostIt.Android/Properties/AndroidManifest.xml
+++ b/src/PostIt/PostIt.Android/Properties/AndroidManifest.xml
@@ -1,32 +1,6 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
\ No newline at end of file
+
diff --git a/src/PostIt/PostIt.Android/Resources/values/font_certs.xml b/src/PostIt/PostIt.Android/Resources/values/font_certs.xml
new file mode 100644
index 00000000..f4adce1b
--- /dev/null
+++ b/src/PostIt/PostIt.Android/Resources/values/font_certs.xml
@@ -0,0 +1,13 @@
+
+
+
+ - @array/com_google_android_gms_fonts_certs_dev
+ - @array/com_google_android_gms_fonts_certs_prod
+
+
+ - MIIEqDCCA5CgAwIBAgIJAN5gc16AJfAsMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHR29vZ2xlMRAwDgYDVQQLEwdBbmRyb2lkMRAwDgYDVQQDEwdBbmRyb2lkMSEwHwYJKoZIhvcNAQkBFhJhbmRyb2lkQGFuZHJvaWQuY29tMCAXDTA4MDQxNTIyNDA0M1YYDzQyMDgxMzA0MjI0MDQzWjCBlDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDURvdW50YWluIFZpZXcxEDAOBgNVBAoTB0dvb2dsZTEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEhMB8GCSqGSIb3DQEJARYSYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALBi1vF0K1vOEHG7AxneTjOHUka46MIidBqvFcO164A49iU2DkYPhUaM4H8JCdzh6N1GzM6h9o6E2V6z8+gEtdI6nqqs0EGA0G0H701bFjLp9+K/1DkMIFeD4P8J7X1/M8t4+X09X/7bQyV3w0v7q+Qh38sY8W/7K29B3f2O2sLw+uX9U8a8Tf4Xv8A==
+
+
+ - MIIEQzCCAyugAwIBAgIJAMLgh0ZgXpYOMA0GCSqGSIb3DQEBBQUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKKvSkUIXm+t9M8rXj2V
+
+
diff --git a/src/PostIt/PostIt.Android/Services/AndroidSystemBrowser.cs b/src/PostIt/PostIt.Android/Services/AndroidSystemBrowser.cs
index cb9c324b..bb10b364 100644
--- a/src/PostIt/PostIt.Android/Services/AndroidSystemBrowser.cs
+++ b/src/PostIt/PostIt.Android/Services/AndroidSystemBrowser.cs
@@ -1,9 +1,9 @@
using System;
using System.Threading.Tasks;
using Android.App;
-using Android.Content;
using AndroidX.Browser.CustomTabs;
using IdentityModel.OidcClient.Browser;
+using PostIt.Droid.Services;
namespace PostIt.Android.Services;
@@ -36,14 +36,19 @@ public sealed class AndroidSystemBrowser : IBrowser
};
}
+ // 1. Enregistrez la tâche avant de lancer le Custom Tab
+ var callbackTask = OidcCallbackManager.RegisterCallback(cancellationToken);
+
+ // 2. LANCEZ VOTRE CUSTOM TAB ICI (via AndroidX.Browser.CustomTabs)
+ // ... code pour ouvrir l'URL d'authentification ...
+
+
var uri = global::Android.Net.Uri.Parse(options.StartUrl)!;
- var callbackTask = MainActivity.AndroidOidcCallbackSink.AwaitNextCallbackAsync();
-
var tabsIntent = new CustomTabsIntent.Builder()
- .SetShowTitle(true)
+ .SetShowTitle(true)!
.Build();
- tabsIntent.LaunchUrl(_activity, uri);
+ tabsIntent!.LaunchUrl(_activity, uri);
string responseUri;
try
@@ -80,4 +85,4 @@ public sealed class AndroidSystemBrowser : IBrowser
Response = responseUri
};
}
-}
\ No newline at end of file
+}
diff --git a/src/PostIt/PostIt.Android/Services/ContactService.Mobile.cs b/src/PostIt/PostIt.Android/Services/ContactService.Mobile.cs
deleted file mode 100644
index c869256d..00000000
--- a/src/PostIt/PostIt.Android/Services/ContactService.Mobile.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-#if ANDROID || IOS
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.Maui.ApplicationModel.Communication;
-using Microsoft.Maui.ApplicationModel;
-using Microsoft.Maui.Devices;
-using PostIt.Services;
-using System.Linq;
-
-namespace PostIt.Android.Services;
-
-///
-/// Mobile implementation backed by MAUI Essentials
-/// Contacts.Default.
-///
-/// Compiled only for ANDROID and IOS. On desktop targets,
-/// see ContactService.Desktop.cs (the stub that wins at
-/// compile time).
-///
-/// Note: at runtime, this class throws
-/// NotImplementedInReferenceAssemblyException unless
-/// the host application project also references the
-/// platform-specific Microsoft.Maui.Essentials implementation
-/// (typically PostIt.Android). On iOS the same is
-/// required via PostIt.iOS. On desktop the stub is used
-/// and this file is excluded.
-///
-public sealed class ContactService : IContactService
-{
- public async Task> GetDeviceContactsAsync(CancellationToken ct = default)
- {
- if (DeviceInfo.Current.Platform == DevicePlatform.Unknown)
- return Array.Empty();
-
- try
- {
- var status = await Permissions.RequestAsync();
- if (status != PermissionStatus.Granted)
- return Array.Empty();
-
- var contacts = await Contacts.Default.GetAllAsync();
- if (contacts is null) return Array.Empty();
-
- // Carry the per-contact email list as-is. A real
- // device contact can carry several addresses (home /
- // work / other); the UI use case ("invite / add to a
- // circle") can then decide which address to use, or
- // let the user pick. The platform-neutral ContactDto
- // shape is intentionally richer than the Yavsc
- // directory's single-Email shape — the two flows
- // answer different questions.
- var result = new List(contacts.Count());
- foreach (var c in contacts)
- {
- var emails = ExtractEmails(c.Emails);
- result.Add(new ContactDto(
- c.Id,
- c.DisplayName ?? string.Empty,
- emails));
- }
- return result;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine($"ContactService: {ex.Message}");
- return Array.Empty();
- }
- }
-
- private static IReadOnlyList ExtractEmails(IEnumerable? emails)
- {
- if (emails is null) return Array.Empty();
- var list = new List();
- foreach (var e in emails)
- {
- if (!string.IsNullOrEmpty(e.EmailAddress))
- list.Add(e.EmailAddress);
- }
- return list;
- }
-}
-#endif
diff --git a/src/PostIt/PostIt.Android/Services/OidcCallbackManager.cs b/src/PostIt/PostIt.Android/Services/OidcCallbackManager.cs
new file mode 100644
index 00000000..30f8fa18
--- /dev/null
+++ b/src/PostIt/PostIt.Android/Services/OidcCallbackManager.cs
@@ -0,0 +1,21 @@
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace PostIt.Droid.Services;
+
+public static class OidcCallbackManager
+{
+ private static TaskCompletionSource? _tcs;
+
+ public static Task RegisterCallback(CancellationToken cancellationToken)
+ {
+ _tcs = new TaskCompletionSource();
+ cancellationToken.Register(() => _tcs.TrySetCanceled());
+ return _tcs.Task;
+ }
+
+ public static void SetResult(string url)
+ {
+ _tcs?.TrySetResult(url);
+ }
+}
diff --git a/src/PostIt/PostIt.Android/WebAuthenticationCallbackActivity.cs b/src/PostIt/PostIt.Android/WebAuthenticationCallbackActivity.cs
new file mode 100644
index 00000000..9ed2eb18
--- /dev/null
+++ b/src/PostIt/PostIt.Android/WebAuthenticationCallbackActivity.cs
@@ -0,0 +1,35 @@
+using Android.App;
+using Android.Content;
+using Android.Content.PM;
+using Android.OS;
+using PostIt.Droid.Services;
+
+namespace PostIt.Android;
+
+[Activity(NoHistory = true, LaunchMode = LaunchMode.SingleTop, Exported = true)]
+[IntentFilter(new[] { Intent.ActionView },
+ Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable },
+ DataScheme = "postit", // Remplacez par votre schéma personnalisé (ex: yavsc ou postit)
+ DataHost = "callback")] // Correspond à postit://callback
+public class WebAuthenticationCallbackActivity : Activity
+{
+ protected override void OnCreate(Bundle? savedInstanceState)
+ {
+ base.OnCreate(savedInstanceState);
+
+ // Capturer l'URL de redirection OIDC
+ var url = Intent?.DataString;
+
+ if (!string.IsNullOrEmpty(url))
+ {
+ // Transmettre l'URL au gestionnaire partagé pour compléter la Task
+ OidcCallbackManager.SetResult(url);
+ }
+
+ // Fermer cette activité transparente et ramener l'application au premier plan
+ var intent = new Intent(this, typeof(MainActivity));
+ intent.AddFlags(ActivityFlags.ClearTop | ActivityFlags.SingleTop);
+ StartActivity(intent);
+ Finish();
+ }
+}
diff --git a/src/PostIt/PostIt.Browser/PostIt.Browser.csproj b/src/PostIt/PostIt.Browser/PostIt.Browser.csproj
index 8643fcc6..2816b2f8 100644
--- a/src/PostIt/PostIt.Browser/PostIt.Browser.csproj
+++ b/src/PostIt/PostIt.Browser/PostIt.Browser.csproj
@@ -6,7 +6,7 @@
enable
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -15,7 +15,4 @@
-
-
-
-
\ No newline at end of file
+
diff --git a/src/PostIt/PostIt.Browser/Program.cs b/src/PostIt/PostIt.Browser/Program.cs
index 8700609d..f91cc4ee 100644
--- a/src/PostIt/PostIt.Browser/Program.cs
+++ b/src/PostIt/PostIt.Browser/Program.cs
@@ -1,5 +1,4 @@
-using System.Runtime.Versioning;
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using Avalonia;
using Avalonia.Browser;
using PostIt;
@@ -15,4 +14,4 @@ internal sealed partial class Program
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure();
-}
\ No newline at end of file
+}
diff --git a/src/PostIt/PostIt.Desktop/PlatformBootstrap.cs b/src/PostIt/PostIt.Desktop/PlatformBootstrap.cs
deleted file mode 100644
index 1563ec53..00000000
--- a/src/PostIt/PostIt.Desktop/PlatformBootstrap.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using IdentityModel.OidcClient.Browser;
-using PostIt.Services;
-
-namespace PostIt.Desktop;
-
-///
-/// One-shot platform bootstrap. Called from Program.Main so that
-/// the shared OIDC login path sees a working IBrowser — the
-/// custom-scheme browser that hands the OIDC callback off to the
-/// running instance through the named pipe. Desktop builds do NOT use
-/// a loopback HTTP listener: the postit:// scheme is registered
-/// with the OS at install time and the browser is whatever the user
-/// has configured to open it.
-///
-internal static class PlatformBootstrap
-{
- private static int _initialized;
-
- internal static void EnsureInitialized()
- {
- if (System.Threading.Interlocked.Exchange(ref _initialized, 1) != 0)
- return;
-
- // Use the custom-scheme redirect on Desktop. Loopback is only
- // a fallback for platforms that cannot register postit://
- // (see Settings.DefaultLoopbackRedirectUri for that path).
- Platform.DefaultRedirectUri = AuthenticationSettings.DefaultDesktopRedirectUri;
- Platform.CustomScheme = "postit";
- }
-}
diff --git a/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj b/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj
index 5043da6e..e47c5b6d 100644
--- a/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj
+++ b/src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj
@@ -7,7 +7,7 @@
enable
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -24,7 +24,4 @@
-
-
-
-
\ No newline at end of file
+
diff --git a/src/PostIt/PostIt.Desktop/Program.cs b/src/PostIt/PostIt.Desktop/Program.cs
index 23c4ef62..0de3bd69 100644
--- a/src/PostIt/PostIt.Desktop/Program.cs
+++ b/src/PostIt/PostIt.Desktop/Program.cs
@@ -1,5 +1,4 @@
using System;
-using System.Threading;
using Avalonia;
using PostIt.Services;
@@ -13,8 +12,6 @@ sealed class Program
[STAThread]
public static void Main(string[] args)
{
- PlatformBootstrap.EnsureInitialized();
-
// Short-circuit 2nd-instance launches (OS handing us the
// postit://callback URL) BEFORE Avalonia spins up a window.
// If we let Avalonia initialise, the new MainWindow flashes
@@ -69,9 +66,6 @@ sealed class Program
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure()
.UsePlatformDetect()
-#if DEBUG
- .WithDeveloperTools()
-#endif
.WithInterFont()
.LogToTrace();
-}
\ No newline at end of file
+}
diff --git a/src/PostIt.Tests/AddCircleMemberDialogTests.cs b/src/PostIt/PostIt.Tests/AddCircleMemberDialogTests.cs
similarity index 95%
rename from src/PostIt.Tests/AddCircleMemberDialogTests.cs
rename to src/PostIt/PostIt.Tests/AddCircleMemberDialogTests.cs
index 289ff727..8bec1dc6 100644
--- a/src/PostIt.Tests/AddCircleMemberDialogTests.cs
+++ b/src/PostIt/PostIt.Tests/AddCircleMemberDialogTests.cs
@@ -1,8 +1,8 @@
using Avalonia;
-using Avalonia.Controls;
using Avalonia.Headless.XUnit;
using Microsoft.Extensions.DependencyInjection;
+using PostIt.Helpers;
using PostIt.Services;
using PostIt.ViewModels;
using PostIt.Views;
@@ -73,7 +73,7 @@ public class AddCircleMemberDialogTests
return context;
}
///
- /// Mount a real , build a minimal
+ /// Mount a real , build a minimal
/// DI graph, push then the
/// on top of it.
/// Returns the stack size so the test can pin the delta.
@@ -98,12 +98,9 @@ public class AddCircleMemberDialogTests
services.AddTransient();
var sp = services.BuildServiceProvider();
- context.Window = new MainWindow();
+ context.Window = new MainView();
context.App = (PostIt.App)Application.Current!;
- context.App.DataTemplates.Clear();
- context.App.DataTemplates.Add(new ViewLocator(sp));
context.App.AttachMainWindow(context.Window);
- context.Window.Show();
context.page = sp.GetRequiredService();
context.Window.NavRoot.PushAsync(context.page).GetAwaiter().GetResult();
diff --git a/src/PostIt/PostIt.Tests/AndroidAppLaunchTests.cs b/src/PostIt/PostIt.Tests/AndroidAppLaunchTests.cs
new file mode 100644
index 00000000..d4980d26
--- /dev/null
+++ b/src/PostIt/PostIt.Tests/AndroidAppLaunchTests.cs
@@ -0,0 +1,72 @@
+using System.Diagnostics;
+using Xamarin.UITest;
+
+namespace PostIt.Tests;
+
+///
+/// Smoke test: launches the installed PostIt.Android app on the running
+/// emulator and waits for the first Avalonia frame to render. Reveals the
+/// "démarrage KO" bug — the test fails if Avalonia never draws a frame
+/// within the timeout.
+///
+/// Skip conditions: the package is not installed on the connected device,
+/// or no device is connected via adb.
+///
+public class AndroidAppLaunchTests
+{
+ private const string PackageName = "fr.pschneider.postit";
+
+ private readonly ITestOutputHelper _output;
+
+ public AndroidAppLaunchTests(ITestOutputHelper output)
+ {
+ _output = output;
+ }
+
+ // https://twosixtech.com/blog/integrating-docker-and-adb/
+ // FIXME ala hosted shared resource adb server - [Fact]
+ public void PostIt_starts_and_draws_a_first_frame_on_the_emulator()
+ {
+ if (!IsPackageInstalledOnAnyDevice())
+ {
+ _output.WriteLine($"[skip] {PackageName} not installed on any device");
+ return;
+ }
+
+ _output.WriteLine($"[step] configuring app via InstalledApp({PackageName})");
+ var app = ConfigureApp.Android
+ .InstalledApp(PackageName)
+ .StartApp(Xamarin.UITest.Configuration.AppDataMode.DoNotClear);
+ _output.WriteLine("[step] app.StartApp returned, waiting for first frame");
+
+ app.WaitForElement(
+ e => e.Class("android.view.View"),
+ timeout: TimeSpan.FromSeconds(30));
+ _output.WriteLine("[step] first frame observed");
+ }
+
+ private static bool IsPackageInstalledOnAnyDevice()
+ {
+ try
+ {
+ var startInfo = new ProcessStartInfo("adb", "shell pm list packages")
+ {
+ RedirectStandardOutput = true,
+ RedirectStandardError = true,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ };
+ using var proc = Process.Start(startInfo);
+ if (proc is null) return false;
+ var stdout = proc.StandardOutput.ReadToEnd();
+ proc.WaitForExit(5000);
+ return stdout
+ .Split('\n', StringSplitOptions.RemoveEmptyEntries)
+ .Any(line => line.Trim().Equals($"package:{PackageName}", StringComparison.Ordinal));
+ }
+ catch
+ {
+ return false;
+ }
+ }
+}
diff --git a/src/PostIt.Tests/BearerScopeTests.cs b/src/PostIt/PostIt.Tests/BearerScopeTests.cs
similarity index 98%
rename from src/PostIt.Tests/BearerScopeTests.cs
rename to src/PostIt/PostIt.Tests/BearerScopeTests.cs
index fbccb606..c6bf7d56 100644
--- a/src/PostIt.Tests/BearerScopeTests.cs
+++ b/src/PostIt/PostIt.Tests/BearerScopeTests.cs
@@ -1,18 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
using System.Net;
-using System.Net.Http;
using System.Text;
using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
-using Yavsc.Blogspot;
using Yavsc.Api.Client;
using PostIt.Services;
-using PostIt.Services;
-using Xunit;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/BlogApiTestFakes.cs b/src/PostIt/PostIt.Tests/BlogApiTestFakes.cs
similarity index 99%
rename from src/PostIt.Tests/BlogApiTestFakes.cs
rename to src/PostIt/PostIt.Tests/BlogApiTestFakes.cs
index 4b541e42..4f102be2 100644
--- a/src/PostIt.Tests/BlogApiTestFakes.cs
+++ b/src/PostIt/PostIt.Tests/BlogApiTestFakes.cs
@@ -1,7 +1,6 @@
using Yavsc.Blogspot;
using PostIt.Services;
using PostIt.ViewModels;
-using Yavsc.Models;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/BlogPostAuthorDtoTests.cs b/src/PostIt/PostIt.Tests/BlogPostAuthorDtoTests.cs
similarity index 100%
rename from src/PostIt.Tests/BlogPostAuthorDtoTests.cs
rename to src/PostIt/PostIt.Tests/BlogPostAuthorDtoTests.cs
diff --git a/src/PostIt.Tests/FakeAuthorizingBrowser.cs b/src/PostIt/PostIt.Tests/FakeAuthorizingBrowser.cs
similarity index 98%
rename from src/PostIt.Tests/FakeAuthorizingBrowser.cs
rename to src/PostIt/PostIt.Tests/FakeAuthorizingBrowser.cs
index 4748425a..88dd5856 100644
--- a/src/PostIt.Tests/FakeAuthorizingBrowser.cs
+++ b/src/PostIt/PostIt.Tests/FakeAuthorizingBrowser.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Net.Http;
-using System.Threading.Tasks;
using IdentityModel.OidcClient.Browser;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/MainPageButtonsTests.cs b/src/PostIt/PostIt.Tests/MainPageButtonsTests.cs
similarity index 92%
rename from src/PostIt.Tests/MainPageButtonsTests.cs
rename to src/PostIt/PostIt.Tests/MainPageButtonsTests.cs
index 767f9c2e..d1d00532 100644
--- a/src/PostIt.Tests/MainPageButtonsTests.cs
+++ b/src/PostIt/PostIt.Tests/MainPageButtonsTests.cs
@@ -1,9 +1,6 @@
using Avalonia;
using Avalonia.Controls;
-using Avalonia.Headless;
using Avalonia.Headless.XUnit;
-using Avalonia.Input;
-using Avalonia.Interactivity;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Extensions.DependencyInjection;
using Yavsc.Api.Client;
@@ -75,7 +72,7 @@ public class MainPageButtonsTests
{ }
}
- private static MainPageViewModel MakeViewModel(BlogPostDto? selectedPost = null)
+ private static MainViewModel MakeViewModel(BlogPostDto? selectedPost = null)
{
var api = new ThrowingApi();
var blog = new BlogApiClient(api, "http://localhost/");
@@ -96,13 +93,13 @@ public class MainPageButtonsTests
services.AddTransient();
services.AddTransient();
services.AddTransient();
- var vm = new MainPageViewModel(blog, services: services.BuildServiceProvider());
+ var vm = new MainViewModel(blog, services: services.BuildServiceProvider());
if (selectedPost is not null) vm.SelectedPost = selectedPost;
return vm;
}
///
- /// Mount a real (as
+ /// Mount a real (as
/// SessionStatusBannerTests does), push a
/// with the given VM onto
/// NavRoot. PushAsync is awaited (via
@@ -112,18 +109,12 @@ public class MainPageButtonsTests
/// realised and KeyPressQwerty has a real
/// to dispatch against.
///
- private static (MainWindow window, MainPage page) MountMainPage(MainPageViewModel vm)
+ private static (MainView window, MainPage page) MountMainPage(MainViewModel vm)
{
- var window = new MainWindow();
+ var window = new MainView();
var page = new MainPage { DataContext = vm };
var app = (PostIt.App)Application.Current!;
- if (vm.Services is not null)
- {
- app.DataTemplates.Clear();
- app.DataTemplates.Add(new ViewLocator(vm.Services));
- }
app.AttachMainWindow(window);
- window.Show();
window.NavRoot.PushAsync(page).GetAwaiter().GetResult();
return (window, page);
}
@@ -133,7 +124,7 @@ public class MainPageButtonsTests
/// supported headless pattern (cf. CalculatorTests in the
/// Avalonia.Samples repo). Returns the nav-stack count
/// before the click so the caller can assert on the delta.
- /// KeyPressQwerty is dispatched on the
+ /// KeyPressQwerty is dispatched on the
/// itself — it is the that owns the
/// headless implementation, and routing the key through any
/// descendant TopLevel (e.g. one obtained via
@@ -142,7 +133,7 @@ public class MainPageButtonsTests
/// because the descendant does not carry the
/// PlatformHandle the harness expects.
///
- private static int ClickAndCapture(MainWindow window, Button button)
+ private static int ClickAndCapture(MainView window, Button button)
{
var stackBefore = window.NavRoot.NavigationStack.Count;
button.Command?.Execute(button.CommandParameter);
diff --git a/src/PostIt.Tests/MainPageSaveTests.cs b/src/PostIt/PostIt.Tests/MainPageSaveTests.cs
similarity index 97%
rename from src/PostIt.Tests/MainPageSaveTests.cs
rename to src/PostIt/PostIt.Tests/MainPageSaveTests.cs
index b6bf963a..5baae658 100644
--- a/src/PostIt.Tests/MainPageSaveTests.cs
+++ b/src/PostIt/PostIt.Tests/MainPageSaveTests.cs
@@ -1,10 +1,8 @@
-using Avalonia;
using Avalonia.Controls;
using Avalonia.Headless.XUnit;
using Avalonia.VisualTree;
using Yavsc.Blogspot;
using Yavsc.Api.Client;
-using PostIt.Services;
using PostIt.ViewModels;
using PostIt.Views;
namespace PostIt.Tests;
@@ -42,7 +40,7 @@ public class MainPageSaveTests
var recorder = new CallRecorder();
var api = new RecordingYavscApiClient(recorder);
var blog = new BlogApiClient(api, "http://localhost/");
- var viewModel = new MainPageViewModel(blog);
+ var viewModel = new MainViewModel(blog);
var page = new MainPage { DataContext = viewModel };
// MainPage is a ContentPage (a Page, not a Control), so it
diff --git a/src/PostIt.Tests/OidcStubAuthority.cs b/src/PostIt/PostIt.Tests/OidcStubAuthority.cs
similarity index 98%
rename from src/PostIt.Tests/OidcStubAuthority.cs
rename to src/PostIt/PostIt.Tests/OidcStubAuthority.cs
index 3c6552fb..4bb25097 100644
--- a/src/PostIt.Tests/OidcStubAuthority.cs
+++ b/src/PostIt/PostIt.Tests/OidcStubAuthority.cs
@@ -1,13 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/PostAclDialogTests.cs b/src/PostIt/PostIt.Tests/PostAclDialogTests.cs
similarity index 94%
rename from src/PostIt.Tests/PostAclDialogTests.cs
rename to src/PostIt/PostIt.Tests/PostAclDialogTests.cs
index 95576778..ccb33ec7 100644
--- a/src/PostIt.Tests/PostAclDialogTests.cs
+++ b/src/PostIt/PostIt.Tests/PostAclDialogTests.cs
@@ -1,21 +1,14 @@
-using System;
-using System.Collections.Generic;
using System.Net;
-using System.Net.Http;
using System.Text;
using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
using Avalonia;
-using Avalonia.Controls;
using Avalonia.Headless.XUnit;
using Microsoft.Extensions.DependencyInjection;
+using PostIt.Helpers;
using PostIt.Services;
using PostIt.ViewModels;
using PostIt.Views;
-using Yavsc.Abstract.Identity.Security;
using Yavsc.Api.Client;
-using Yavsc.Api.Client.Dtos;
using Yavsc.Blogspot;
namespace PostIt.Tests;
@@ -124,7 +117,7 @@ public class PostAclDialogTests
/// rebinding the global DI mid-test would trample the
/// Settings singleton the rest of the harness depends on.
///
- private static (MainWindow window, BlogAclApiClient aclClient, CircleApiClient circleClient, CountingHttpHandler handler) Mount()
+ private static (MainView window, BlogAclApiClient aclClient, CircleApiClient circleClient, CountingHttpHandler handler) Mount()
{
var handler = new CountingHttpHandler();
var settings = new Settings();
@@ -145,12 +138,9 @@ public class PostAclDialogTests
// CountingHttpHandler.
GC.KeepAlive(sp);
- var window = new MainWindow();
+ var window = new MainView();
var app = (App)Application.Current!;
- app.DataTemplates.Clear();
- app.DataTemplates.Add(new ViewLocator(sp));
app.AttachMainWindow(window);
- window.Show();
return (window, aclClient, circleClient, handler);
}
diff --git a/src/PostIt.Tests/PostIt.Tests.csproj b/src/PostIt/PostIt.Tests/PostIt.Tests.csproj
similarity index 77%
rename from src/PostIt.Tests/PostIt.Tests.csproj
rename to src/PostIt/PostIt.Tests/PostIt.Tests.csproj
index b12c536e..663bdd12 100644
--- a/src/PostIt.Tests/PostIt.Tests.csproj
+++ b/src/PostIt/PostIt.Tests/PostIt.Tests.csproj
@@ -8,24 +8,26 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
+
+
+
-
+
-
-
\ No newline at end of file
+
diff --git a/src/PostIt.Tests/PostItViewModelTests.cs b/src/PostIt/PostIt.Tests/PostItViewModelTests.cs
similarity index 96%
rename from src/PostIt.Tests/PostItViewModelTests.cs
rename to src/PostIt/PostIt.Tests/PostItViewModelTests.cs
index 2dee4604..d2c5d78e 100644
--- a/src/PostIt.Tests/PostItViewModelTests.cs
+++ b/src/PostIt/PostIt.Tests/PostItViewModelTests.cs
@@ -16,7 +16,7 @@ public class PostItViewModelTests
// throws on any call (we never call the API in this test).
var fakeApi = new ThrowingYavscApiClient();
var blog = new BlogApiClient(fakeApi, "http://localhost/");
- var viewModel = new MainPageViewModel(blog);
+ var viewModel = new MainViewModel(blog);
viewModel.Posts.Add(new BlogPostDto { Id = 1, Title = "First post", Article = "Hello world", AuthorId = "alice" });
viewModel.Posts.Add(new BlogPostDto { Id = 2, Title = "Second post", Article = "Nothing here", AuthorId = "bob" });
@@ -49,7 +49,7 @@ public class PostItViewModelTests
var api = new StubYavscApiClient(expected);
var blog = new BlogApiClient(api, "http://localhost/");
- var posts = await blog.GetPostsAsync();
+ var posts = await blog.GetPostsAsync(ct: TestContext.Current.CancellationToken);
Assert.Equal(2, posts.Count);
Assert.Equal("Hello", posts[0].Title);
diff --git a/src/PostIt.Tests/SchemeUrlDetectorTests.cs b/src/PostIt/PostIt.Tests/SchemeUrlDetectorTests.cs
similarity index 99%
rename from src/PostIt.Tests/SchemeUrlDetectorTests.cs
rename to src/PostIt/PostIt.Tests/SchemeUrlDetectorTests.cs
index f5983cb3..78b67463 100644
--- a/src/PostIt.Tests/SchemeUrlDetectorTests.cs
+++ b/src/PostIt/PostIt.Tests/SchemeUrlDetectorTests.cs
@@ -1,5 +1,4 @@
using PostIt.Services;
-using Xunit;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/SessionStatusBannerTests.cs b/src/PostIt/PostIt.Tests/SessionStatusBannerTests.cs
similarity index 74%
rename from src/PostIt.Tests/SessionStatusBannerTests.cs
rename to src/PostIt/PostIt.Tests/SessionStatusBannerTests.cs
index d35529db..4d49b865 100644
--- a/src/PostIt.Tests/SessionStatusBannerTests.cs
+++ b/src/PostIt/PostIt.Tests/SessionStatusBannerTests.cs
@@ -1,7 +1,5 @@
-using Avalonia;
using Avalonia.Controls;
using Avalonia.Headless.XUnit;
-using Avalonia.Media;
using Avalonia.Styling;
using Avalonia.VisualTree;
using PostIt.ViewModels;
@@ -11,7 +9,7 @@ namespace PostIt.Tests;
///
/// UI tests for . Mounted inside
-/// a real via the headless Avalonia
+/// a real via the headless Avalonia
/// platform declared in TestApp.cs.
///
/// The pattern is the one that UnitTest1.MainPage_Should_Load
@@ -36,11 +34,10 @@ public class SessionStatusBannerTests
[AvaloniaFact]
public void Banner_renders_three_buttons_in_the_visual_tree()
{
- var window = new MainWindow();
- window.SessionBanner.DataContext = new SessionStatusViewModel();
+ MainWindow window = new MainWindow();
window.Show();
- var buttons = window.SessionBanner.GetVisualDescendants()
+ var buttons = window.GetVisualDescendants()
.OfType
[Fact]
- public void Load_is_idempotent_under_concurrent_calls()
+ public async Task Load_is_idempotent_under_concurrent_calls()
{
var settings = new PostIt.ViewModels.Settings
{
@@ -149,9 +143,9 @@ public class SettingsLoadTests
{
barrier.SignalAndWait();
settings.Load();
- });
+ }, TestContext.Current.CancellationToken);
}
- Task.WaitAll(tasks);
+ await Task.WhenAll(tasks);
Assert.True(settings.Loaded);
}
diff --git a/src/PostIt.Tests/SignaturePadControlTests.cs b/src/PostIt/PostIt.Tests/SignaturePadControlTests.cs
similarity index 99%
rename from src/PostIt.Tests/SignaturePadControlTests.cs
rename to src/PostIt/PostIt.Tests/SignaturePadControlTests.cs
index 691ae547..c03e6850 100644
--- a/src/PostIt.Tests/SignaturePadControlTests.cs
+++ b/src/PostIt/PostIt.Tests/SignaturePadControlTests.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Linq;
using PostIt.Controls;
using PostIt.Models;
-using Xunit;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/SignaturePageViewModelTests.cs b/src/PostIt/PostIt.Tests/SignaturePageViewModelTests.cs
similarity index 98%
rename from src/PostIt.Tests/SignaturePageViewModelTests.cs
rename to src/PostIt/PostIt.Tests/SignaturePageViewModelTests.cs
index 37f17a58..494df9ab 100644
--- a/src/PostIt.Tests/SignaturePageViewModelTests.cs
+++ b/src/PostIt/PostIt.Tests/SignaturePageViewModelTests.cs
@@ -1,10 +1,6 @@
-using System;
-using System.IO;
using System.Text.Json;
-using System.Threading.Tasks;
using PostIt.Controls;
using PostIt.ViewModels;
-using Xunit;
namespace PostIt.Tests;
diff --git a/src/PostIt.Tests/TestApp.cs b/src/PostIt/PostIt.Tests/TestApp.cs
similarity index 100%
rename from src/PostIt.Tests/TestApp.cs
rename to src/PostIt/PostIt.Tests/TestApp.cs
diff --git a/src/PostIt.Tests/TestAppContext.cs b/src/PostIt/PostIt.Tests/TestAppContext.cs
similarity index 83%
rename from src/PostIt.Tests/TestAppContext.cs
rename to src/PostIt/PostIt.Tests/TestAppContext.cs
index 2843c965..dbf8f006 100644
--- a/src/PostIt.Tests/TestAppContext.cs
+++ b/src/PostIt/PostIt.Tests/TestAppContext.cs
@@ -4,7 +4,7 @@ namespace PostIt.Tests;
internal class TestAppContext
{
- public MainWindow? Window {get; set; }
+ public MainView? Window {get; set; }
public CirclesPage? page {get; set; }
public AddCircleMemberDialog? dialog { get; set; }
public App? App { get; internal set; }
diff --git a/src/PostIt.Tests/UnitTest1.cs b/src/PostIt/PostIt.Tests/UnitTest1.cs
similarity index 70%
rename from src/PostIt.Tests/UnitTest1.cs
rename to src/PostIt/PostIt.Tests/UnitTest1.cs
index 96990865..bc0d864c 100644
--- a/src/PostIt.Tests/UnitTest1.cs
+++ b/src/PostIt/PostIt.Tests/UnitTest1.cs
@@ -1,5 +1,4 @@
using Avalonia.Headless.XUnit;
-using Avalonia.Controls;
using PostIt.Views;
namespace PostIt.Tests;
@@ -9,8 +8,7 @@ public class MainPageTests
[AvaloniaFact]
public void MainPage_Should_Load()
{
- var window = new MainWindow();
- window.Show();
+ var window = new MainView();
Assert.NotNull(window);
}
-}
\ No newline at end of file
+}
diff --git a/src/PostIt.Tests/YavscApiClientTests.cs b/src/PostIt/PostIt.Tests/YavscApiClientTests.cs
similarity index 98%
rename from src/PostIt.Tests/YavscApiClientTests.cs
rename to src/PostIt/PostIt.Tests/YavscApiClientTests.cs
index e54bc541..21c0dd00 100644
--- a/src/PostIt.Tests/YavscApiClientTests.cs
+++ b/src/PostIt/PostIt.Tests/YavscApiClientTests.cs
@@ -1,22 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
using System.Net;
-using System.Net.Http;
using System.Net.Sockets;
using System.Text;
using System.Text.Json;
-using System.Threading;
-using Yavsc.Blogspot;
-using Yavsc.Api.Client;
using PostIt.Services;
-using System.Threading.Tasks;
-using IdentityModel.OidcClient;
using IdentityModel.OidcClient.Browser;
-using PostIt.Services;
using PostIt.ViewModels;
-using Xunit;
namespace PostIt.Tests;
diff --git a/src/PostIt/PostIt/App.axaml b/src/PostIt/PostIt/App.axaml
index 92497b74..85e94ebc 100644
--- a/src/PostIt/PostIt/App.axaml
+++ b/src/PostIt/PostIt/App.axaml
@@ -1,13 +1,15 @@
+ x:Class="PostIt.App"
+ RequestedThemeVariant="Default">
+
-
+
+
+
-
+
-
-
diff --git a/src/PostIt/PostIt/App.axaml.cs b/src/PostIt/PostIt/App.axaml.cs
index d2399873..7caf7bda 100644
--- a/src/PostIt/PostIt/App.axaml.cs
+++ b/src/PostIt/PostIt/App.axaml.cs
@@ -1,16 +1,15 @@
using System;
-using System.Linq;
using System.Threading.Tasks;
-using Microsoft.Extensions.DependencyInjection;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
+using Microsoft.Extensions.DependencyInjection;
using PostIt.Services;
-using Yavsc.Api.Client;
using PostIt.ViewModels;
using PostIt.Views;
+using PostIt.Helpers;
namespace PostIt;
@@ -27,10 +26,8 @@ public partial class App : Application
/// DataValidationErrors.SetErrors.
///
public IServiceProvider? ServiceProvider { get; private set; }
- private MainWindow window;
- public App()
- {
- }
+
+ public MainView? View { get; private set; }
public override void Initialize()
{
@@ -39,197 +36,74 @@ public partial class App : Application
public override void OnFrameworkInitializationCompleted()
{
- // Belt-and-braces 2nd-instance guard. The primary check now
- // lives in PostIt.Desktop.Program.Main and exits before
- // Avalonia boots — preventing a flash of the MainWindow on
- // every postit://callback launch. This block is kept for any
- // entry point that bypasses Program.Main (PostIt.Browser,
- // PostIt.Android's process lifecycle, ad-hoc tests that build
- // App directly) and as defence-in-depth in case the Desktop
- // build is ever reconfigured to skip the early check.
if (TryHandOffCustomSchemeUrl()) return;
- this.ServiceProvider = BuildServices(new ServiceCollection());
- AttachServiceProvider(ServiceProvider);
+ this.ServiceProvider = new ServiceCollection().BuildServices();
var settings = ServiceProvider.GetRequiredService();
- var sessionStatus = ServiceProvider.GetRequiredService();
- var api = ServiceProvider.GetRequiredService();
-
- DataTemplates.Clear();
- DataTemplates.Add(new ViewLocator(ServiceProvider));
-
- // Wire the Settings singleton onto the SettingsPage singleton
- // once, at composition time. The page is registered as a
- // singleton (see above) precisely so this binding is stable
- // for the lifetime of the app: every push to / pop from the
- // navigation stack finds the same ContentPage with the same
- // DataContext, and the TwoWay bindings inside the page keep
- // mutating the same in-memory Settings instance that the rest
- // of the app reads (OidcClientOptions construction, etc.).
- ServiceProvider.GetRequiredService().DataContext = settings;
-
- // Settings.DarkMode was previously a dead field: it round-
- // tripped through the settings file and the SettingsPage
- // CheckBox, but no consumer ever read it. Wire it here to
- // Application.RequestedThemeVariant so the toggle takes
- // effect immediately, and seed the initial theme from the
- // value Load() just populated (so a dark-mode user lands on
- // a dark window on first launch, not on a default-light
- // window that flips after the user touches the toggle).
- ApplyDarkMode(settings);
- settings.PropertyChanged += (_, e) =>
- {
- if (e.PropertyName == nameof(Settings.DarkMode))
- {
- ApplyDarkMode(settings);
- }
- };
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
- var homeVm = ServiceProvider.GetRequiredService();
-
- window = new MainWindow();
- window.SessionBanner.DataContext = sessionStatus;
-
- // Build the navigation stack from scratch: HomePage is the
- // root in both cases. App.BootAsync will push MainPage on
- // top if the silent refresh succeeds.
+ var window = ServiceProvider.GetRequiredService();
desktop.MainWindow = window;
- _ = PushPageAsync(homeVm);
+ var api = ServiceProvider!.GetRequiredService();
+ desktop.MainWindow.Opened += async (_, _) => await BootAsync(this.ServiceProvider!, api);
+ View = window.MainView;
+ this.ConfigureRootView(window.MainView);
- // When the user logs out, route back to HomePage. We
- // ReplaceAsync the current top so we don't grow the stack
- // on every logout — otherwise repeated login/logout would
- // eventually balloon the back history.
- sessionStatus.LogoutCompleted += () =>
- {
- var w = (MainWindow)((IClassicDesktopStyleApplicationLifetime)ApplicationLifetime!).MainWindow!;
- var nav = w.NavRoot;
- _ = nav.PopToRootAsync();
- };
-
- // When the user signs in interactively (Login button on
- // the session banner), push MainPage on top of HomePage.
- sessionStatus.LoginSucceeded += () =>
- {
- var w = (MainWindow)((IClassicDesktopStyleApplicationLifetime)ApplicationLifetime!).MainWindow!;
- _ = PushMainPageAsync();
- };
-
- window.Opened += async (_, _) => await BootAsync(this.ServiceProvider, api);
+ ApplyDarkMode(settings);
}
- else if (ApplicationLifetime is ISingleViewApplicationLifetime singleView)
+ else if (ApplicationLifetime is IActivityApplicationLifetime singleViewFactoryApplicationLifetime)
{
- singleView.MainView = new MainWindow
- {
- DataContext = ServiceProvider.GetRequiredService()
- };
+ singleViewFactoryApplicationLifetime.MainViewFactory =
+ () =>
+ {
+ View = ServiceProvider.GetRequiredService();
+ this.ConfigureRootView(View);
+ ApplyDarkMode(settings);
+ return View;
+ };
}
+ else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
+ {
+ singleViewPlatform.MainView = View = ServiceProvider.GetRequiredService();
+ ConfigureRootView(View);
+ ApplyDarkMode(settings);
+ }
+
+ base.OnFrameworkInitializationCompleted();
}
- ///
- /// Build the DI container the app uses. Pulled out of
- /// so headless
- /// tests can construct the same container at TestApp boot
- /// without going through the full Avalonia desktop lifetime
- /// (which never runs in a unit test). The container returned is
- /// the exact one production uses — no test-only fakes, no
- /// trimmed service list — so a test that exercises a VM, page,
- /// or service resolves through the same wiring the real app
- /// does, and a green test is a green contract for prod.
- ///
- internal static IServiceProvider BuildServices(ServiceCollection services)
+private void ConfigureRootView(MainView rootView)
+{
+ var api = ServiceProvider!.GetRequiredService();
+
+ // Déclencher le Boot lors du chargement du contrôle à l'écran
+ rootView.AttachedToVisualTree += async (_, _) => await BootAsync(this.ServiceProvider!, api);
+
+ var sessionStatus = ServiceProvider!.GetRequiredService();
+ sessionStatus.LogoutCompleted += () =>
{
- var settings = new Settings();
- settings.Load();
+ // Remplacer Window.NavRoot par rootView.NavRoot
+ rootView.NavRoot.PopToRootAsync();
+ };
- var tokenStore = new TokenStore(System.IO.Path.Combine(
- System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData),
- "PostIt", "tokens.json"));
-
- var api = new YavscApiClient(settings, tokenStore);
- var client = new BlogApiClient(api, settings.BlogsApiUrl);
- var circleClient = new CircleApiClient(api, settings.BlogsApiUrl);
- var blogAclClient = new BlogAclApiClient(api, settings.BlogsApiUrl);
- var userSearchClient = new UserSearchClient(api, settings.BlogsApiUrl);
- var contactService = new ContactService();
- var userDirectory = new UserDirectory(userSearchClient);
-
-
- // Vues
- services.AddTransient();
- // SettingsPage is a singleton: there must be one and only one
- // instance of the settings UI for the lifetime of the app.
- // This guarantees that (a) the bindings always reflect the
- // current in-memory Settings state, (b) the page already has
- // its DataContext wired up at composition-root time (see
- // below), and (c) PushPageAsync's anti-empilement guard sees
- // the same instance across pushes, so a second Settings tap
- // is a no-op rather than re-pushing the page. Transient would
- // let the user accumulate stale SettingsPage instances on
- // the navigation stack, each bound to a fresh
- // SettingsViewModel and missing any in-flight edits.
- services.AddSingleton();
- services.AddTransient();
- services.AddTransient();
- services.AddTransient();
- // Dialogs (modal-light pages): the ViewLocator resolves
- // them when a caller pushes a PostAclDialogViewModel or
- // AddCircleMemberDialogViewModel via App.PushPageAsync.
- // App.PushPageAsync overwrites the page's DataContext with
- // the caller-built VM, so the parameterless ctor is enough
- // here — the parametrised ctors stay for direct test wiring.
- services.AddTransient();
- services.AddTransient();
- // ViewModels
- services.AddSingleton(settings);
- services.AddSingleton(api);
- services.AddSingleton(api);
- services.AddSingleton(client);
- services.AddSingleton(circleClient);
- services.AddSingleton(blogAclClient);
- services.AddSingleton(userSearchClient);
- services.AddSingleton(contactService);
- services.AddSingleton(userDirectory);
- services.AddTransient();
- services.AddTransient();
- services.AddTransient();
- services.AddTransient();
-
- // Persistent session banner: one instance for the lifetime of
- // the app so the same VM survives page navigation.
- var sessionStatus = new SessionStatusViewModel { Api = api };
- sessionStatus.Refresh();
- services.AddSingleton(sessionStatus);
- services.AddTransient();
-
- return services.BuildServiceProvider();
- }
-
- ///
- /// Attach a pre-built DI container to this
- /// instance. Used by headless tests after
- /// ; in production this happens
- /// implicitly via .
- /// Idempotent w.r.t. :
- /// re-binding from a second App boot is a no-op.
- ///
- internal void AttachServiceProvider(IServiceProvider sp)
+ sessionStatus.LoginSucceeded += async () =>
{
- ServiceProvider = sp;
- Settings.BindToServiceProvider(sp);
- }
+ await PushMainPageAsync();
+ };
+
+ rootView.SessionBanner.DataContext = sessionStatus;
+}
///
- /// Test-only hook: bind a concrete so
+ /// Test-only hook: bind a concrete so
/// command-driven navigation paths () can
/// push onto a real in headless
/// fixtures that do not run the full desktop lifetime bootstrap.
///
- internal void AttachMainWindow(MainWindow mainWindow)
+ internal void AttachMainWindow(MainView mainView)
{
- window = mainWindow ?? throw new ArgumentNullException(nameof(mainWindow));
+ View = mainView ?? throw new ArgumentNullException(nameof(mainView));
}
private static void ApplyDarkMode(Settings settings)
@@ -253,6 +127,9 @@ public partial class App : Application
var refreshed = await api.TrySilentLoginAsync().ConfigureAwait(true);
var sessionStatus = provider.GetRequiredService();
sessionStatus.Refresh();
+ var homePage = provider.GetRequiredService();
+ var app = (App)Current!;
+ await app.PushPageAsync(homePage);
if (!refreshed) return;
await PushMainPageAsync().ConfigureAwait(true);
@@ -266,11 +143,11 @@ public partial class App : Application
/// (interactive login from the banner). Pulled out as a helper so
/// the two callers can't drift apart.
///
- public static Task PushMainPageAsync()
+ public static async Task PushMainPageAsync()
{
- var app = (App)Current;
- var mainVm = app.ServiceProvider.GetRequiredService();
- return app.PushPageAsync(mainVm);
+ var app = (App)Current!;
+ var mainVm = app.ServiceProvider!.GetRequiredService();
+ await app.PushPageAsync(mainVm);
}
private bool TryHandOffCustomSchemeUrl()
@@ -305,53 +182,8 @@ public partial class App : Application
return true;
}
- internal void PushPage(ViewModelBase vm)
- {
- _ = PushPageAsync(vm);
- }
-
- internal Task PushPageAsync(ViewModelBase vm)
- {
- if (window is null)
- {
- throw new InvalidOperationException("MainWindow is not initialized yet.");
- }
-
- var template = DataTemplates.FirstOrDefault(t => t.Match(vm));
- if (template is null)
- {
- throw new InvalidOperationException($"No IDataTemplate found for {vm.GetType().Name}.");
- }
-
- var view = template.Build(vm);
- if (view is null)
- {
- throw new InvalidOperationException(
- $"Template for {vm.GetType().Name} returned .");
- }
-
- var page = view as Page;
- if (page is null)
- {
- // NavigationPage expects Page instances. Wrap any fallback control
- // (e.g. ViewLocator error TextBlock) into a ContentPage so it can render.
- page = new ContentPage { Content = view };
- }
-
- page.DataContext = vm;
-
- // Avoid stacking the same singleton page twice (e.g. SettingsPage).
- var stack = window.NavRoot.NavigationStack;
- if (stack.Count > 0 && ReferenceEquals(stack[stack.Count - 1], page))
- {
- return Task.CompletedTask;
- }
-
- return window.NavRoot.PushAsync(page);
- }
-
internal async Task GoBackAsync()
{
- await window.NavRoot.PopAsync();
+ await View!.NavRoot.PopAsync();
}
}
diff --git a/src/PostIt/PostIt/Assets/avalonia-logo.ico b/src/PostIt/PostIt/Assets/avalonia-logo.ico
new file mode 100644
index 00000000..f7da8bb5
Binary files /dev/null and b/src/PostIt/PostIt/Assets/avalonia-logo.ico differ
diff --git a/src/PostIt/PostIt/Helpers/ServiceCollectionHelpers.cs b/src/PostIt/PostIt/Helpers/ServiceCollectionHelpers.cs
new file mode 100644
index 00000000..c4e774cc
--- /dev/null
+++ b/src/PostIt/PostIt/Helpers/ServiceCollectionHelpers.cs
@@ -0,0 +1,78 @@
+using System;
+using Microsoft.Extensions.DependencyInjection;
+using PostIt.Services;
+using PostIt.ViewModels;
+using PostIt.Views;
+using Yavsc.Api.Client;
+
+namespace PostIt.Helpers;
+
+public static class ServiceCollectionHelpers
+{
+ public static IServiceProvider BuildServices(this ServiceCollection services)
+ {
+ var settings = new Settings();
+ settings.Load();
+
+ var tokenStore = new TokenStore(System.IO.Path.Combine(
+ System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData),
+ "PostIt", "tokens.json"));
+
+ var api = new YavscApiClient(settings, tokenStore);
+ var client = new BlogApiClient(api, settings.BlogsApiUrl);
+ var circleClient = new CircleApiClient(api, settings.BlogsApiUrl);
+ var blogAclClient = new BlogAclApiClient(api, settings.BlogsApiUrl);
+ var userSearchClient = new UserSearchClient(api, settings.BlogsApiUrl);
+ var userDirectory = new UserDirectory(userSearchClient);
+
+ // Vues
+ services.AddSingleton();
+ services.AddSingleton();
+ services.AddSingleton();
+
+ // SettingsPage is a singleton: there must be one and only one
+ // instance of the settings UI for the lifetime of the app.
+ // This guarantees that (a) the bindings always reflect the
+ // current in-memory Settings state, (b) the page already has
+ // its DataContext wired up at composition-root time (see
+ // below), and (c) PushPageAsync's anti-empilement guard sees
+ // the same instance across pushes, so a second Settings tap
+ // is a no-op rather than re-pushing the page. Transient would
+ // let the user accumulate stale SettingsPage instances on
+ // the navigation stack, each bound to a fresh
+ // SettingsViewModel and missing any in-flight edits.
+ services.AddSingleton();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ // Dialogs (modal-light pages): the ViewLocator resolves
+ // them when a caller pushes a PostAclDialogViewModel or
+ // AddCircleMemberDialogViewModel via App.PushPageAsync.
+ // App.PushPageAsync overwrites the page's DataContext with
+ // the caller-built VM, so the parameterless ctor is enough
+ // here — the parametrised ctors stay for direct test wiring.
+ services.AddTransient();
+ services.AddTransient();
+ // ViewModels
+ services.AddSingleton(settings);
+ services.AddSingleton(api);
+ services.AddSingleton(client);
+ services.AddSingleton(circleClient);
+ services.AddSingleton(blogAclClient);
+ services.AddSingleton(userSearchClient);
+ services.AddSingleton(userDirectory);
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+
+ // Persistent session banner: one instance for the lifetime of
+ // the app so the same VM survives page navigation.
+ var sessionStatus = new SessionStatusViewModel { Api = api };
+ sessionStatus.Refresh();
+ services.AddSingleton(sessionStatus);
+ services.AddTransient();
+
+ return services.BuildServiceProvider();
+ }
+}
diff --git a/src/PostIt/PostIt/Helpers/ViewModelBaseHelpers.cs b/src/PostIt/PostIt/Helpers/ViewModelBaseHelpers.cs
new file mode 100644
index 00000000..e4250cbb
--- /dev/null
+++ b/src/PostIt/PostIt/Helpers/ViewModelBaseHelpers.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using Avalonia.Controls;
+using PostIt.ViewModels;
+
+namespace PostIt.Helpers;
+
+public static class ViewModelBaseHelpers
+{
+ public static async Task PushPageAsync(this App app, ViewModelBase vm)
+ {
+ var window = app.View;
+ if (window is null)
+ {
+ throw new InvalidOperationException("MainWindow is not initialized yet.");
+ }
+
+ var template = app.DataTemplates.FirstOrDefault(t => t.Match(vm));
+ if (template is null)
+ {
+ throw new InvalidOperationException($"No IDataTemplate found for {vm.GetType().Name}.");
+ }
+
+ var view = template.Build(vm);
+ if (view is null)
+ {
+ throw new InvalidOperationException(
+ $"Template for {vm.GetType().Name} returned .");
+ }
+
+ var page = view as Page;
+ if (page is null)
+ {
+ // NavigationPage expects Page instances. Wrap any fallback control
+ // (e.g. ViewLocator error TextBlock) into a ContentPage so it can render.
+ page = new ContentPage { Content = view };
+ }
+
+ page.DataContext = vm;
+
+ // Avoid stacking the same singleton page twice (e.g. SettingsPage).
+ var stack = window.NavRoot.NavigationStack;
+ if (stack.Count > 0 && ReferenceEquals(stack[stack.Count - 1], page))
+ {
+ return;
+ }
+
+ await window.NavRoot.PushAsync(page);
+ }
+}
diff --git a/src/PostIt/PostIt/PostIt.csproj b/src/PostIt/PostIt/PostIt.csproj
index 163a6a77..bde8fd41 100644
--- a/src/PostIt/PostIt/PostIt.csproj
+++ b/src/PostIt/PostIt/PostIt.csproj
@@ -1,32 +1,14 @@
-
+
net10.0
enable
latest
- true
- 1.1.0.0
- 1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
- 1.1.0-beta.1
+
-
-
-
-
-
-
- None
- All
-
-
-
-
-
-
-
+
PreserveNewest
@@ -38,6 +20,20 @@
-
+
+
+
+
+ None
+ All
+
+
+
+
-
\ No newline at end of file
+
+
+
+
+
+
diff --git a/src/PostIt/PostIt/Services/ContactService.Desktop.cs b/src/PostIt/PostIt/Services/ContactService.Desktop.cs
deleted file mode 100644
index fa7d37f6..00000000
--- a/src/PostIt/PostIt/Services/ContactService.Desktop.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-#if !ANDROID && !IOS
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace PostIt.Services;
-
-///
-/// Desktop stub for .
-///
-/// The desktop has no equivalent of the mobile address
-/// book (no Contacts.Default, no CardDAV out of the
-/// box). Rather than synthesise a list from a different
-/// source, this provider returns an empty list and lets the
-/// UI render an honest "no local contacts on this platform"
-/// message.
-///
-/// If desktop users want to invite people who aren't
-/// Yavsc members, that flow goes through a separate path
-/// (manual email entry + invitation endpoint) — not through
-/// . Finding existing Yavsc
-/// members is 's job, not this
-/// one's.
-///
-/// Future CardDAV / Google Contacts / Exchange
-/// providers can plug in here as additional
-/// implementations selected
-/// from DI by configuration.
-///
-public sealed class ContactService : IContactService
-{
- public Task> GetDeviceContactsAsync(CancellationToken ct = default)
- => Task.FromResult>(Array.Empty());
-}
-#endif
diff --git a/src/PostIt/PostIt/Services/Platform.cs b/src/PostIt/PostIt/Services/Platform.cs
index c867c63c..8e5f7e25 100644
--- a/src/PostIt/PostIt/Services/Platform.cs
+++ b/src/PostIt/PostIt/Services/Platform.cs
@@ -21,14 +21,14 @@ public static class Platform
/// override this property at startup (e.g. PostIt.Android sets
/// it to android://postit-signin).
///
- public static string DefaultRedirectUri { get; set; } = "postit://callback";
+ public const string RedirectUri = "postit://callback";
///
/// Scheme prefix the matches
/// against BrowserOptions.EndUrl. Overridable for apps
/// that want to register their own scheme.
///
- public static string CustomScheme { get; set; } = "postit";
+ public const string CustomScheme = "postit";
///
/// Constructs a fresh for the running platform.
@@ -37,4 +37,4 @@ public static class Platform
///
public static System.Func? CreateBrowser { get; set; } =
() => new CustomSchemeBrowser(CustomScheme);
-}
\ No newline at end of file
+}
diff --git a/src/PostIt/PostIt/Services/YavscApiClient.cs b/src/PostIt/PostIt/Services/YavscApiClient.cs
index b611fe02..726b3f4f 100644
--- a/src/PostIt/PostIt/Services/YavscApiClient.cs
+++ b/src/PostIt/PostIt/Services/YavscApiClient.cs
@@ -3,7 +3,6 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
-using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
diff --git a/src/PostIt/PostIt/Settings/AuthenticationSettings.cs b/src/PostIt/PostIt/Settings/AuthenticationSettings.cs
index ad71063b..9ebeaebd 100644
--- a/src/PostIt/PostIt/Settings/AuthenticationSettings.cs
+++ b/src/PostIt/PostIt/Settings/AuthenticationSettings.cs
@@ -10,7 +10,7 @@ public partial class AuthenticationSettings : ObservableObject
/// hand-off in
/// (RFC 8252 §7.1). Production Desktop builds use this.
///
- public const string DefaultDesktopRedirectUri = "postit://callback";
+ public const string DesktopRedirectUri = "postit://callback";
///
/// Redirect URI used by the Android app. The corresponding IntentFilter
@@ -21,6 +21,9 @@ public partial class AuthenticationSettings : ObservableObject
public static string DefaultAuthority { get; internal set; } = "https://yavsc.pschneider.fr";
public static string DefaultClientId { get; internal set; } = "postit";
+
+ public static string[] DefaultScopes { get; set; } = { "blogs"} ;
+
[ObservableProperty]
public partial string Authority { get; set; }
@@ -31,15 +34,19 @@ public partial class AuthenticationSettings : ObservableObject
[ObservableProperty]
public partial string[] Scopes { get; set; }
-
///
- /// OAuth redirect URI. Defaults to
+ /// OAuth redirect URI. Defaults to
/// (custom URI scheme) which is the right answer for desktop
/// production builds. Mobile platforms must set this to
/// before calling LoginAsync.
///
[ObservableProperty]
- public partial string RedirectUri { get; set; } = DefaultDesktopRedirectUri;
+ public partial string RedirectUri { get; set; }
+#if ANDROID
+ = AndroidRedirectUri;
+#else
+ = DesktopRedirectUri;
+#endif
///
/// Space-separated view of . Exists for the
diff --git a/src/PostIt/PostIt/ViewLocator.cs b/src/PostIt/PostIt/ViewLocator.cs
index fd92c802..3543a9c9 100644
--- a/src/PostIt/PostIt/ViewLocator.cs
+++ b/src/PostIt/PostIt/ViewLocator.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics.CodeAnalysis;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Microsoft.Extensions.DependencyInjection;
@@ -10,17 +11,13 @@ namespace PostIt;
///
/// Given a view model, returns the corresponding view if possible.
///
-
+[RequiresUnreferencedCode(
+ "Default implementation of ViewLocator involves reflection which may be trimmed away.",
+ Url = "https://docs.avaloniaui.net/docs/concepts/view-locator")]
public class ViewLocator : IDataTemplate
{
- private readonly IServiceProvider _services;
- public ViewLocator(IServiceProvider services)
- {
- _services = services;
- }
-
- public Control Build(object? data)
+ public Control Build(object? data)
{
try
{
@@ -32,21 +29,24 @@ public class ViewLocator : IDataTemplate
}
}
+
private Control BuildCore(object? data)
{
+ var app = App.Current as App;
+ var services = app!.ServiceProvider!;
return data switch
{
- MainPageViewModel => _services.GetRequiredService(),
- Settings => _services.GetRequiredService(),
- HomePageViewModel => _services.GetRequiredService(),
- SignaturePageViewModel => _services.GetRequiredService(),
- AddCircleMemberDialogViewModel => _services.GetRequiredService(),
- CirclesPageViewModel => _services.GetRequiredService(),
- PostAclDialogViewModel => _services.GetRequiredService(),
+ MainViewModel => services.GetRequiredService(),
+ Settings => services.GetRequiredService(),
+ HomePageViewModel => services.GetRequiredService(),
+ SignaturePageViewModel => services.GetRequiredService(),
+ AddCircleMemberDialogViewModel => services.GetRequiredService(),
+ CirclesPageViewModel => services.GetRequiredService(),
+ PostAclDialogViewModel => services.GetRequiredService(),
null => new TextBlock { Text = "No view for " },
_ => new TextBlock { Text = $"No view for {data.GetType().Name}" }
};
}
- public bool Match(object? data) => data is ViewModelBase;
+ public bool Match(object? data) => data is ViewModelBase;
}
diff --git a/src/PostIt/PostIt/ViewModels/AddCircleMemberDialogViewModel.cs b/src/PostIt/PostIt/ViewModels/AddCircleMemberDialogViewModel.cs
index 59d6dbed..88d01335 100644
--- a/src/PostIt/PostIt/ViewModels/AddCircleMemberDialogViewModel.cs
+++ b/src/PostIt/PostIt/ViewModels/AddCircleMemberDialogViewModel.cs
@@ -5,7 +5,6 @@ using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using PostIt.Services;
-using PostIt.Views;
using Yavsc.Api.Client;
namespace PostIt.ViewModels;
diff --git a/src/PostIt/PostIt/ViewModels/CirclesPageViewModel.cs b/src/PostIt/PostIt/ViewModels/CirclesPageViewModel.cs
index 33a5bd30..9cee3ea8 100644
--- a/src/PostIt/PostIt/ViewModels/CirclesPageViewModel.cs
+++ b/src/PostIt/PostIt/ViewModels/CirclesPageViewModel.cs
@@ -5,6 +5,7 @@ using Avalonia;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Extensions.DependencyInjection;
+using PostIt.Helpers;
using PostIt.Services;
using Yavsc.Api.Client;
using Yavsc.Api.Client.Dtos;
diff --git a/src/PostIt/PostIt/ViewModels/HomePageViewModel.cs b/src/PostIt/PostIt/ViewModels/HomePageViewModel.cs
index 876f862c..5d727729 100644
--- a/src/PostIt/PostIt/ViewModels/HomePageViewModel.cs
+++ b/src/PostIt/PostIt/ViewModels/HomePageViewModel.cs
@@ -1,6 +1,4 @@
using CommunityToolkit.Mvvm.Input;
-using Microsoft.Extensions.DependencyInjection;
-using PostIt;
using PostIt.Services;
namespace PostIt.ViewModels;
diff --git a/src/PostIt/PostIt/ViewModels/MainPageViewModel.cs b/src/PostIt/PostIt/ViewModels/MainViewModel.cs
similarity index 96%
rename from src/PostIt/PostIt/ViewModels/MainPageViewModel.cs
rename to src/PostIt/PostIt/ViewModels/MainViewModel.cs
index e8256df6..1aa3eee0 100644
--- a/src/PostIt/PostIt/ViewModels/MainPageViewModel.cs
+++ b/src/PostIt/PostIt/ViewModels/MainViewModel.cs
@@ -8,12 +8,11 @@ using CommunityToolkit.Mvvm.Input;
using Microsoft.Extensions.DependencyInjection;
using Yavsc.Blogspot;
using Yavsc.Api.Client;
-using PostIt.Services;
-using PostIt.Views;
+using PostIt.Helpers;
namespace PostIt.ViewModels;
-public partial class MainPageViewModel : ViewModelBase
+public partial class MainViewModel : ViewModelBase
{
/// Window/tab title. Cosmetic — bound by
/// MainPage.axaml if at all. Not the post title.
@@ -122,10 +121,10 @@ public partial class MainPageViewModel : ViewModelBase
}
- public MainPageViewModel()
+ public MainViewModel()
{
- Init(null);
SettingsModel = new Settings();
+ Init(SettingsModel);
BlogClient = null;
}
@@ -137,6 +136,11 @@ public partial class MainPageViewModel : ViewModelBase
SelectedPost = null;
IsBusy = false;
StatusMessage = "Ready";
+ Settings = settings ?? new Settings();
+ WindowTitle = "PostIt";
+ DraftTitle = string.Empty;
+ DraftArticle = string.Empty;
+ DraftIsPublished = false;
// Production path: DI injects the canonical Settings singleton
// and we use it as-is. Test path: tests call this constructor
// without a Settings argument; we fall back to a fresh
@@ -147,11 +151,7 @@ public partial class MainPageViewModel : ViewModelBase
// sink; that crash is fixed in Settings.OnPropertyChanged
// (thread-safe dispatcher marshalling) so the duplicate
// instance is now merely wasteful, not dangerous.
- Settings = settings ?? new Settings();
- WindowTitle = "PostIt";
- DraftTitle = string.Empty;
- DraftArticle = string.Empty;
- DraftIsPublished = false;
+
}
/// Save is enabled as soon as the user has typed
@@ -171,12 +171,11 @@ public partial class MainPageViewModel : ViewModelBase
/// . Production code uses the
/// (Settings, BlogApiClient) overload below.
///
- public MainPageViewModel(BlogApiClient blogClient, Settings? settings = null, IServiceProvider? services = null)
+ public MainViewModel(BlogApiClient blogClient, Settings? settings = null, IServiceProvider? services = null)
{
SettingsModel = new Settings();
BlogClient = blogClient ?? throw new ArgumentNullException(nameof(blogClient)); ;
Services = services;
-
Init(settings);
}
@@ -212,7 +211,7 @@ public partial class MainPageViewModel : ViewModelBase
{
await ExecuteAsync(async () =>
{
- var posts = await BlogClient.GetPostsAsync();
+ var posts = await BlogClient!.GetPostsAsync();
Posts.Clear();
foreach (var post in posts.OrderByDescending(p => p.DateModified))
{
@@ -261,7 +260,7 @@ public partial class MainPageViewModel : ViewModelBase
DateCreated = DateTime.UtcNow,
DateModified = DateTime.UtcNow,
};
- var created = await BlogClient.CreatePostAsync(draft);
+ var created = await BlogClient!.CreatePostAsync(draft);
if (created is not null)
{
SelectedPost = created;
@@ -280,7 +279,7 @@ public partial class MainPageViewModel : ViewModelBase
DateCreated = SelectedPost.DateCreated,
DateModified = DateTime.UtcNow,
};
- await BlogClient.UpdatePostAsync(SelectedPost.Id, update);
+ await BlogClient!.UpdatePostAsync(SelectedPost.Id, update);
StatusMessage = $"Saved post {SelectedPost.Id}.";
}
@@ -299,7 +298,7 @@ public partial class MainPageViewModel : ViewModelBase
await ExecuteAsync(async () =>
{
- await BlogClient.DeletePostAsync(SelectedPost.Id);
+ await BlogClient!.DeletePostAsync(SelectedPost.Id);
StatusMessage = $"Deleted post {SelectedPost.Id}.";
SelectedPost = null;
await RefreshPostsAsync();
@@ -333,7 +332,7 @@ public partial class MainPageViewModel : ViewModelBase
await ExecuteAsync(async () =>
{
var desired = !DraftIsPublished;
- await BlogClient.SetPublishAsync(SelectedPost.Id, desired);
+ await BlogClient!.SetPublishAsync(SelectedPost.Id, desired);
DraftIsPublished = desired;
// Mirror into the selected post so a subsequent
// RefreshPostsAsync() doesn't blow away the
@@ -374,7 +373,7 @@ public partial class MainPageViewModel : ViewModelBase
private async Task RefreshPostsAsync()
{
- var posts = await BlogClient.GetPostsAsync();
+ var posts = await BlogClient!.GetPostsAsync();
Posts.Clear();
foreach (var post in posts.OrderByDescending(p => p.DateModified))
{
diff --git a/src/PostIt/PostIt/ViewModels/SessionStatusViewModel.cs b/src/PostIt/PostIt/ViewModels/SessionStatusViewModel.cs
index a1ad48ce..f2496b85 100644
--- a/src/PostIt/PostIt/ViewModels/SessionStatusViewModel.cs
+++ b/src/PostIt/PostIt/ViewModels/SessionStatusViewModel.cs
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Extensions.DependencyInjection;
+using PostIt.Helpers;
using PostIt.Services;
namespace PostIt.ViewModels;
@@ -139,7 +140,7 @@ public partial class SessionStatusViewModel : ViewModelBase
internal async Task OpenSettings()
{
var app = (App)App.Current!;
- await app.PushPageAsync(app.ServiceProvider.GetRequiredService()).ConfigureAwait(true);
+ await app.PushPageAsync(app.ServiceProvider!.GetRequiredService()).ConfigureAwait(true);
}
}
diff --git a/src/PostIt/PostIt/ViewModels/Settings.cs b/src/PostIt/PostIt/ViewModels/Settings.cs
index 890ca15c..fd87d772 100644
--- a/src/PostIt/PostIt/ViewModels/Settings.cs
+++ b/src/PostIt/PostIt/ViewModels/Settings.cs
@@ -2,13 +2,11 @@ using System.Runtime.CompilerServices;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using IdentityModel.OidcClient;
-using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Text.Json;
-using System.Threading;
[assembly: InternalsVisibleTo("PostIt.Tests")]
@@ -18,70 +16,6 @@ public partial class Settings : ViewModelBase
{
const string SettingsFileName = "postit-settings.json";
- ///
- /// Redirect URI used by the Android app. The corresponding IntentFilter
- /// in PostIt.Android/Properties/AndroidManifest.xml must match.
- ///
- public const string AndroidRedirectUri = "android://postit-signin";
-
-
-
- ///
- /// Process-wide canonical instance, wired up
- /// at application boot by
- /// through . The hybrid pattern:
- ///
- /// - The static Current reference gives
- /// ViewModels a non-DI way to reach the same instance (and lets
- /// the framework bindings push notifications through one stable
- /// ).
- /// - Tests that want to exercise a clean
- /// instance still call new Settings(); Current
- /// stays null in those contexts because
- /// is never invoked.
- /// - Reads () are
- /// thread-safe and never allocate; mutations always go through
- /// the DI-resolved singleton so two threads cannot each register
- /// a different "current" Settings.
- ///
- ///
- private static Settings? s_current;
-
- ///
- /// Wire the canonical Settings instance to a DI container. Called
- /// exactly once from App.axaml.cs after the singleton has
- /// been registered. Subsequent calls are no-ops: the DI container
- /// owns the instance lifetime and we don't want a stray
- /// BindToServiceProvider in a test fixture to silently
- /// rebind the production instance.
- ///
- public static void BindToServiceProvider(IServiceProvider services)
- {
- if (services is null) throw new ArgumentNullException(nameof(services));
- Interlocked.CompareExchange(ref s_current,
- services.GetService() ?? throw new InvalidOperationException(
- "Settings is not registered in the DI container."),
- null);
- }
-
- ///
- /// Returns the canonical Settings instance previously bound through
- /// , or null when called
- /// outside a running Avalonia application (tests, CLI tools).
- ///
- public static Settings? GetCurrent() => Volatile.Read(ref s_current);
-
- ///
- /// Resolve the canonical Settings instance or throw. Use this in
- /// production code paths that must not silently fall back to a
- /// freshly-constructed (which used to be
- /// the root cause of the postit://callback crash: two Settings
- /// instances racing on PropertyChanged from different threads).
- ///
- public static Settings RequireCurrent() =>
- GetCurrent() ?? throw new InvalidOperationException(
- "Settings.Current is not bound. Call App.OnFrameworkInitializationCompleted first.");
-
[ObservableProperty]
public partial AuthenticationSettings Authentication { get; set; } = new();
@@ -99,7 +33,7 @@ public partial class Settings : ViewModelBase
/// setters above all funnel through here, and we flip
/// in lock-step. Sub-property mutations
/// (e.g. Authentication.Authority) are caught by the
- /// subscription wired up in
+ /// subscription wired up in
/// below. disables the flag during bulk
/// hydration so the disk load itself does not count as a user
/// edit.
@@ -350,15 +284,14 @@ public partial class Settings : ViewModelBase
var settings = JsonSerializer.Deserialize(json);
if (settings is null)
{
- Console.Error.WriteLine($"🩎 Settings payload is invalid (source: {source}).");
- return;
+ UseDefaultSettings();
}
// Apply under the gate so concurrent Load() callers cannot
// see half the new values / half the old ones. The actual
// PropertyChanged fan-out is handled by [ObservableProperty]'s
// setters which we route through SetProperty → OnPropertyChanged
// → our overridden dispatcher-safe marshaller below.
- lock (_mutationGate)
+ else lock (_mutationGate)
{
this.Authentication = settings.Authentication;
this.DarkMode = settings.DarkMode;
@@ -370,7 +303,12 @@ public partial class Settings : ViewModelBase
this.Authentication.ClientId = string.IsNullOrWhiteSpace(settings.Authentication.ClientId) ?
AuthenticationSettings.DefaultClientId : settings.Authentication.ClientId;
this.Authentication.RedirectUri = string.IsNullOrWhiteSpace(settings.Authentication.RedirectUri) ?
- AuthenticationSettings.DefaultDesktopRedirectUri : settings.Authentication.RedirectUri;
+ AuthenticationSettings.DesktopRedirectUri : settings.Authentication.RedirectUri;
+ if (settings.Authentication.Scopes is null || settings.Authentication.Scopes.Length == 0)
+ {
+ settings.Authentication.Scopes = AuthenticationSettings.DefaultScopes;
+ }
+ else
this.Authentication.Scopes = settings.Authentication.Scopes;
}
}
@@ -400,6 +338,18 @@ public partial class Settings : ViewModelBase
}
}
+ private void UseDefaultSettings()
+ {
+ this.Authentication = new AuthenticationSettings
+ {
+ Authority = AuthenticationSettings.DefaultAuthority,
+ ClientId = AuthenticationSettings.DefaultClientId,
+ RedirectUri = AuthenticationSettings.DesktopRedirectUri,
+ Scopes = AuthenticationSettings.DefaultScopes
+ };
+ this.DarkMode = false;
+ }
+
///
/// Persist the current in-memory state to
/// ~/.config/PostIt/postit-settings.json (Linux) /
diff --git a/src/PostIt/PostIt/ViewModels/ViewModelBase.cs b/src/PostIt/PostIt/ViewModels/ViewModelBase.cs
index 93019360..4ca69eea 100644
--- a/src/PostIt/PostIt/ViewModels/ViewModelBase.cs
+++ b/src/PostIt/PostIt/ViewModels/ViewModelBase.cs
@@ -1,12 +1,10 @@
-using Avalonia.Styling;
-using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.ComponentModel;
namespace PostIt.ViewModels;
public abstract partial class ViewModelBase : ObservableObject
{
-
- ///
+ ///
/// Gets if the user can navigate to the next page
///
public abstract bool CanNavigateNext { get; protected set; }
diff --git a/src/PostIt/PostIt/Views/AddCircleMemberDialog.axaml.cs b/src/PostIt/PostIt/Views/AddCircleMemberDialog.axaml.cs
index 6905c85a..2941c557 100644
--- a/src/PostIt/PostIt/Views/AddCircleMemberDialog.axaml.cs
+++ b/src/PostIt/PostIt/Views/AddCircleMemberDialog.axaml.cs
@@ -1,9 +1,10 @@
-using Avalonia.Controls;
+
using Avalonia.Markup.Xaml;
using Avalonia.Interactivity;
using Avalonia.VisualTree;
using PostIt.Services;
using PostIt.ViewModels;
+using System.Threading.Tasks;
namespace PostIt.Views;
@@ -19,7 +20,7 @@ namespace PostIt.Views;
/// circle id. The dialog itself does not know the circle id
/// by design.
///
-public partial class AddCircleMemberDialog : ContentPage
+public partial class AddCircleMemberDialog : Avalonia.Controls.ContentPage
{
public AddCircleMemberDialog()
{
@@ -41,10 +42,9 @@ public partial class AddCircleMemberDialog : ContentPage
public AddCircleMemberDialogViewModel? ViewModel
=> DataContext as AddCircleMemberDialogViewModel;
- private void OnCloseClicked(object? sender, RoutedEventArgs e)
+ private async Task OnCloseClicked(object? sender, RoutedEventArgs e)
{
- var nav = this.FindAncestorOfType();
- if (nav is not null)
- _ = nav.PopAsync();
+ App app = App.Current! as App;
+ await app!.GoBackAsync();
}
}
diff --git a/src/PostIt/PostIt/Views/CirclesPage.axaml.cs b/src/PostIt/PostIt/Views/CirclesPage.axaml.cs
index a2f01fb5..3fe7a16c 100644
--- a/src/PostIt/PostIt/Views/CirclesPage.axaml.cs
+++ b/src/PostIt/PostIt/Views/CirclesPage.axaml.cs
@@ -1,10 +1,5 @@
-using System;
-using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
-using Microsoft.Extensions.DependencyInjection;
-using PostIt.Services;
-using PostIt.ViewModels;
namespace PostIt.Views;
diff --git a/src/PostIt/PostIt/Views/MainPage.axaml b/src/PostIt/PostIt/Views/MainPage.axaml
index 7eac39ff..e44f9f99 100644
--- a/src/PostIt/PostIt/Views/MainPage.axaml
+++ b/src/PostIt/PostIt/Views/MainPage.axaml
@@ -8,11 +8,11 @@
xmlns:AvaloniaEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
mc:Ignorable="d"
x:Class="PostIt.Views.MainPage"
- x:DataType="vm:MainPageViewModel"
+ x:DataType="vm:MainViewModel"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
-
+
-
+
+
+
+
diff --git a/src/PostIt/PostIt/Views/MainView.axaml b/src/PostIt/PostIt/Views/MainView.axaml
new file mode 100644
index 00000000..643c0f20
--- /dev/null
+++ b/src/PostIt/PostIt/Views/MainView.axaml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/PostIt/PostIt/Views/MainView.axaml.cs b/src/PostIt/PostIt/Views/MainView.axaml.cs
new file mode 100644
index 00000000..74f46686
--- /dev/null
+++ b/src/PostIt/PostIt/Views/MainView.axaml.cs
@@ -0,0 +1,11 @@
+using Avalonia.Controls;
+
+namespace PostIt.Views;
+
+public partial class MainView : UserControl
+{
+ public MainView()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/src/PostIt/PostIt/Views/MainWindow.axaml b/src/PostIt/PostIt/Views/MainWindow.axaml
index a261c5a3..e606cf2b 100644
--- a/src/PostIt/PostIt/Views/MainWindow.axaml
+++ b/src/PostIt/PostIt/Views/MainWindow.axaml
@@ -1,27 +1,12 @@
-
-
-
-
-
-
-
+ Icon="/Assets/avalonia-logo.ico"
+ Title="PostIt">
+
diff --git a/src/PostIt/PostIt/Views/MainWindow.axaml.cs b/src/PostIt/PostIt/Views/MainWindow.axaml.cs
index 9cb85f55..0dd9280a 100644
--- a/src/PostIt/PostIt/Views/MainWindow.axaml.cs
+++ b/src/PostIt/PostIt/Views/MainWindow.axaml.cs
@@ -8,4 +8,4 @@ public partial class MainWindow : Window
{
InitializeComponent();
}
-}
\ No newline at end of file
+}
diff --git a/src/PostIt/PostIt/Views/SessionStatusBanner.axaml.cs b/src/PostIt/PostIt/Views/SessionStatusBanner.axaml.cs
index 0f240635..ac788ee4 100644
--- a/src/PostIt/PostIt/Views/SessionStatusBanner.axaml.cs
+++ b/src/PostIt/PostIt/Views/SessionStatusBanner.axaml.cs
@@ -1,5 +1,4 @@
using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
namespace PostIt.Views;
diff --git a/src/PostIt/PostIt/Views/TextEditorBinding.cs b/src/PostIt/PostIt/Views/TextEditorBinding.cs
deleted file mode 100644
index 56fda68c..00000000
--- a/src/PostIt/PostIt/Views/TextEditorBinding.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using Avalonia;
-using Avalonia.Data;
-using AvaloniaEdit;
-
-namespace PostIt.Views;
-
-public sealed class TextEditorBinding
-{
- public static readonly AttachedProperty TextProperty =
- AvaloniaProperty.RegisterAttached(
- "Text",
- defaultBindingMode: BindingMode.TwoWay);
-
- private static readonly AttachedProperty IsTextChangeSubscribedProperty =
- AvaloniaProperty.RegisterAttached("IsTextChangeSubscribed");
-
- static TextEditorBinding()
- {
- TextProperty.Changed.AddClassHandler((editor, args) =>
- {
- EnsureTextChangeSubscribed(editor);
-
- var text = args.GetNewValue() ?? string.Empty;
- if (editor.Text != text)
- {
- editor.Text = text;
- }
- });
- }
-
- public static string? GetText(TextEditor editor) => editor.GetValue(TextProperty);
-
- public static void SetText(TextEditor editor, string? value) => editor.SetValue(TextProperty, value);
-
- private static void EnsureTextChangeSubscribed(TextEditor editor)
- {
- if (editor.GetValue(IsTextChangeSubscribedProperty))
- {
- return;
- }
-
- editor.SetValue(IsTextChangeSubscribedProperty, true);
- editor.TextChanged += (_, _) =>
- {
- if (editor.Text != GetText(editor))
- {
- SetText(editor, editor.Text);
- }
- };
- }
-}
diff --git a/src/Yavsc.Abstract/Attributes/ActivityBillingAttribute.cs b/src/Yavsc.Abstract/Attributes/ActivityBillingAttribute.cs
index a3f13d7d..3930a69f 100644
--- a/src/Yavsc.Abstract/Attributes/ActivityBillingAttribute.cs
+++ b/src/Yavsc.Abstract/Attributes/ActivityBillingAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Attributes
{
public class ActivityBillingAttribute : Attribute
diff --git a/src/Yavsc.Abstract/Attributes/ActivitySettingsAttribute.cs b/src/Yavsc.Abstract/Attributes/ActivitySettingsAttribute.cs
index f91a7279..8d9b958f 100644
--- a/src/Yavsc.Abstract/Attributes/ActivitySettingsAttribute.cs
+++ b/src/Yavsc.Abstract/Attributes/ActivitySettingsAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Attributes
{
public class ActivitySettingsAttribute : Attribute
diff --git a/src/Yavsc.Abstract/Attributes/Validation/ValidRemoteUserDirAttribute.cs b/src/Yavsc.Abstract/Attributes/Validation/ValidRemoteUserDirAttribute.cs
index 43c44054..33e3f21a 100644
--- a/src/Yavsc.Abstract/Attributes/Validation/ValidRemoteUserDirAttribute.cs
+++ b/src/Yavsc.Abstract/Attributes/Validation/ValidRemoteUserDirAttribute.cs
@@ -1,10 +1,8 @@
-
-using System;
using System.ComponentModel.DataAnnotations;
using Yavsc.Server.Helpers;
namespace Yavsc.Attributes.Validation
-{
+{
///
/// Valid Remote User Dir Attribute
///
@@ -18,7 +16,7 @@ namespace Yavsc.Attributes.Validation
{
if (ErrorMessageResourceType==null) {
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
- ErrorMessageResourceName = "InvalidPath";
+ ErrorMessageResourceName = "InvalidPath";
}
}
diff --git a/src/Yavsc.Abstract/Attributes/Validation/YaRegularExpression.cs b/src/Yavsc.Abstract/Attributes/Validation/YaRegularExpression.cs
index 5bb67326..92175c36 100644
--- a/src/Yavsc.Abstract/Attributes/Validation/YaRegularExpression.cs
+++ b/src/Yavsc.Abstract/Attributes/Validation/YaRegularExpression.cs
@@ -1,14 +1,12 @@
-
-using System;
using System.Reflection;
namespace Yavsc.Attributes.Validation
{
- public class YaRegularExpression : System.ComponentModel.DataAnnotations.RegularExpressionAttribute {
+ public class YaRegularExpression : System.ComponentModel.DataAnnotations.RegularExpressionAttribute {
public YaRegularExpression(string pattern): base (pattern)
{
this.ErrorMessage = "RegularExpression: "+ pattern;
-
+
}
public override string FormatErrorMessage(string name)
@@ -20,4 +18,4 @@ namespace Yavsc.Attributes.Validation
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/Attributes/Validation/YaRequiredAttribute.cs b/src/Yavsc.Abstract/Attributes/Validation/YaRequiredAttribute.cs
index 9f753c20..e3c04be4 100644
--- a/src/Yavsc.Abstract/Attributes/Validation/YaRequiredAttribute.cs
+++ b/src/Yavsc.Abstract/Attributes/Validation/YaRequiredAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Attributes.Validation
{
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
@@ -13,13 +11,13 @@ namespace Yavsc.Attributes.Validation
public YaRequiredAttribute (string msg) : base(msg)
{
ErrorMessage = msg;
- }
+ }
public YaRequiredAttribute () : base("Required Field")
{
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
ErrorMessageResourceName = "FieldRequired";
}
-
+
public override bool IsValid(object value) {
if (value == null) {
return false;
@@ -34,5 +32,5 @@ namespace Yavsc.Attributes.Validation
return true;
}
}
-
-}
\ No newline at end of file
+
+}
diff --git a/src/Yavsc.Abstract/Attributes/Validation/YaStringLength.cs b/src/Yavsc.Abstract/Attributes/Validation/YaStringLength.cs
index c4c7b19f..91015b24 100644
--- a/src/Yavsc.Abstract/Attributes/Validation/YaStringLength.cs
+++ b/src/Yavsc.Abstract/Attributes/Validation/YaStringLength.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Attributes.Validation
{
public partial class YaStringLength: YaValidationAttribute
@@ -21,15 +19,15 @@ namespace Yavsc.Attributes.Validation
{
if (ErrorMessageResourceType==null) {
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
- ErrorMessageResourceName = "InvalidStringLength";
+ ErrorMessageResourceName = "InvalidStringLength";
}
}
public override bool IsValid(object value) {
-
+
string stringValue = value as string;
if (stringValue==null) return MinimumLength <= 0;
- if (MinimumLength>=0)
+ if (MinimumLength>=0)
{
if (stringValue.Length< MinimumLength) {
return false;
diff --git a/src/Yavsc.Abstract/Attributes/Validation/YaValidationAttribute.cs b/src/Yavsc.Abstract/Attributes/Validation/YaValidationAttribute.cs
index 827d26ba..d8d6070d 100644
--- a/src/Yavsc.Abstract/Attributes/Validation/YaValidationAttribute.cs
+++ b/src/Yavsc.Abstract/Attributes/Validation/YaValidationAttribute.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Reflection;
-
namespace Yavsc.Attributes.Validation
{
public class YaValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute
@@ -9,7 +6,7 @@ namespace Yavsc.Attributes.Validation
{
}
-
+
public YaValidationAttribute(Func acr): base(acr)
{
@@ -45,4 +42,4 @@ namespace Yavsc.Attributes.Validation
return GetResourceString(ErrorMessageResourceName);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/Authentication/RegisterModel.cs b/src/Yavsc.Abstract/Authentication/RegisterModel.cs
index e4285f06..2ebb3297 100644
--- a/src/Yavsc.Abstract/Authentication/RegisterModel.cs
+++ b/src/Yavsc.Abstract/Authentication/RegisterModel.cs
@@ -1,7 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
-using Yavsc.Abstract;
- using Yavsc;
namespace Yavsc.ViewModels.Account
{
diff --git a/src/Yavsc.Abstract/Billing/IBillable.cs b/src/Yavsc.Abstract/Billing/IBillable.cs
index dfc9ee0f..416dc5be 100644
--- a/src/Yavsc.Abstract/Billing/IBillable.cs
+++ b/src/Yavsc.Abstract/Billing/IBillable.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using Yavsc.Services;
namespace Yavsc.Billing
diff --git a/src/Yavsc.Abstract/Blogspot/IBlogPost.cs b/src/Yavsc.Abstract/Blogspot/IBlogPost.cs
index 6090fca2..1ef37180 100644
--- a/src/Yavsc.Abstract/Blogspot/IBlogPost.cs
+++ b/src/Yavsc.Abstract/Blogspot/IBlogPost.cs
@@ -2,7 +2,6 @@
using Yavsc.Abstract.Identity.Security;
-using Yavsc.Interfaces;
namespace Yavsc.Blogspot
{
diff --git a/src/Yavsc.Abstract/Chat/IChatRoom.cs b/src/Yavsc.Abstract/Chat/IChatRoom.cs
index 665c7126..1d6f68dd 100644
--- a/src/Yavsc.Abstract/Chat/IChatRoom.cs
+++ b/src/Yavsc.Abstract/Chat/IChatRoom.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Abstract.Chat
@@ -15,4 +14,4 @@ namespace Yavsc.Abstract.Chat
List Moderation { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/FileSystem/AbstractFileSystemHelpers.cs b/src/Yavsc.Abstract/FileSystem/AbstractFileSystemHelpers.cs
index 5e571e24..dd805864 100644
--- a/src/Yavsc.Abstract/FileSystem/AbstractFileSystemHelpers.cs
+++ b/src/Yavsc.Abstract/FileSystem/AbstractFileSystemHelpers.cs
@@ -1,7 +1,4 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Text;
+using System.Text;
using Yavsc.ViewModels.UserFiles;
namespace Yavsc.Server.Helpers
@@ -42,10 +39,10 @@ namespace Yavsc.Server.Helpers
{
if (name.Any(c => !ValidFileNameChars.Contains(c)))
return false;
-
+
if (!name.Any(c => !AlfaNum.Contains(c)))
return false;
-
+
return true;
}
diff --git a/src/Yavsc.Abstract/FileSystem/RemoteFileInfo.cs b/src/Yavsc.Abstract/FileSystem/RemoteFileInfo.cs
index 76cb17eb..2a21823c 100644
--- a/src/Yavsc.Abstract/FileSystem/RemoteFileInfo.cs
+++ b/src/Yavsc.Abstract/FileSystem/RemoteFileInfo.cs
@@ -1,8 +1,6 @@
-using System;
-
-namespace Yavsc.ViewModels
+namespace Yavsc.ViewModels
{
- public class RemoteFileInfo
+ public class RemoteFileInfo
{
public string Name { get; set; }
@@ -11,7 +9,7 @@ namespace Yavsc.ViewModels
public DateTime CreationTime { get; set; }
public DateTime LastModified { get; set; }
-
+
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/FileSystem/UserDirectoryInfo.cs b/src/Yavsc.Abstract/FileSystem/UserDirectoryInfo.cs
index cced9397..fa727d0c 100644
--- a/src/Yavsc.Abstract/FileSystem/UserDirectoryInfo.cs
+++ b/src/Yavsc.Abstract/FileSystem/UserDirectoryInfo.cs
@@ -1,7 +1,3 @@
-using System;
-using System.IO;
-using System.Linq;
-using Yavsc.Abstract.FileSystem;
using Yavsc.Server.Helpers;
namespace Yavsc.ViewModels.UserFiles
@@ -13,7 +9,7 @@ namespace Yavsc.ViewModels.UserFiles
public RemoteFileInfo [] Files {
get; set;
}
- public DirectoryShortInfo [] SubDirectories {
+ public DirectoryShortInfo [] SubDirectories {
get; set;
}
private readonly DirectoryInfo dInfo;
@@ -23,7 +19,7 @@ namespace Yavsc.ViewModels.UserFiles
{
}
-
+
public UserDirectoryInfo(string userReposPath, string userId, string path)
{
if (string.IsNullOrWhiteSpace(userId))
diff --git a/src/Yavsc.Abstract/Google/Calendar/CalendarEventList.cs b/src/Yavsc.Abstract/Google/Calendar/CalendarEventList.cs
index 095c28be..0b8b0682 100644
--- a/src/Yavsc.Abstract/Google/Calendar/CalendarEventList.cs
+++ b/src/Yavsc.Abstract/Google/Calendar/CalendarEventList.cs
@@ -18,8 +18,6 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
-
namespace Yavsc.Models.Google
{
diff --git a/src/Yavsc.Abstract/Google/Calendar/CalendarList.cs b/src/Yavsc.Abstract/Google/Calendar/CalendarList.cs
index c7caccda..84ab1bf0 100644
--- a/src/Yavsc.Abstract/Google/Calendar/CalendarList.cs
+++ b/src/Yavsc.Abstract/Google/Calendar/CalendarList.cs
@@ -19,8 +19,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
-
namespace Yavsc.Models.Google.Calendar
{
///
diff --git a/src/Yavsc.Abstract/Google/Calendar/CalendarListEntry.cs b/src/Yavsc.Abstract/Google/Calendar/CalendarListEntry.cs
index 00a5ffcb..99d9a99b 100644
--- a/src/Yavsc.Abstract/Google/Calendar/CalendarListEntry.cs
+++ b/src/Yavsc.Abstract/Google/Calendar/CalendarListEntry.cs
@@ -19,14 +19,12 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
-
namespace Yavsc.Models.Google.Calendar
{
///
/// Calendar list entry.
///
- ///
+ ///
[Obsolete("use GoogleUse.Apis")]
public class CalendarListEntry {
///
diff --git a/src/Yavsc.Abstract/Google/Calendar/Reminder.cs b/src/Yavsc.Abstract/Google/Calendar/Reminder.cs
index 8a48753c..d10e6da7 100644
--- a/src/Yavsc.Abstract/Google/Calendar/Reminder.cs
+++ b/src/Yavsc.Abstract/Google/Calendar/Reminder.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Models.Google.Calendar
{
[Obsolete("use GoogleUse.Apis")]
diff --git a/src/Yavsc.Abstract/Google/GDate.cs b/src/Yavsc.Abstract/Google/GDate.cs
index e1fe7f5c..3506ba41 100644
--- a/src/Yavsc.Abstract/Google/GDate.cs
+++ b/src/Yavsc.Abstract/Google/GDate.cs
@@ -18,8 +18,6 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
-
namespace Yavsc.Models.Google
{
///
diff --git a/src/Yavsc.Abstract/Google/Messaging/MessageWithPayLoad.cs b/src/Yavsc.Abstract/Google/Messaging/MessageWithPayLoad.cs
index ed683304..344273ad 100644
--- a/src/Yavsc.Abstract/Google/Messaging/MessageWithPayLoad.cs
+++ b/src/Yavsc.Abstract/Google/Messaging/MessageWithPayLoad.cs
@@ -20,7 +20,6 @@
// along with this program. If not, see .
using Yavsc.Abstract.Models.Messaging;
-using Yavsc.Models.Messaging;
namespace Yavsc.Models.Google.Messaging
{
diff --git a/src/Yavsc.Abstract/IT/CodeFromChars.cs b/src/Yavsc.Abstract/IT/CodeFromChars.cs
index b8e2f0d6..ff441568 100644
--- a/src/Yavsc.Abstract/IT/CodeFromChars.cs
+++ b/src/Yavsc.Abstract/IT/CodeFromChars.cs
@@ -1,6 +1,4 @@
-using System;
using System.Collections;
-using System.Collections.Generic;
namespace Yavsc.Abstract.IT
{
@@ -13,10 +11,10 @@ namespace Yavsc.Abstract.IT
}
public CharArray (IList word): base(word) {
-
+
}
public CharArray (IEnumerable word): base(word) {
-
+
}
public IList Aggregate(char other)
@@ -89,10 +87,10 @@ namespace Yavsc.Abstract.IT
State = -3;
return;
}
-
+
State = states[letter];
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/IT/ICode.cs b/src/Yavsc.Abstract/IT/ICode.cs
index c190065a..2661c70c 100644
--- a/src/Yavsc.Abstract/IT/ICode.cs
+++ b/src/Yavsc.Abstract/IT/ICode.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace Yavsc.Abstract.IT
{
// un code est, parmis les ensembles de suites de signes,
@@ -14,7 +12,7 @@ namespace Yavsc.Abstract.IT
bool Validate();
///
- /// Defines a new letter in this code,
+ /// Defines a new letter in this code,
/// as an enumerable of TLetter
///
///
diff --git a/src/Yavsc.Abstract/IT/IProject.cs b/src/Yavsc.Abstract/IT/IProject.cs
index e15fb067..946ab6e9 100644
--- a/src/Yavsc.Abstract/IT/IProject.cs
+++ b/src/Yavsc.Abstract/IT/IProject.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace Yavsc.Abstract.IT
{
public interface IProject
diff --git a/src/Yavsc.Abstract/Identity/TokenInfo.cs b/src/Yavsc.Abstract/Identity/TokenInfo.cs
index 1847f3a2..2c7a4fd4 100644
--- a/src/Yavsc.Abstract/Identity/TokenInfo.cs
+++ b/src/Yavsc.Abstract/Identity/TokenInfo.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Abstract.Identity
{
public class TokenInfo
diff --git a/src/Yavsc.Abstract/Interfaces/IBaseTrackedEntity.cs b/src/Yavsc.Abstract/Interfaces/IBaseTrackedEntity.cs
index f544f654..f79a596e 100644
--- a/src/Yavsc.Abstract/Interfaces/IBaseTrackedEntity.cs
+++ b/src/Yavsc.Abstract/Interfaces/IBaseTrackedEntity.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc
{
public interface ITrackedEntity
diff --git a/src/Yavsc.Abstract/Interfaces/IBatch.cs b/src/Yavsc.Abstract/Interfaces/IBatch.cs
index e3dac450..a31470ec 100644
--- a/src/Yavsc.Abstract/Interfaces/IBatch.cs
+++ b/src/Yavsc.Abstract/Interfaces/IBatch.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Abstract.Interfaces
{
public interface IBatch
diff --git a/src/Yavsc.Abstract/Interfaces/IBillingService.cs b/src/Yavsc.Abstract/Interfaces/IBillingService.cs
index 3ba7fc59..e11c9c99 100644
--- a/src/Yavsc.Abstract/Interfaces/IBillingService.cs
+++ b/src/Yavsc.Abstract/Interfaces/IBillingService.cs
@@ -1,8 +1,7 @@
namespace Yavsc.Services
{
- using System.Linq;
- using System.Threading.Tasks;
- using System.Collections.Generic;
+ using System.Threading.Tasks;
+ using System.Collections.Generic;
using Yavsc.Abstract.Workflow;
public interface IBillingService
diff --git a/src/Yavsc.Abstract/Interfaces/Workflow/IBookQueryData.cs b/src/Yavsc.Abstract/Interfaces/Workflow/IBookQueryData.cs
index 6934f3a9..2c844f92 100644
--- a/src/Yavsc.Abstract/Interfaces/Workflow/IBookQueryData.cs
+++ b/src/Yavsc.Abstract/Interfaces/Workflow/IBookQueryData.cs
@@ -1,5 +1,4 @@
-using System;
-using Yavsc.Abstract.Identity;
+using Yavsc.Abstract.Identity;
namespace Yavsc.Interfaces
{
@@ -11,4 +10,4 @@ namespace Yavsc.Interfaces
ILocation Location { get; set; }
decimal? Previsionnal { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/Messaging/IAnnounce.cs b/src/Yavsc.Abstract/Messaging/IAnnounce.cs
index cd1957af..04d16c1b 100644
--- a/src/Yavsc.Abstract/Messaging/IAnnounce.cs
+++ b/src/Yavsc.Abstract/Messaging/IAnnounce.cs
@@ -1,6 +1,4 @@
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Interfaces;
+using Yavsc.Interfaces;
namespace Yavsc.Models.Messaging
{
@@ -8,5 +6,5 @@ namespace Yavsc.Models.Messaging
Reason For { get; set; }
string Message { get; set; }
}
-
-}
\ No newline at end of file
+
+}
diff --git a/src/Yavsc.Abstract/Messaging/Notification.cs b/src/Yavsc.Abstract/Messaging/Notification.cs
index 8b79e2c8..dbbf735d 100644
--- a/src/Yavsc.Abstract/Messaging/Notification.cs
+++ b/src/Yavsc.Abstract/Messaging/Notification.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -29,7 +28,7 @@ namespace Yavsc.Abstract.Models.Messaging
///
[StringLength(512)]
[Display(Name = "Icône")]
- public string? icon { get; set; }
+ public string? icon { get; set; }
///
/// The sound.
///
diff --git a/src/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs b/src/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs
index 5e9118f3..87125c54 100644
--- a/src/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs
+++ b/src/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs
@@ -1,4 +1,3 @@
-using System;
using Yavsc.Abstract.Identity;
using Yavsc.Models.Relationship;
diff --git a/src/Yavsc.Abstract/Relationship/Location.cs b/src/Yavsc.Abstract/Relationship/Location.cs
index 6c7491f6..de4beb20 100644
--- a/src/Yavsc.Abstract/Relationship/Location.cs
+++ b/src/Yavsc.Abstract/Relationship/Location.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Relationship
{
diff --git a/src/Yavsc.Abstract/Relationship/Position.cs b/src/Yavsc.Abstract/Relationship/Position.cs
index 22b03c76..717ac922 100644
--- a/src/Yavsc.Abstract/Relationship/Position.cs
+++ b/src/Yavsc.Abstract/Relationship/Position.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Relationship
{
diff --git a/src/Yavsc.Abstract/Templates/Template.cs b/src/Yavsc.Abstract/Templates/Template.cs
index ee1a8c8b..c71fcfbf 100644
--- a/src/Yavsc.Abstract/Templates/Template.cs
+++ b/src/Yavsc.Abstract/Templates/Template.cs
@@ -1,5 +1,4 @@
using System.Text;
-using System.Threading.Tasks;
namespace Yavsc.Abstract.Templates
{
diff --git a/src/Yavsc.Abstract/Workflow/IActivity.cs b/src/Yavsc.Abstract/Workflow/IActivity.cs
index 45781b28..2f06420b 100644
--- a/src/Yavsc.Abstract/Workflow/IActivity.cs
+++ b/src/Yavsc.Abstract/Workflow/IActivity.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc
{
public interface IActivity
diff --git a/src/Yavsc.Abstract/Workflow/IMobileDeviceDeclaration.cs b/src/Yavsc.Abstract/Workflow/IMobileDeviceDeclaration.cs
index 4f3613e8..6e55ebe5 100644
--- a/src/Yavsc.Abstract/Workflow/IMobileDeviceDeclaration.cs
+++ b/src/Yavsc.Abstract/Workflow/IMobileDeviceDeclaration.cs
@@ -16,8 +16,6 @@
// along with yavsc. If not, see .
//
-using System;
-
namespace Yavsc
{
public interface IMobileDeviceDeclaration
diff --git a/src/Yavsc.Abstract/Workflow/INominativeQuery.cs b/src/Yavsc.Abstract/Workflow/INominativeQuery.cs
index d498e28d..84dcee69 100644
--- a/src/Yavsc.Abstract/Workflow/INominativeQuery.cs
+++ b/src/Yavsc.Abstract/Workflow/INominativeQuery.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Abstract.Workflow
{
public interface IDecidableQuery: ITrackedEntity, IQuery
diff --git a/src/Yavsc.Abstract/Workflow/Process/Conjonction.cs b/src/Yavsc.Abstract/Workflow/Process/Conjonction.cs
index bd2125db..a45de4e6 100644
--- a/src/Yavsc.Abstract/Workflow/Process/Conjonction.cs
+++ b/src/Yavsc.Abstract/Workflow/Process/Conjonction.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace Yavsc.Models.Process
{
public class Conjonction : List, IRequisition
diff --git a/src/Yavsc.Abstract/Workflow/Process/Disjonction.cs b/src/Yavsc.Abstract/Workflow/Process/Disjonction.cs
index 416257b7..5c4e0831 100644
--- a/src/Yavsc.Abstract/Workflow/Process/Disjonction.cs
+++ b/src/Yavsc.Abstract/Workflow/Process/Disjonction.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace Yavsc.Models.Process
{
public class Disjonction : List, IRequisition
diff --git a/src/Yavsc.Abstract/Workflow/Tasks/IExecutionData.cs b/src/Yavsc.Abstract/Workflow/Tasks/IExecutionData.cs
index fbc72a52..674ed6ac 100644
--- a/src/Yavsc.Abstract/Workflow/Tasks/IExecutionData.cs
+++ b/src/Yavsc.Abstract/Workflow/Tasks/IExecutionData.cs
@@ -1,7 +1,3 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-
namespace Yavsc.Abstract.Workflow
{
public interface IExecutionData
diff --git a/src/Yavsc.Abstract/Workflow/Tasks/ITaskMetaData.cs b/src/Yavsc.Abstract/Workflow/Tasks/ITaskMetaData.cs
index e2371641..9e5365a3 100644
--- a/src/Yavsc.Abstract/Workflow/Tasks/ITaskMetaData.cs
+++ b/src/Yavsc.Abstract/Workflow/Tasks/ITaskMetaData.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Yavsc.Models;
namespace Yavsc.Abstract.Workflow
diff --git a/src/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs b/src/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
index 55c262f7..59f23b8b 100644
--- a/src/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
+++ b/src/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
@@ -1,6 +1,3 @@
-using System.Collections.Generic;
-using System.Linq;
-
namespace Yavsc.Abstract.Workflow
{
public class TaskManager : ITaskRunnerProvider
@@ -17,4 +14,4 @@ namespace Yavsc.Abstract.Workflow
return runners.Where(r => r.GetType().Name.IndexOf(runnerName.Trim())>=0).ToArray();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Abstract/Yavsc.Abstract.csproj b/src/Yavsc.Abstract/Yavsc.Abstract.csproj
index 7a4f83ae..ebbb2d1e 100644
--- a/src/Yavsc.Abstract/Yavsc.Abstract.csproj
+++ b/src/Yavsc.Abstract/Yavsc.Abstract.csproj
@@ -11,10 +11,10 @@
latest
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Api.Client/Yavsc.Api.Client.csproj b/src/Yavsc.Api.Client/Yavsc.Api.Client.csproj
index ade7ca17..047223a6 100644
--- a/src/Yavsc.Api.Client/Yavsc.Api.Client.csproj
+++ b/src/Yavsc.Api.Client/Yavsc.Api.Client.csproj
@@ -17,7 +17,7 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -26,4 +26,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Api/Controllers/Business/ActivityApiController.cs b/src/Yavsc.Api/Controllers/Business/ActivityApiController.cs
index 5aeddc57..6d91ba82 100644
--- a/src/Yavsc.Api/Controllers/Business/ActivityApiController.cs
+++ b/src/Yavsc.Api/Controllers/Business/ActivityApiController.cs
@@ -1,9 +1,4 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/Business/BookQueryApiController.cs b/src/Yavsc.Api/Controllers/Business/BookQueryApiController.cs
index 7e58b071..0d7112ec 100644
--- a/src/Yavsc.Api/Controllers/Business/BookQueryApiController.cs
+++ b/src/Yavsc.Api/Controllers/Business/BookQueryApiController.cs
@@ -1,10 +1,6 @@
-using System.Collections.Generic;
-using System.Linq;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Logging;
namespace Yavsc.Controllers
{
@@ -14,7 +10,6 @@ namespace Yavsc.Controllers
using Yavsc.Models.Billing;
using Yavsc.Abstract.Identity;
using Microsoft.EntityFrameworkCore;
- using Yavsc.Helpers;
using Yavsc.Server.Helpers;
[Produces("application/json")]
diff --git a/src/Yavsc.Api/Controllers/Business/EstimateApiController.cs b/src/Yavsc.Api/Controllers/Business/EstimateApiController.cs
index 902cb038..891909f0 100644
--- a/src/Yavsc.Api/Controllers/Business/EstimateApiController.cs
+++ b/src/Yavsc.Api/Controllers/Business/EstimateApiController.cs
@@ -1,13 +1,8 @@
-using System;
-using System.Linq;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Billing;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/Business/EstimateTemplatesApiController.cs b/src/Yavsc.Api/Controllers/Business/EstimateTemplatesApiController.cs
index 81de4cac..3fc91365 100644
--- a/src/Yavsc.Api/Controllers/Business/EstimateTemplatesApiController.cs
+++ b/src/Yavsc.Api/Controllers/Business/EstimateTemplatesApiController.cs
@@ -1,7 +1,6 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Billing;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs b/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs
index c05da827..91d57d9f 100644
--- a/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs
+++ b/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Helpers;
using Yavsc.Models;
diff --git a/src/Yavsc.Api/Controllers/Business/ProductApiController.cs b/src/Yavsc.Api/Controllers/Business/ProductApiController.cs
index 97a60fdb..d9792839 100644
--- a/src/Yavsc.Api/Controllers/Business/ProductApiController.cs
+++ b/src/Yavsc.Api/Controllers/Business/ProductApiController.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Market;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/HairCut/BursherProfilesApiController.cs b/src/Yavsc.Api/Controllers/HairCut/BursherProfilesApiController.cs
index cd3a561b..00e6e4ea 100644
--- a/src/Yavsc.Api/Controllers/HairCut/BursherProfilesApiController.cs
+++ b/src/Yavsc.Api/Controllers/HairCut/BursherProfilesApiController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Haircut;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/HairCut/HairCutController.cs b/src/Yavsc.Api/Controllers/HairCut/HairCutController.cs
index c1181f54..bf27d1d9 100644
--- a/src/Yavsc.Api/Controllers/HairCut/HairCutController.cs
+++ b/src/Yavsc.Api/Controllers/HairCut/HairCutController.cs
@@ -1,6 +1,4 @@
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Localization;
namespace Yavsc.ApiControllers
@@ -11,7 +9,6 @@ namespace Yavsc.ApiControllers
using System.Security.Claims;
using Microsoft.Extensions.Logging;
using Models;
- using Services;
using Models.Haircut;
using System.Threading.Tasks;
using Helpers;
diff --git a/src/Yavsc.Api/Controllers/Musical/DjProfileApiController.cs b/src/Yavsc.Api/Controllers/Musical/DjProfileApiController.cs
index 050241a7..35e97194 100644
--- a/src/Yavsc.Api/Controllers/Musical/DjProfileApiController.cs
+++ b/src/Yavsc.Api/Controllers/Musical/DjProfileApiController.cs
@@ -1,6 +1,5 @@
namespace Yavsc.ApiControllers
{
- using Models;
using Yavsc.Models.Musical.Profiles;
public class DjProfileApiController : ProfileApiController
diff --git a/src/Yavsc.Api/Controllers/Musical/MusicalPreferencesApiController.cs b/src/Yavsc.Api/Controllers/Musical/MusicalPreferencesApiController.cs
index dc935c14..89d1d265 100644
--- a/src/Yavsc.Api/Controllers/Musical/MusicalPreferencesApiController.cs
+++ b/src/Yavsc.Api/Controllers/Musical/MusicalPreferencesApiController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Musical;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/Musical/MusicalTendenciesApiController.cs b/src/Yavsc.Api/Controllers/Musical/MusicalTendenciesApiController.cs
index e72090f6..67c5c2f8 100644
--- a/src/Yavsc.Api/Controllers/Musical/MusicalTendenciesApiController.cs
+++ b/src/Yavsc.Api/Controllers/Musical/MusicalTendenciesApiController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Musical;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/PostRateApiController.cs b/src/Yavsc.Api/Controllers/PostRateApiController.cs
index 50d6d2e9..83e2bee1 100644
--- a/src/Yavsc.Api/Controllers/PostRateApiController.cs
+++ b/src/Yavsc.Api/Controllers/PostRateApiController.cs
@@ -1,8 +1,6 @@
-using System.Linq;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/ProfileApiController.cs b/src/Yavsc.Api/Controllers/ProfileApiController.cs
index 93bf2a4e..7ae9f153 100644
--- a/src/Yavsc.Api/Controllers/ProfileApiController.cs
+++ b/src/Yavsc.Api/Controllers/ProfileApiController.cs
@@ -2,8 +2,6 @@ using Microsoft.AspNetCore.Mvc;
namespace Yavsc.ApiControllers
{
- using Models;
-
///
/// Base class for managing performers profiles
///
diff --git a/src/Yavsc.Api/Controllers/Relationship/BlackListApiController.cs b/src/Yavsc.Api/Controllers/Relationship/BlackListApiController.cs
index 32cf8495..3a0ca630 100644
--- a/src/Yavsc.Api/Controllers/Relationship/BlackListApiController.cs
+++ b/src/Yavsc.Api/Controllers/Relationship/BlackListApiController.cs
@@ -2,7 +2,6 @@ using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Access;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/Relationship/ChatRoomApiController.cs b/src/Yavsc.Api/Controllers/Relationship/ChatRoomApiController.cs
index 5d59f6bd..d0f712b3 100644
--- a/src/Yavsc.Api/Controllers/Relationship/ChatRoomApiController.cs
+++ b/src/Yavsc.Api/Controllers/Relationship/ChatRoomApiController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Chat;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/Relationship/ContactsApiController.cs b/src/Yavsc.Api/Controllers/Relationship/ContactsApiController.cs
index 96ba03dc..d7ed4607 100644
--- a/src/Yavsc.Api/Controllers/Relationship/ContactsApiController.cs
+++ b/src/Yavsc.Api/Controllers/Relationship/ContactsApiController.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Abstract.Identity;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/ServiceApiController.cs b/src/Yavsc.Api/Controllers/ServiceApiController.cs
index 8556fb5a..98817eeb 100644
--- a/src/Yavsc.Api/Controllers/ServiceApiController.cs
+++ b/src/Yavsc.Api/Controllers/ServiceApiController.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Market;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/accounting/ApplicationUserApiController.cs b/src/Yavsc.Api/Controllers/accounting/ApplicationUserApiController.cs
index cb565a0d..837e7f1e 100644
--- a/src/Yavsc.Api/Controllers/accounting/ApplicationUserApiController.cs
+++ b/src/Yavsc.Api/Controllers/accounting/ApplicationUserApiController.cs
@@ -1,12 +1,7 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Abstract.Identity;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Api/Controllers/accounting/ProfileApiController.cs b/src/Yavsc.Api/Controllers/accounting/ProfileApiController.cs
index ce90b076..3b72e1b6 100644
--- a/src/Yavsc.Api/Controllers/accounting/ProfileApiController.cs
+++ b/src/Yavsc.Api/Controllers/accounting/ProfileApiController.cs
@@ -1,11 +1,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
-using System.Security.Claims;
-using System.Threading.Tasks;
-using System.Linq;
using Yavsc.Models;
using Yavsc.Abstract.Identity;
-using Yavsc.Helpers;
using Yavsc.Server.Helpers;
namespace Yavsc.ApiControllers.accounting
diff --git a/src/Yavsc.Api/Helpers/RequestHelpers.cs b/src/Yavsc.Api/Helpers/RequestHelpers.cs
index 0ab687e0..d92e765e 100644
--- a/src/Yavsc.Api/Helpers/RequestHelpers.cs
+++ b/src/Yavsc.Api/Helpers/RequestHelpers.cs
@@ -1,13 +1,3 @@
-using System.Collections.Generic;
-
-using Microsoft.Extensions.Logging;
-using Microsoft.AspNetCore.Http;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-using Yavsc.ViewModels;
-using Yavsc.Models;
-using System.Linq;
-
namespace Yavsc.Api.Helpers
{
public static class RequestHelpers
diff --git a/src/Yavsc.Api/Program.cs b/src/Yavsc.Api/Program.cs
index f7f247cc..3ed20e8d 100644
--- a/src/Yavsc.Api/Program.cs
+++ b/src/Yavsc.Api/Program.cs
@@ -15,7 +15,6 @@ using IdentityModel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection.Extensions;
-using Yavsc;
using Yavsc.Abstract.Interfaces;
using Yavsc.Helpers;
using Yavsc.Interface;
diff --git a/src/Yavsc.Api/Yavsc.Api.csproj b/src/Yavsc.Api/Yavsc.Api.csproj
index 5672ab7a..2ddeb72d 100644
--- a/src/Yavsc.Api/Yavsc.Api.csproj
+++ b/src/Yavsc.Api/Yavsc.Api.csproj
@@ -7,7 +7,7 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -17,4 +17,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Blogs.Tests/BlogAclApiTests.cs b/src/Yavsc.Blogs.Tests/BlogAclApiTests.cs
index 49259d05..92dd3b2c 100644
--- a/src/Yavsc.Blogs.Tests/BlogAclApiTests.cs
+++ b/src/Yavsc.Blogs.Tests/BlogAclApiTests.cs
@@ -5,8 +5,6 @@ using Microsoft.Extensions.DependencyInjection;
using Yavsc.Abstract.BlogSpot;
using Yavsc.Models;
using Yavsc.Models.Access;
-using Yavsc.Models.Blog;
-using Yavsc.Models.Relationship;
using Yavsc.Tests.Shared;
using static Yavsc.Constants;
diff --git a/src/Yavsc.Blogs.Tests/BlogApiMappedClaimsTests.cs b/src/Yavsc.Blogs.Tests/BlogApiMappedClaimsTests.cs
index f02a1b99..f4878860 100644
--- a/src/Yavsc.Blogs.Tests/BlogApiMappedClaimsTests.cs
+++ b/src/Yavsc.Blogs.Tests/BlogApiMappedClaimsTests.cs
@@ -79,10 +79,10 @@ public sealed class BlogApiMappedClaimsTests : IClassFixture();
+ var created = await response.Content.ReadFromJsonAsync(TestContext.Current.CancellationToken);
Assert.NotNull(created);
Assert.Equal("mapped-user", created!.AuthorId);
}
@@ -101,10 +101,10 @@ public sealed class BlogApiMappedClaimsTests : IClassFixture();
+ var created = await createdResponse.Content.ReadFromJsonAsync(TestContext.Current.CancellationToken);
Assert.NotNull(created);
var updateResponse = await http.PutAsJsonAsync($"/api/v1/blog/{created!.Id}", new BlogPost
@@ -115,7 +115,7 @@ public sealed class BlogApiMappedClaimsTests : IClassFixture();
+ var created = await createdResponse.Content.ReadFromJsonAsync(TestContext.Current.CancellationToken);
Assert.NotNull(created);
using var otherHttp = NewClient(subject: "mapped-other");
@@ -149,7 +149,7 @@ public sealed class BlogApiMappedClaimsTests : IClassFixture
ResetDatabase();
using var http = NewClient();
- var response = await http.GetAsync("/api/v1/blog");
+ var response = await http.GetAsync("/api/v1/blog",
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var body = await response.Content.ReadAsStringAsync();
+ var body = await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken);
// Empty table → empty JSON array. We compare as a JsonDocument
// so a future change in formatting (whitespace, indentation)
// doesn't break the assertion.
@@ -147,20 +147,26 @@ public sealed class BlogApiTests : IClassFixture
DateModified = DateTime.UtcNow
};
- var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft);
+ var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, postResponse.StatusCode);
// The POST returns the server-issued post (with a real Id).
- var created = await postResponse.Content.ReadFromJsonAsync();
+ var created = await postResponse.Content.ReadFromJsonAsync(
+ TestContext.Current.CancellationToken
+ );
Assert.NotNull(created);
Assert.NotEqual(0, created!.Id);
Assert.Equal(draft.Title, created.Title);
// The list should now contain exactly one entry.
- var listResponse = await http.GetAsync("/api/v1/blog");
+ var listResponse = await http.GetAsync("/api/v1/blog",
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, listResponse.StatusCode);
- using var doc = JsonDocument.Parse(await listResponse.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(await listResponse.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ ));
Assert.Equal(JsonValueKind.Array, doc.RootElement.ValueKind);
Assert.Equal(1, doc.RootElement.GetArrayLength());
Assert.Equal(created.Id, doc.RootElement[0].GetProperty("id").GetInt64());
@@ -182,17 +188,23 @@ public sealed class BlogApiTests : IClassFixture
DateModified = DateTime.UtcNow
};
- var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft);
+ var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, postResponse.StatusCode);
- var created = await postResponse.Content.ReadFromJsonAsync();
+ var created = await postResponse.Content.ReadFromJsonAsync(
+ TestContext.Current.CancellationToken
+ );
Assert.NotNull(created);
Assert.Equal("tester", created!.AuthorId);
- var listResponse = await http.GetAsync("/api/v1/blog");
+ var listResponse = await http.GetAsync("/api/v1/blog",
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, listResponse.StatusCode);
- using var doc = JsonDocument.Parse(await listResponse.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(await listResponse.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ ));
Assert.Equal(JsonValueKind.Array, doc.RootElement.ValueKind);
Assert.Equal(1, doc.RootElement.GetArrayLength());
Assert.Equal("tester", doc.RootElement[0].GetProperty("authorId").GetString());
@@ -214,21 +226,27 @@ public sealed class BlogApiTests : IClassFixture
DateModified = DateTime.UtcNow
};
- var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft);
+ var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, postResponse.StatusCode);
- var createdPost = await postResponse.Content.ReadFromJsonAsync();
+ var createdPost = await postResponse.Content.ReadFromJsonAsync(
+ TestContext.Current.CancellationToken
+ );
Assert.NotNull(createdPost);
-
+ Thread.Sleep(100);
var commentResponse = await http.PostAsJsonAsync("/api/v1/blogcomments", new
{
Article = "Premier commentaire",
ReceiverId = createdPost!.Id
- });
+ }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, commentResponse.StatusCode);
- using var doc = JsonDocument.Parse(await commentResponse.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(
+ await commentResponse.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ ));
Assert.True(doc.RootElement.TryGetProperty("id", out var id));
Assert.True(id.GetInt64() > 0);
Assert.True(doc.RootElement.TryGetProperty("dateCreated", out _));
@@ -257,7 +275,8 @@ public sealed class BlogApiTests : IClassFixture
// the framework returns 401. This is the proof that the
// production policy is wired in the test host and not
// short-circuited by a test-only auth bypass.
- var response = await http.GetAsync("/api/v1/blog");
+ var response = await http.GetAsync("/api/v1/blog",
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
}
@@ -284,10 +303,13 @@ public sealed class BlogApiTests : IClassFixture
DateCreated = DateTime.UtcNow,
DateModified = DateTime.UtcNow
};
- var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft);
+ var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, postResponse.StatusCode);
- var created = (await postResponse.Content.ReadFromJsonAsync())!;
+ var created = (await postResponse.Content.ReadFromJsonAsync(
+ TestContext.Current.CancellationToken
+ ))!;
// PUT with the server-issued Id; the controller rejects
// mismatched id/blog.Id with 400, so we keep them aligned.
@@ -300,13 +322,19 @@ public sealed class BlogApiTests : IClassFixture
DateCreated = created.DateCreated,
DateModified = DateTime.UtcNow
};
- var putResponse = await http.PutAsJsonAsync($"/api/v1/blog/{created.Id}", update);
+ var putResponse = await http.PutAsJsonAsync($"/api/v1/blog/{created.Id}",
+ update,
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.NoContent, putResponse.StatusCode);
// The list should now reflect the new title.
- var listResponse = await http.GetAsync("/api/v1/blog");
+ var listResponse = await http.GetAsync("/api/v1/blog",
+ TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, listResponse.StatusCode);
- using var doc = JsonDocument.Parse(await listResponse.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(
+ await listResponse.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ ));
Assert.Equal(JsonValueKind.Array, doc.RootElement.ValueKind);
Assert.Equal(1, doc.RootElement.GetArrayLength());
Assert.Equal("Après", doc.RootElement[0].GetProperty("title").GetString());
@@ -328,15 +356,23 @@ public sealed class BlogApiTests : IClassFixture
DateCreated = DateTime.UtcNow,
DateModified = DateTime.UtcNow
};
- var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft);
- var created = (await postResponse.Content.ReadFromJsonAsync())!;
+ var postResponse = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
+ var created = (await postResponse.Content.ReadFromJsonAsync(
+ TestContext.Current.CancellationToken
+ ))!;
- var deleteResponse = await http.DeleteAsync($"/api/v1/blog/{created.Id}");
+ var deleteResponse = await http.DeleteAsync($"/api/v1/blog/{created.Id}",
+ TestContext.Current.CancellationToken
+ );
Assert.Equal(HttpStatusCode.OK, deleteResponse.StatusCode);
// The list should now be empty.
- var listResponse = await http.GetAsync("/api/v1/blog");
- String response = await listResponse.Content.ReadAsStringAsync();
+ var listResponse = await http.GetAsync("/api/v1/blog",
+ TestContext.Current.CancellationToken);
+ String response = await listResponse.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ );
using var doc = JsonDocument.Parse(response);
Assert.Equal(0, doc.RootElement.GetArrayLength());
}
@@ -375,7 +411,8 @@ public sealed class BlogApiTests : IClassFixture
DateModified = DateTime.UtcNow
};
- var response = await http.PostAsJsonAsync("/api/v1/blog", draft);
+ var response = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
// Dump the body on failure so the test name + the response
// payload are enough to start a fix; the framework's
@@ -383,7 +420,9 @@ public sealed class BlogApiTests : IClassFixture
// Created, got BadRequest").
if (response.StatusCode != HttpStatusCode.Created)
{
- var body = await response.Content.ReadAsStringAsync();
+ var body = await response.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ );
Assert.Fail(string.Format("Expected 201 Created, got {0} {1}. Body: {2}", (int)response.StatusCode, response.StatusCode, body));
}
}
@@ -417,11 +456,14 @@ public sealed class BlogApiTests : IClassFixture
DateModified = DateTime.UtcNow
};
- var response = await http.PostAsJsonAsync("/api/v1/blog", draft);
+ var response = await http.PostAsJsonAsync("/api/v1/blog", draft,
+ TestContext.Current.CancellationToken);
if (response.StatusCode != HttpStatusCode.BadRequest)
{
- var body = await response.Content.ReadAsStringAsync();
+ var body = await response.Content.ReadAsStringAsync(
+ TestContext.Current.CancellationToken
+ );
Assert.Fail(string.Format("Expected 400 BadRequest (empty Title is invalid), got {0} {1}. Body: {2}", (int)response.StatusCode, response.StatusCode, body));
}
}
diff --git a/src/Yavsc.Blogs.Tests/CircleMembersApiTests.cs b/src/Yavsc.Blogs.Tests/CircleMembersApiTests.cs
index a2367180..a7c3001b 100644
--- a/src/Yavsc.Blogs.Tests/CircleMembersApiTests.cs
+++ b/src/Yavsc.Blogs.Tests/CircleMembersApiTests.cs
@@ -1,5 +1,4 @@
using System.Net;
-using System.Net.Http;
using System.Net.Http.Json;
using System.Text.Json;
using Microsoft.Extensions.DependencyInjection;
@@ -114,10 +113,10 @@ public sealed class CircleMembersApiTests : IClassFixture
var circleId = SeedCircle("alice", "Famille");
using var http = NewClient("alice");
- var response = await http.GetAsync(MembersUrl(circleId));
+ var response = await http.GetAsync(MembersUrl(circleId), TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- using var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
Assert.Equal(JsonValueKind.Array, doc.RootElement.ValueKind);
Assert.Equal(0, doc.RootElement.GetArrayLength());
}
@@ -131,14 +130,14 @@ public sealed class CircleMembersApiTests : IClassFixture
var postResponse = await http.PostAsJsonAsync(
MembersUrl(circleId),
- new { userId = "bob" });
+ new { userId = "bob" }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, postResponse.StatusCode);
- var getResponse = await http.GetAsync(MembersUrl(circleId));
+ var getResponse = await http.GetAsync(MembersUrl(circleId), TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode);
- using var doc = JsonDocument.Parse(await getResponse.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(await getResponse.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
Assert.Equal(JsonValueKind.Array, doc.RootElement.ValueKind);
Assert.Equal(1, doc.RootElement.GetArrayLength());
var member = doc.RootElement[0];
@@ -156,12 +155,12 @@ public sealed class CircleMembersApiTests : IClassFixture
var first = await http.PostAsJsonAsync(
MembersUrl(circleId),
- new { userId = "bob" });
+ new { userId = "bob" }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Created, first.StatusCode);
var second = await http.PostAsJsonAsync(
MembersUrl(circleId),
- new { userId = "bob" });
+ new { userId = "bob" }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.Conflict, second.StatusCode);
}
@@ -172,14 +171,14 @@ public sealed class CircleMembersApiTests : IClassFixture
var circleId = SeedCircle("alice", "Famille");
using var http = NewClient("alice");
- await http.PostAsJsonAsync(MembersUrl(circleId), new { userId = "bob" });
+ await http.PostAsJsonAsync(MembersUrl(circleId), new { userId = "bob" }, TestContext.Current.CancellationToken);
var deleteResponse = await http.DeleteAsync(
- $"{MembersUrl(circleId)}/bob");
+ $"{MembersUrl(circleId)}/bob", TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, deleteResponse.StatusCode);
- var getResponse = await http.GetAsync(MembersUrl(circleId));
- using var doc = JsonDocument.Parse(await getResponse.Content.ReadAsStringAsync());
+ var getResponse = await http.GetAsync(MembersUrl(circleId), TestContext.Current.CancellationToken);
+ using var doc = JsonDocument.Parse(await getResponse.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
Assert.Equal(0, doc.RootElement.GetArrayLength());
}
@@ -191,7 +190,7 @@ public sealed class CircleMembersApiTests : IClassFixture
var circleId = SeedCircle("alice", "Famille");
using var http = NewClient("bob");
- var response = await http.GetAsync(MembersUrl(circleId));
+ var response = await http.GetAsync(MembersUrl(circleId), TestContext.Current.CancellationToken);
// 404, not 403 — the controller deliberately avoids leaking
// the existence of someone else's circle.
diff --git a/src/Yavsc.Blogs.Tests/JwtClaimMappingCollection.cs b/src/Yavsc.Blogs.Tests/JwtClaimMappingCollection.cs
index e141c0f3..927453ac 100644
--- a/src/Yavsc.Blogs.Tests/JwtClaimMappingCollection.cs
+++ b/src/Yavsc.Blogs.Tests/JwtClaimMappingCollection.cs
@@ -1,5 +1,3 @@
-using Xunit;
-
namespace Yavsc.Blogs.Tests;
[CollectionDefinition("JwtClaimMapping", DisableParallelization = true)]
diff --git a/src/Yavsc.Blogs.Tests/MappedClaimsBlogsWebServerFixture.cs b/src/Yavsc.Blogs.Tests/MappedClaimsBlogsWebServerFixture.cs
index 6d84aed5..127f38fe 100644
--- a/src/Yavsc.Blogs.Tests/MappedClaimsBlogsWebServerFixture.cs
+++ b/src/Yavsc.Blogs.Tests/MappedClaimsBlogsWebServerFixture.cs
@@ -1,6 +1,5 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
-using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
diff --git a/src/Yavsc.Blogs.Tests/PublishEndpointTests.cs b/src/Yavsc.Blogs.Tests/PublishEndpointTests.cs
index e767a57a..7d5a02a9 100644
--- a/src/Yavsc.Blogs.Tests/PublishEndpointTests.cs
+++ b/src/Yavsc.Blogs.Tests/PublishEndpointTests.cs
@@ -1,5 +1,4 @@
using System.Net;
-using System.Net.Http;
using System.Net.Http.Json;
using System.Text.Json;
using Microsoft.Extensions.DependencyInjection;
@@ -101,12 +100,12 @@ public sealed class PublishEndpointTests : IClassFixture
var postId = SeedPost("alice");
using var http = NewClient("alice");
- var put = await http.PutAsJsonAsync(PublishUrl(postId), new { publish = true });
+ var put = await http.PutAsJsonAsync(PublishUrl(postId), new { publish = true }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.NoContent, put.StatusCode);
- var get = await http.GetAsync($"{BlogsUrl}/{postId}");
+ var get = await http.GetAsync($"{BlogsUrl}/{postId}", TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.OK, get.StatusCode);
- using var doc = JsonDocument.Parse(await get.Content.ReadAsStringAsync());
+ using var doc = JsonDocument.Parse(await get.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
Assert.True(doc.RootElement.GetProperty("isPublished").GetBoolean());
}
@@ -117,12 +116,12 @@ public sealed class PublishEndpointTests : IClassFixture
var postId = SeedPost("alice");
using var http = NewClient("alice");
- await http.PutAsJsonAsync(PublishUrl(postId), new { publish = true });
- var put = await http.PutAsJsonAsync(PublishUrl(postId), new { publish = false });
+ await http.PutAsJsonAsync(PublishUrl(postId), new { publish = true }, TestContext.Current.CancellationToken);
+ var put = await http.PutAsJsonAsync(PublishUrl(postId), new { publish = false }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.NoContent, put.StatusCode);
- var get = await http.GetAsync($"{BlogsUrl}/{postId}");
- using var doc = JsonDocument.Parse(await get.Content.ReadAsStringAsync());
+ var get = await http.GetAsync($"{BlogsUrl}/{postId}", TestContext.Current.CancellationToken);
+ using var doc = JsonDocument.Parse(await get.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
Assert.False(doc.RootElement.GetProperty("isPublished").GetBoolean());
}
@@ -131,7 +130,7 @@ public sealed class PublishEndpointTests : IClassFixture
{
ResetDatabase();
using var http = NewClient("alice");
- var put = await http.PutAsJsonAsync(PublishUrl(99999L), new { publish = true });
+ var put = await http.PutAsJsonAsync(PublishUrl(99999L), new { publish = true }, TestContext.Current.CancellationToken);
Assert.Equal(HttpStatusCode.NotFound, put.StatusCode);
}
@@ -142,7 +141,7 @@ public sealed class PublishEndpointTests : IClassFixture
var postId = SeedPost("alice");
using var http = NewClient("bob");
- var put = await http.PutAsJsonAsync(PublishUrl(postId), new { publish = true });
+ var put = await http.PutAsJsonAsync(PublishUrl(postId), new { publish = true }, TestContext.Current.CancellationToken);
// 401 Challenge (the controller returns Challenge()
// for AuthorizationFailureException). The exact code
// is framework-dependent; what matters is "not 204".
diff --git a/src/Yavsc.Blogs.Tests/Yavsc.Blogs.Tests.csproj b/src/Yavsc.Blogs.Tests/Yavsc.Blogs.Tests.csproj
index fc7883ce..34536806 100644
--- a/src/Yavsc.Blogs.Tests/Yavsc.Blogs.Tests.csproj
+++ b/src/Yavsc.Blogs.Tests/Yavsc.Blogs.Tests.csproj
@@ -9,7 +9,7 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -35,4 +35,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Blogs/Controllers/CircleApiController.cs b/src/Yavsc.Blogs/Controllers/CircleApiController.cs
index ea3c981b..524f0471 100644
--- a/src/Yavsc.Blogs/Controllers/CircleApiController.cs
+++ b/src/Yavsc.Blogs/Controllers/CircleApiController.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Models;
diff --git a/src/Yavsc.Blogs/Program.cs b/src/Yavsc.Blogs/Program.cs
index 952115d3..00ac7f6f 100644
--- a/src/Yavsc.Blogs/Program.cs
+++ b/src/Yavsc.Blogs/Program.cs
@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection.Extensions;
-using Yavsc;
using Yavsc.Interface;
using Yavsc.Interfaces;
using Yavsc.Models;
diff --git a/src/Yavsc.Blogs/Yavsc.Blogs.csproj b/src/Yavsc.Blogs/Yavsc.Blogs.csproj
index 5c175cb5..019fb102 100644
--- a/src/Yavsc.Blogs/Yavsc.Blogs.csproj
+++ b/src/Yavsc.Blogs/Yavsc.Blogs.csproj
@@ -8,7 +8,7 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -18,4 +18,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Org.Tests/ComputeKidTests.cs b/src/Yavsc.Org.Tests/ComputeKidTests.cs
index af9d94a9..b1338bbd 100644
--- a/src/Yavsc.Org.Tests/ComputeKidTests.cs
+++ b/src/Yavsc.Org.Tests/ComputeKidTests.cs
@@ -1,9 +1,5 @@
-using System;
-using System.IO;
-using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
-using Xunit;
using Yavsc.Extensions;
namespace Yavsc.Org.Tests;
diff --git a/src/Yavsc.Org.Tests/Controllers/ClientControllerCollectionTests.cs b/src/Yavsc.Org.Tests/Controllers/ClientControllerCollectionTests.cs
index 8883c75d..d2e40f53 100644
--- a/src/Yavsc.Org.Tests/Controllers/ClientControllerCollectionTests.cs
+++ b/src/Yavsc.Org.Tests/Controllers/ClientControllerCollectionTests.cs
@@ -1,11 +1,8 @@
using System.Net;
-using System.Net.Http;
-using System.Threading.Tasks;
using IdentityServer8.EntityFramework.Entities;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Xunit;
using Yavsc.Models;
using Yavsc.Tests.Shared;
diff --git a/src/Yavsc.Org.Tests/Controllers/CommandFormsControllerTests.cs b/src/Yavsc.Org.Tests/Controllers/CommandFormsControllerTests.cs
index 953ac43c..462d6fca 100644
--- a/src/Yavsc.Org.Tests/Controllers/CommandFormsControllerTests.cs
+++ b/src/Yavsc.Org.Tests/Controllers/CommandFormsControllerTests.cs
@@ -1,8 +1,5 @@
using System.Net;
-using System.Net.Http;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Testing;
-using Xunit;
using Yavsc.Tests.Shared;
namespace Yavsc.Org.Tests.Controllers;
diff --git a/src/Yavsc.Org.Tests/Controllers/TestWebApplicationFactoryIsolationTests.cs b/src/Yavsc.Org.Tests/Controllers/TestWebApplicationFactoryIsolationTests.cs
new file mode 100644
index 00000000..ec86ffe8
--- /dev/null
+++ b/src/Yavsc.Org.Tests/Controllers/TestWebApplicationFactoryIsolationTests.cs
@@ -0,0 +1,68 @@
+using IdentityServer8.EntityFramework.DbContexts;
+using IdentityServer8.EntityFramework.Entities;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace Yavsc.Org.Tests.Controllers;
+
+///
+/// Regression sentinel: two
+/// instances must not see each other's clients.
+///
+/// EF Core's UseInMemoryDatabase(name) returns the same
+/// backing store to every DbContext that asks for it under
+/// the same name, in the same process. Before the per-fixture GUID
+/// fix, both and
+/// used the bare "InMemory"
+/// connection string, so every fixture shared one store and tests
+/// were silently order-dependent.
+///
+/// We assert against directly
+/// rather than via IClientStore: the validating wrapper around
+/// IClientStore raises events through IEventService,
+/// which is not registered in the test host and crashes with a
+/// NullReferenceException before it can return a result. Going
+/// straight to the DbContext is the same code path the production
+/// code uses, so it is the right surface to assert against.
+///
+public class TestWebApplicationFactoryIsolationTests
+{
+ [Fact]
+ public async Task Second_factory_does_not_see_clients_seeded_into_first()
+ {
+ var marker = $"marker-A-{Guid.NewGuid():N}";
+
+ // First factory: seed a distinctive client.
+ using (var first = new TestWebApplicationFactory())
+ {
+ await using var scope = first.Services.CreateAsyncScope();
+ var configDb = scope.ServiceProvider.GetRequiredService();
+ var firstCs = scope.ServiceProvider.GetRequiredService()
+ .GetConnectionString("YavscConnection");
+ Assert.StartsWith("InMemory-", firstCs);
+ configDb.Clients.Add(new Client { ClientId = marker, ClientName = "marker-A" });
+ await configDb.SaveChangesAsync(TestContext.Current.CancellationToken);
+
+ // Sanity: the first factory can see its own seed.
+ var seenByFirst = await configDb.Clients
+ .AsNoTracking()
+ .AnyAsync(c => c.ClientId == marker, TestContext.Current.CancellationToken);
+ Assert.True(seenByFirst);
+ }
+
+ // Second factory: must start from a clean slate. If the
+ // in-memory store leaked from the first factory, this
+ // assertion fails.
+ using var second = new TestWebApplicationFactory();
+ await using var secondScope = second.Services.CreateAsyncScope();
+ var secondCs = secondScope.ServiceProvider.GetRequiredService()
+ .GetConnectionString("YavscConnection");
+ Assert.StartsWith("InMemory-", secondCs);
+ var secondDb = secondScope.ServiceProvider.GetRequiredService();
+ var seenBySecond = await secondDb.Clients
+ .AsNoTracking()
+ .AnyAsync(c => c.ClientId == marker, TestContext.Current.CancellationToken);
+ Assert.False(seenBySecond);
+ }
+}
diff --git a/src/Yavsc.Org.Tests/EstimateSignatureFileHelperTests.cs b/src/Yavsc.Org.Tests/EstimateSignatureFileHelperTests.cs
index 9de881af..69009432 100644
--- a/src/Yavsc.Org.Tests/EstimateSignatureFileHelperTests.cs
+++ b/src/Yavsc.Org.Tests/EstimateSignatureFileHelperTests.cs
@@ -1,11 +1,5 @@
-using System;
-using System.IO;
using System.Security.Claims;
using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
-using Xunit;
-using Yavsc.Models;
using Yavsc.Models.Billing;
using Yavsc.Server.Helpers;
using Yavsc.Server.Models.FileSystem;
@@ -97,9 +91,13 @@ public class EstimateSignatureFileHelperTests : IDisposable
public async Task ReceiveEstimateSignatureAsync_rejects_null_payload()
{
var user = MakeUser("bob");
+ // Capture TestContext.Current.CancellationToken outside the
+ // lambda so xUnit1051 sees a real CancellationToken argument
+ // (the lambda body runs on a different stack frame).
+ var ct = TestContext.Current.CancellationToken;
await Assert.ThrowsAsync(() =>
EstimateSignatureFileHelper.ReceiveEstimateSignatureAsync(
- user, 1L, SignatureType.Pro, payload: null!));
+ user, 1L, SignatureType.Pro, payload: null!, token: ct));
}
[Fact]
@@ -107,9 +105,10 @@ public class EstimateSignatureFileHelperTests : IDisposable
{
var user = MakeUser("bob");
var payload = new SignaturePadPayload { Strokes = new[] { 1, 100, 100 } };
+ var ct = TestContext.Current.CancellationToken;
await Assert.ThrowsAsync(() =>
EstimateSignatureFileHelper.ReceiveEstimateSignatureAsync(
- user, 0L, SignatureType.Pro, payload));
+ user, 0L, SignatureType.Pro, payload, token: ct));
}
// --- helpers ----------------------------------------------------
diff --git a/src/Yavsc.Org.Tests/NonRegression/ApplicationUserDisplayTemplateTests.cs b/src/Yavsc.Org.Tests/NonRegression/ApplicationUserDisplayTemplateTests.cs
index 9fed6a15..e0f8e9bf 100644
--- a/src/Yavsc.Org.Tests/NonRegression/ApplicationUserDisplayTemplateTests.cs
+++ b/src/Yavsc.Org.Tests/NonRegression/ApplicationUserDisplayTemplateTests.cs
@@ -1,6 +1,3 @@
-using System.IO;
-using Xunit;
-
namespace Yavsc.Org.Tests.NonRegression;
///
diff --git a/src/Yavsc.Org.Tests/NonRegression/BillingServiceTests.cs b/src/Yavsc.Org.Tests/NonRegression/BillingServiceTests.cs
index bf40438a..261308a2 100644
--- a/src/Yavsc.Org.Tests/NonRegression/BillingServiceTests.cs
+++ b/src/Yavsc.Org.Tests/NonRegression/BillingServiceTests.cs
@@ -1,10 +1,7 @@
using Microsoft.EntityFrameworkCore;
-using Xunit;
-using Yavsc;
using Yavsc.Abstract.Workflow;
using Yavsc.Helpers;
using Yavsc.Models;
-using Yavsc.Models.Billing;
using Yavsc.Models.Haircut;
using Yavsc.Services;
diff --git a/src/Yavsc.Org.Tests/NonRegression/OidcSeedTests.cs b/src/Yavsc.Org.Tests/NonRegression/OidcSeedTests.cs
index af449ae7..5bf46a30 100644
--- a/src/Yavsc.Org.Tests/NonRegression/OidcSeedTests.cs
+++ b/src/Yavsc.Org.Tests/NonRegression/OidcSeedTests.cs
@@ -1,5 +1,3 @@
-using Xunit;
-
namespace Yavsc
{
///
diff --git a/src/Yavsc.Org.Tests/NonRegression/UserDisplayHelpersTests.cs b/src/Yavsc.Org.Tests/NonRegression/UserDisplayHelpersTests.cs
index 7543a42e..c7c46db9 100644
--- a/src/Yavsc.Org.Tests/NonRegression/UserDisplayHelpersTests.cs
+++ b/src/Yavsc.Org.Tests/NonRegression/UserDisplayHelpersTests.cs
@@ -1,5 +1,3 @@
-using Xunit;
-using Yavsc.Abstract;
using Yavsc.Abstract.Identity;
namespace Yavsc.Org.Tests.NonRegression;
diff --git a/src/Yavsc.Org.Tests/Smoke/AccountSmokeTests.cs b/src/Yavsc.Org.Tests/Smoke/AccountSmokeTests.cs
index 50f92d63..c77a20ab 100644
--- a/src/Yavsc.Org.Tests/Smoke/AccountSmokeTests.cs
+++ b/src/Yavsc.Org.Tests/Smoke/AccountSmokeTests.cs
@@ -1,6 +1,3 @@
-using System.Threading.Tasks;
-using Xunit;
-
namespace Yavsc.Org.Tests.Smoke;
///
diff --git a/src/Yavsc.Org.Tests/Smoke/BlogSmokeTests.cs b/src/Yavsc.Org.Tests/Smoke/BlogSmokeTests.cs
index 8aa95347..96650ba8 100644
--- a/src/Yavsc.Org.Tests/Smoke/BlogSmokeTests.cs
+++ b/src/Yavsc.Org.Tests/Smoke/BlogSmokeTests.cs
@@ -1,6 +1,3 @@
-using System.Threading.Tasks;
-using Xunit;
-
namespace Yavsc.Org.Tests.Smoke;
///
diff --git a/src/Yavsc.Org.Tests/Smoke/SmokeTestBase.cs b/src/Yavsc.Org.Tests/Smoke/SmokeTestBase.cs
index 1029effc..29fd9b46 100644
--- a/src/Yavsc.Org.Tests/Smoke/SmokeTestBase.cs
+++ b/src/Yavsc.Org.Tests/Smoke/SmokeTestBase.cs
@@ -1,8 +1,3 @@
-using System.Net;
-using System.Net.Http;
-using System.Threading.Tasks;
-using Xunit;
-
namespace Yavsc.Org.Tests.Smoke;
///
diff --git a/src/Yavsc.Org.Tests/StaticAssetsPathsTests.cs b/src/Yavsc.Org.Tests/StaticAssetsPathsTests.cs
index 01962268..fcc22e1c 100644
--- a/src/Yavsc.Org.Tests/StaticAssetsPathsTests.cs
+++ b/src/Yavsc.Org.Tests/StaticAssetsPathsTests.cs
@@ -1,7 +1,3 @@
-using System.IO;
-using Xunit;
-using Xunit.v3;
-
namespace Yavsc.Org.Tests;
///
diff --git a/src/Yavsc.Org.Tests/TestUserMiddleware.cs b/src/Yavsc.Org.Tests/TestUserMiddleware.cs
index b88a75e3..7117b2ed 100644
--- a/src/Yavsc.Org.Tests/TestUserMiddleware.cs
+++ b/src/Yavsc.Org.Tests/TestUserMiddleware.cs
@@ -1,6 +1,4 @@
-using System.Linq;
using System.Security.Claims;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Yavsc.Tests.Shared;
diff --git a/src/Yavsc.Org.Tests/TestWebApplicationFactory.cs b/src/Yavsc.Org.Tests/TestWebApplicationFactory.cs
index dfd6edea..b85cba11 100644
--- a/src/Yavsc.Org.Tests/TestWebApplicationFactory.cs
+++ b/src/Yavsc.Org.Tests/TestWebApplicationFactory.cs
@@ -21,9 +21,54 @@ namespace Yavsc.Org.Tests;
/// so that User.GetUserId()
/// in user code sees a logged-in identity derived from the same
/// header.
+///
+/// Each instance gets its own in-memory database, identified by a
+/// GUID generated in the constructor. The connection string
+/// (ConnectionStrings:YavscConnection) is set as an
+/// environment variable (ConnectionStrings__YavscConnection)
+/// in the constructor and unset in , so the
+/// production AddIdentityDBAndStores registers DbContext
+/// instances against this fixture's own store. Without this, the
+/// "InMemory" connection string from
+/// appsettings-org.Testing.json would route every
+/// instance — and any
+/// running in the same process — to
+/// the same backing store, leaking state between fixtures.
+///
+/// Env vars are used (rather than ConfigureAppConfiguration or
+/// UseSetting) because WebApplicationFactory applies
+/// those too late: Program.Main has already captured the
+/// connection string in AddIdentityDBAndStores by the time
+/// the test host's overrides take effect. Env vars are the last
+/// provider added in AddConfiguration (see
+/// Yavsc.Server/Helpers/ConfigHelpers.cs), so they win.
///
public class TestWebApplicationFactory : WebApplicationFactory
{
+ private readonly string _fixtureId = Guid.NewGuid().ToString("N");
+
+ // ASP.NET Core's environment-variable configuration provider uses
+ // the key ConnectionStrings__YavscConnection (double underscore
+ // for the section separator). Set it before the host starts so
+ // the per-fixture connection string wins over
+ // appsettings-org.Testing.json. We do NOT touch the appsettings
+ // file; env vars take precedence in the configuration pipeline
+ // (see AddConfiguration in Yavsc.Server/Helpers/ConfigHelpers.cs,
+ // which adds AddEnvironmentVariables last).
+ private static readonly object _envLock = new();
+ private bool _envSet;
+
+ public TestWebApplicationFactory()
+ {
+ lock (_envLock)
+ {
+ Environment.SetEnvironmentVariable(
+ "ConnectionStrings__YavscConnection",
+ InMemoryDatabaseName.For(_fixtureId));
+ _envSet = true;
+ }
+ }
+
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
// UseEnvironment("Testing") puts the host in a dedicated
@@ -50,4 +95,18 @@ public class TestWebApplicationFactory : WebApplicationFactory
services.AddTransient();
});
}
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && _envSet)
+ {
+ lock (_envLock)
+ {
+ Environment.SetEnvironmentVariable(
+ "ConnectionStrings__YavscConnection", null);
+ _envSet = false;
+ }
+ }
+ base.Dispose(disposing);
+ }
}
diff --git a/src/Yavsc.Org.Tests/WebServerFixture.cs b/src/Yavsc.Org.Tests/WebServerFixture.cs
index edfd87d9..4f736ecf 100644
--- a/src/Yavsc.Org.Tests/WebServerFixture.cs
+++ b/src/Yavsc.Org.Tests/WebServerFixture.cs
@@ -10,7 +10,6 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System.Net;
using System.Net.Sockets;
-using Yavsc;
using Yavsc.Extensions;
using Yavsc.Interfaces;
using Yavsc.Models;
@@ -43,6 +42,17 @@ public sealed class WebServerFixture : WebHostFixture
{
private static readonly int _httpsPort = GetAvailableLoopbackPort();
+ // One in-memory database name for the whole process: WebHostFixture
+ // is a per-process singleton (see _app, _isInitialized, _sharedServices
+ // in the base class), so every WebServerFixture instance shares the
+ // same backing store. That is intentional — the "Yavsc Server" test
+ // collection groups tests that should see the same seeded state, and
+ // re-initialising the store per fixture would just regress the
+ // order-dependence we are trying to eliminate. The GUID still matters
+ // because TestWebApplicationFactory and WebServerFixture must not
+ // collide in the in-memory store; see InMemoryDatabaseName.
+ private static readonly string _fixtureId = Guid.NewGuid().ToString("N");
+
protected override int HttpsPort => _httpsPort;
private static IConfiguration? _sharedConfiguration;
@@ -81,7 +91,7 @@ public sealed class WebServerFixture : WebHostFixture
// that plus the in-memory overrides below.
builder.AddConfiguration(null).AddInMemoryCollection(new Dictionary
{
- [$"ConnectionStrings:{Yavsc.Constants.YavscConnectionStringName}"] = "InMemory",
+ [$"ConnectionStrings:{Yavsc.Constants.YavscConnectionStringName}"] = InMemoryDatabaseName.For(_fixtureId),
// SMTP test config: UserName non-null so MailSender
// exercises the Authenticate branch — the
// RecordingSmtpClient captures it.
diff --git a/src/Yavsc.Org.Tests/Yavsc.Org.Tests.csproj b/src/Yavsc.Org.Tests/Yavsc.Org.Tests.csproj
index 88842cb4..34de5bd8 100644
--- a/src/Yavsc.Org.Tests/Yavsc.Org.Tests.csproj
+++ b/src/Yavsc.Org.Tests/Yavsc.Org.Tests.csproj
@@ -11,7 +11,7 @@
$(MSBuildProjectDirectory)\test.runsettings
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -89,4 +89,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Org/Contants.cs b/src/Yavsc.Org/Contants.cs
index c8d79d6d..c4a5e8b1 100644
--- a/src/Yavsc.Org/Contants.cs
+++ b/src/Yavsc.Org/Contants.cs
@@ -1,8 +1,6 @@
namespace Yavsc.Org;
-using IdentityServer8.EntityFramework.Entities;
-
public static class Constants
{
// ApiScopes seeded explicitly by EnsureDefaultApplicationScopes.
diff --git a/src/Yavsc.Org/Controllers/Accounting/ExternalController.cs b/src/Yavsc.Org/Controllers/Accounting/ExternalController.cs
index 1e0dd487..11bf1684 100644
--- a/src/Yavsc.Org/Controllers/Accounting/ExternalController.cs
+++ b/src/Yavsc.Org/Controllers/Accounting/ExternalController.cs
@@ -20,7 +20,6 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
using Yavsc;
using Yavsc.Extensions;
using Yavsc.Interfaces;
diff --git a/src/Yavsc.Org/Controllers/Accounting/UsersController.cs b/src/Yavsc.Org/Controllers/Accounting/UsersController.cs
index cab06844..a94157ee 100644
--- a/src/Yavsc.Org/Controllers/Accounting/UsersController.cs
+++ b/src/Yavsc.Org/Controllers/Accounting/UsersController.cs
@@ -1,4 +1,3 @@
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
diff --git a/src/Yavsc.Org/Controllers/Administration/AdministrationController.cs b/src/Yavsc.Org/Controllers/Administration/AdministrationController.cs
index e2944e9e..3abf8296 100644
--- a/src/Yavsc.Org/Controllers/Administration/AdministrationController.cs
+++ b/src/Yavsc.Org/Controllers/Administration/AdministrationController.cs
@@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Abstract.Identity;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.ViewModels;
diff --git a/src/Yavsc.Org/Controllers/Administration/ClientController.cs b/src/Yavsc.Org/Controllers/Administration/ClientController.cs
index ac3dc326..ed7e278e 100644
--- a/src/Yavsc.Org/Controllers/Administration/ClientController.cs
+++ b/src/Yavsc.Org/Controllers/Administration/ClientController.cs
@@ -1,4 +1,3 @@
-using IdentityServer8.EntityFramework.DbContexts;
using IdentityServer8.EntityFramework.Entities;
using IdentityServer8.EntityFramework.Stores;
using Microsoft.AspNetCore.Authorization;
diff --git a/src/Yavsc.Org/Controllers/Administration/MailingTemplateController.cs b/src/Yavsc.Org/Controllers/Administration/MailingTemplateController.cs
index caaebc11..9be8b7c4 100644
--- a/src/Yavsc.Org/Controllers/Administration/MailingTemplateController.cs
+++ b/src/Yavsc.Org/Controllers/Administration/MailingTemplateController.cs
@@ -2,12 +2,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Yavsc.Models;
-using Yavsc.Models.Calendar;
using Yavsc.Server.Models.EMailing;
using Microsoft.AspNetCore.Authorization;
using Yavsc.Server.Settings;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Server.Models.Calendar;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Communicating/AnnouncesController.cs b/src/Yavsc.Org/Controllers/Communicating/AnnouncesController.cs
index f8b41c99..d2aefcdb 100644
--- a/src/Yavsc.Org/Controllers/Communicating/AnnouncesController.cs
+++ b/src/Yavsc.Org/Controllers/Communicating/AnnouncesController.cs
@@ -1,11 +1,9 @@
-using System.Threading.Tasks;
using Yavsc.ViewModels.Auth;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Models;
using Yavsc.Models.Messaging;
using Microsoft.Extensions.Localization;
-using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Communicating/CircleController.cs b/src/Yavsc.Org/Controllers/Communicating/CircleController.cs
index 8a19ba6b..d4110047 100644
--- a/src/Yavsc.Org/Controllers/Communicating/CircleController.cs
+++ b/src/Yavsc.Org/Controllers/Communicating/CircleController.cs
@@ -2,7 +2,6 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Relationship;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Communicating/CircleMembersController.cs b/src/Yavsc.Org/Controllers/Communicating/CircleMembersController.cs
index 2710c7cd..a64a1cf7 100644
--- a/src/Yavsc.Org/Controllers/Communicating/CircleMembersController.cs
+++ b/src/Yavsc.Org/Controllers/Communicating/CircleMembersController.cs
@@ -3,7 +3,6 @@ using System.Security.Claims;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Relationship;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Communicating/NotificationsController.cs b/src/Yavsc.Org/Controllers/Communicating/NotificationsController.cs
index 5a3c25de..05df7f55 100644
--- a/src/Yavsc.Org/Controllers/Communicating/NotificationsController.cs
+++ b/src/Yavsc.Org/Controllers/Communicating/NotificationsController.cs
@@ -1,9 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Abstract.Models.Messaging;
-using Yavsc.Helpers;
using Yavsc.Models;
-using Yavsc.Models.Messaging;
using Yavsc.Server.Helpers;
namespace Yavsc.Controllers
diff --git a/src/Yavsc.Org/Controllers/Consent/ConsentController.cs b/src/Yavsc.Org/Controllers/Consent/ConsentController.cs
index b7b6eff8..b11ce511 100644
--- a/src/Yavsc.Org/Controllers/Consent/ConsentController.cs
+++ b/src/Yavsc.Org/Controllers/Consent/ConsentController.cs
@@ -8,15 +8,9 @@ using IdentityServer8.Services;
using IdentityServer8.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Logging;
-using System.Linq;
-using System.Threading.Tasks;
using IdentityServer8.Validation;
-using System.Collections.Generic;
-using System;
using Yavsc;
using Yavsc.Extensions;
-using Yavsc.Models;
namespace IdentityServerHost.Quickstart.UI
{
diff --git a/src/Yavsc.Org/Controllers/Consent/ConsentInputModel.cs b/src/Yavsc.Org/Controllers/Consent/ConsentInputModel.cs
index f608fe3b..9eb30853 100644
--- a/src/Yavsc.Org/Controllers/Consent/ConsentInputModel.cs
+++ b/src/Yavsc.Org/Controllers/Consent/ConsentInputModel.cs
@@ -1,9 +1,6 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-
-using System.Collections.Generic;
-
namespace IdentityServerHost.Quickstart.UI
{
public class ConsentInputModel
@@ -14,4 +11,4 @@ namespace IdentityServerHost.Quickstart.UI
public string ReturnUrl { get; set; }
public string Description { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Org/Controllers/Consent/ConsentViewModel.cs b/src/Yavsc.Org/Controllers/Consent/ConsentViewModel.cs
index af4b9c5c..3d157578 100644
--- a/src/Yavsc.Org/Controllers/Consent/ConsentViewModel.cs
+++ b/src/Yavsc.Org/Controllers/Consent/ConsentViewModel.cs
@@ -1,9 +1,6 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-
-using System.Collections.Generic;
-
namespace IdentityServerHost.Quickstart.UI
{
public class ConsentViewModel : ConsentInputModel
diff --git a/src/Yavsc.Org/Controllers/Contracting/CoWorkingController.cs b/src/Yavsc.Org/Controllers/Contracting/CoWorkingController.cs
index 0d173df5..f719085c 100644
--- a/src/Yavsc.Org/Controllers/Contracting/CoWorkingController.cs
+++ b/src/Yavsc.Org/Controllers/Contracting/CoWorkingController.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Workflow;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Contracting/DoController.cs b/src/Yavsc.Org/Controllers/Contracting/DoController.cs
index f0393a80..a62312c4 100644
--- a/src/Yavsc.Org/Controllers/Contracting/DoController.cs
+++ b/src/Yavsc.Org/Controllers/Contracting/DoController.cs
@@ -11,7 +11,6 @@ namespace Yavsc.Controllers
using Yavsc.ViewModels.Workflow;
using Yavsc.Services;
using System.Threading.Tasks;
- using Yavsc.Helpers;
using Microsoft.EntityFrameworkCore;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Contracting/EstimateController.cs b/src/Yavsc.Org/Controllers/Contracting/EstimateController.cs
index bbcc89fc..5dbd882b 100644
--- a/src/Yavsc.Org/Controllers/Contracting/EstimateController.cs
+++ b/src/Yavsc.Org/Controllers/Contracting/EstimateController.cs
@@ -2,7 +2,6 @@ using System.Net.Mime;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Yavsc.Helpers;
namespace Yavsc.Controllers
{
diff --git a/src/Yavsc.Org/Controllers/Contracting/FormsController.cs b/src/Yavsc.Org/Controllers/Contracting/FormsController.cs
index e7243022..423cf2f4 100644
--- a/src/Yavsc.Org/Controllers/Contracting/FormsController.cs
+++ b/src/Yavsc.Org/Controllers/Contracting/FormsController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Forms;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Contracting/MusicalTendenciesController.cs b/src/Yavsc.Org/Controllers/Contracting/MusicalTendenciesController.cs
index ca7996a3..ee8d40e7 100644
--- a/src/Yavsc.Org/Controllers/Contracting/MusicalTendenciesController.cs
+++ b/src/Yavsc.Org/Controllers/Contracting/MusicalTendenciesController.cs
@@ -4,7 +4,6 @@ namespace Yavsc.Controllers
{
using Models;
using Models.Musical;
- using Yavsc.Helpers;
using Yavsc.Server.Helpers;
public class MusicalTendenciesController : Controller
diff --git a/src/Yavsc.Org/Controllers/Contracting/SIRENExceptionsController.cs b/src/Yavsc.Org/Controllers/Contracting/SIRENExceptionsController.cs
index baa7f060..bf08484e 100644
--- a/src/Yavsc.Org/Controllers/Contracting/SIRENExceptionsController.cs
+++ b/src/Yavsc.Org/Controllers/Contracting/SIRENExceptionsController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Billing;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Device/DeviceController.cs b/src/Yavsc.Org/Controllers/Device/DeviceController.cs
index 2e516aa6..0a10e28f 100644
--- a/src/Yavsc.Org/Controllers/Device/DeviceController.cs
+++ b/src/Yavsc.Org/Controllers/Device/DeviceController.cs
@@ -2,10 +2,6 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using IdentityServer8.Configuration;
using IdentityServer8.Events;
using IdentityServer8.Extensions;
@@ -14,7 +10,6 @@ using IdentityServer8.Services;
using IdentityServer8.Validation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Yavsc.Models;
using Yavsc.Models.Access;
diff --git a/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsController.cs b/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsController.cs
index ffdfb78d..65870f85 100644
--- a/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsController.cs
+++ b/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsController.cs
@@ -2,8 +2,6 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
diff --git a/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsViewModel.cs b/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsViewModel.cs
index d88cbc5e..b50d5c48 100644
--- a/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsViewModel.cs
+++ b/src/Yavsc.Org/Controllers/Diagnostics/DiagnosticsViewModel.cs
@@ -5,7 +5,6 @@
using IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Newtonsoft.Json;
-using System.Collections.Generic;
using System.Text;
namespace Yavsc.Models
diff --git a/src/Yavsc.Org/Controllers/DimissClicksApiController.cs b/src/Yavsc.Org/Controllers/DimissClicksApiController.cs
index b07bc4b3..56fec223 100644
--- a/src/Yavsc.Org/Controllers/DimissClicksApiController.cs
+++ b/src/Yavsc.Org/Controllers/DimissClicksApiController.cs
@@ -2,7 +2,6 @@ using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Messaging;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/FileSystemController.cs b/src/Yavsc.Org/Controllers/FileSystemController.cs
index 84579675..e4f18b39 100644
--- a/src/Yavsc.Org/Controllers/FileSystemController.cs
+++ b/src/Yavsc.Org/Controllers/FileSystemController.cs
@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Logging;
-using Yavsc.Helpers;
using Yavsc.Server.Helpers;
namespace Yavsc.Controllers
diff --git a/src/Yavsc.Org/Controllers/GrantsController.cs b/src/Yavsc.Org/Controllers/GrantsController.cs
index 225b7f5b..ad5627ed 100644
--- a/src/Yavsc.Org/Controllers/GrantsController.cs
+++ b/src/Yavsc.Org/Controllers/GrantsController.cs
@@ -5,9 +5,6 @@
using IdentityServer8.Services;
using IdentityServer8.Stores;
using Microsoft.AspNetCore.Mvc;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using IdentityServer8.Events;
using IdentityServer8.Extensions;
diff --git a/src/Yavsc.Org/Controllers/Haircut/ColorsController.cs b/src/Yavsc.Org/Controllers/Haircut/ColorsController.cs
index ef390f84..6beaa561 100644
--- a/src/Yavsc.Org/Controllers/Haircut/ColorsController.cs
+++ b/src/Yavsc.Org/Controllers/Haircut/ColorsController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Drawing;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Haircut/HairTaintsController.cs b/src/Yavsc.Org/Controllers/Haircut/HairTaintsController.cs
index a0a25246..7885720a 100644
--- a/src/Yavsc.Org/Controllers/Haircut/HairTaintsController.cs
+++ b/src/Yavsc.Org/Controllers/Haircut/HairTaintsController.cs
@@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Haircut;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Kyc/DeclarantController.cs b/src/Yavsc.Org/Controllers/Kyc/DeclarantController.cs
index 9f4933d1..491d378d 100644
--- a/src/Yavsc.Org/Controllers/Kyc/DeclarantController.cs
+++ b/src/Yavsc.Org/Controllers/Kyc/DeclarantController.cs
@@ -1,7 +1,6 @@
// Yavsc.Controllers.Kyc/DeclarantController.cs
namespace Yavsc.Controllers.Kyc
{
- using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
diff --git a/src/Yavsc.Org/Controllers/Musical/InstrumentationController.cs b/src/Yavsc.Org/Controllers/Musical/InstrumentationController.cs
index 536c7417..70faa88b 100644
--- a/src/Yavsc.Org/Controllers/Musical/InstrumentationController.cs
+++ b/src/Yavsc.Org/Controllers/Musical/InstrumentationController.cs
@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Musical.Profiles;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Org/Controllers/Musical/InstrumentsController.cs b/src/Yavsc.Org/Controllers/Musical/InstrumentsController.cs
index 7c0d6cb3..84c9590b 100644
--- a/src/Yavsc.Org/Controllers/Musical/InstrumentsController.cs
+++ b/src/Yavsc.Org/Controllers/Musical/InstrumentsController.cs
@@ -1,12 +1,9 @@
-using System.Linq;
using Microsoft.AspNetCore.Mvc;
namespace Yavsc.Controllers
{
- using System.Security.Claims;
using Models;
using Models.Musical;
- using Yavsc.Helpers;
using Yavsc.Server.Helpers;
public class InstrumentsController : Controller
diff --git a/src/Yavsc.Org/CustomModelBinder.cs b/src/Yavsc.Org/CustomModelBinder.cs
index c12084c5..ef1454b0 100644
--- a/src/Yavsc.Org/CustomModelBinder.cs
+++ b/src/Yavsc.Org/CustomModelBinder.cs
@@ -1,6 +1,4 @@
-using System;
using System.Globalization;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Yavsc
@@ -37,7 +35,7 @@ namespace Yavsc
bindingContext.Result = ModelBindingResult.Success(actualValue);
}
else bindingContext.Result = ModelBindingResult.Failed();
-
+
}
}
}
diff --git a/src/Yavsc.Org/Extensions/HostingExtensions.cs b/src/Yavsc.Org/Extensions/HostingExtensions.cs
index f92dc3c9..6528b9c6 100644
--- a/src/Yavsc.Org/Extensions/HostingExtensions.cs
+++ b/src/Yavsc.Org/Extensions/HostingExtensions.cs
@@ -169,10 +169,20 @@ public static class HostingExtensions
public static IdentityBuilder AddIdentityDBAndStores(this WebApplicationBuilder builder)
{
IServiceCollection services = builder.Services;
- var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
- services.AddDbContext(options =>
+ services.AddDbContext((sp, options) =>
{
+ // Read the connection string at DbContext construction time
+ // rather than at AddDbContext registration time, so test
+ // fixtures (e.g. WebApplicationFactory) can
+ // override the value via the host's IConfiguration before
+ // any DbContext is built. Reading it eagerly at the top of
+ // this method would freeze whatever was in configuration
+ // when Program.Main ran — too early for the test host's
+ // ConfigureAppConfiguration / UseSetting hooks to apply.
+ var connectionString = sp.GetRequiredService()
+ .GetConnectionString(Constants.YavscConnectionStringName);
+
if (UsesInMemoryProvider(connectionString))
{
options.UseInMemoryDatabase(connectionString);
@@ -317,9 +327,20 @@ public static class HostingExtensions
options.ClaimsIdentity.RoleClaimType = Constants.RoleClaimType;
});
var migrationsAssembly = typeof(Program).GetTypeInfo().Assembly.GetName().Name;
- var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
- string sqliteConnectionString = $"Data Source={Path.Combine(Path.GetTempPath(), "yavsc_test.db")}";
+ // The IdentityServer8.EntityFramework ConfigurationStoreOptions
+ // and OperationalStoreOptions expose ConfigureDbContext as an
+ // Action with no service-provider
+ // access, so the connection string has to be captured here at
+ // registration time. For the production runtime this is fine:
+ // the connection string does not change after startup. For
+ // tests, this is the one knob we cannot push into the per-fixture
+ // config pipeline; the TestWebApplicationFactory bridge instead
+ // sets ConnectionStrings__YavscConnection as an environment
+ // variable, which AddEnvironmentVariables picks up as the last
+ // configuration provider in AddConfiguration. See
+ // Yavsc.Server/Helpers/ConfigHelpers.cs.
+ var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
var identityServerBuilder = builder.Services.AddIdentityServer(options =>
{
@@ -600,7 +621,13 @@ public static class HostingExtensions
private static bool UsesInMemoryProvider(string connectionString)
{
- return string.Equals(connectionString, InMemoryProviderName, StringComparison.OrdinalIgnoreCase);
+ // Test fixtures may suffix the connection string with a
+ // per-fixture GUID (see InMemoryDatabaseName in
+ // Yavsc.Tests.Shared) to keep their in-memory stores
+ // isolated. The base name "InMemory" is still what
+ // identifies an in-memory provider — anything starting
+ // with it is one.
+ return connectionString.StartsWith(InMemoryProviderName, StringComparison.OrdinalIgnoreCase);
}
private static Action EnsureDefaultApplicationScopes()
diff --git a/src/Yavsc.Org/Helpers/Ansi2HtmlEncoder.cs b/src/Yavsc.Org/Helpers/Ansi2HtmlEncoder.cs
index 61f8c51b..fb832a5d 100644
--- a/src/Yavsc.Org/Helpers/Ansi2HtmlEncoder.cs
+++ b/src/Yavsc.Org/Helpers/Ansi2HtmlEncoder.cs
@@ -3,9 +3,7 @@
// paul schneider 19/06/2018 15:58 20182018 6 19
// */
-using System.IO;
using System.Diagnostics;
-using System.Threading.Tasks;
namespace Yavsc.Helpers
{
diff --git a/src/Yavsc.Org/Helpers/ControllerHelpers.cs b/src/Yavsc.Org/Helpers/ControllerHelpers.cs
index 07937e4a..9f92c9e7 100644
--- a/src/Yavsc.Org/Helpers/ControllerHelpers.cs
+++ b/src/Yavsc.Org/Helpers/ControllerHelpers.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Abstract.Models.Messaging;
diff --git a/src/Yavsc.Org/Helpers/ListItemHelpers.cs b/src/Yavsc.Org/Helpers/ListItemHelpers.cs
index a9101622..ea81e24e 100644
--- a/src/Yavsc.Org/Helpers/ListItemHelpers.cs
+++ b/src/Yavsc.Org/Helpers/ListItemHelpers.cs
@@ -1,6 +1,3 @@
-
-using System.Collections.Generic;
-using System.Linq;
using Microsoft.AspNetCore.Mvc.Rendering;
using Yavsc.Models;
using Yavsc.Models.Workflow;
diff --git a/src/Yavsc.Org/Helpers/OAuthHelpers.cs b/src/Yavsc.Org/Helpers/OAuthHelpers.cs
index efd3942b..668d720e 100644
--- a/src/Yavsc.Org/Helpers/OAuthHelpers.cs
+++ b/src/Yavsc.Org/Helpers/OAuthHelpers.cs
@@ -1,4 +1,3 @@
-using System;
using System.Security.Cryptography;
namespace Yavsc.Helpers {
diff --git a/src/Yavsc.Org/Helpers/PageHelpers.cs b/src/Yavsc.Org/Helpers/PageHelpers.cs
index c094495e..4258565a 100644
--- a/src/Yavsc.Org/Helpers/PageHelpers.cs
+++ b/src/Yavsc.Org/Helpers/PageHelpers.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Collections.Generic;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.Localization;
namespace Yavsc.Server.Helpers
diff --git a/src/Yavsc.Org/Helpers/TeXHelpers.cs b/src/Yavsc.Org/Helpers/TeXHelpers.cs
index 9e7ed330..daacb741 100644
--- a/src/Yavsc.Org/Helpers/TeXHelpers.cs
+++ b/src/Yavsc.Org/Helpers/TeXHelpers.cs
@@ -1,7 +1,4 @@
-using System;
using System.Diagnostics;
-using System.IO;
-using System.Linq;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
diff --git a/src/Yavsc.Org/Migrations/20260309015232_init.cs b/src/Yavsc.Org/Migrations/20260309015232_init.cs
index 894d57cb..8780da0d 100644
--- a/src/Yavsc.Org/Migrations/20260309015232_init.cs
+++ b/src/Yavsc.Org/Migrations/20260309015232_init.cs
@@ -1,5 +1,4 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
diff --git a/src/Yavsc.Org/Migrations/20260604103455_pending.cs b/src/Yavsc.Org/Migrations/20260604103455_pending.cs
index 5f9eb8b9..1f34c294 100644
--- a/src/Yavsc.Org/Migrations/20260604103455_pending.cs
+++ b/src/Yavsc.Org/Migrations/20260604103455_pending.cs
@@ -1,5 +1,4 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
diff --git a/src/Yavsc.Org/Migrations/20260706013420_activityModerated.cs b/src/Yavsc.Org/Migrations/20260706013420_activityModerated.cs
index 79e4000d..d99d3296 100644
--- a/src/Yavsc.Org/Migrations/20260706013420_activityModerated.cs
+++ b/src/Yavsc.Org/Migrations/20260706013420_activityModerated.cs
@@ -1,5 +1,4 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
diff --git a/src/Yavsc.Org/Migrations/ConfigurationDb/20260301200548_init.cs b/src/Yavsc.Org/Migrations/ConfigurationDb/20260301200548_init.cs
index a8261311..df95a443 100644
--- a/src/Yavsc.Org/Migrations/ConfigurationDb/20260301200548_init.cs
+++ b/src/Yavsc.Org/Migrations/ConfigurationDb/20260301200548_init.cs
@@ -1,5 +1,4 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
diff --git a/src/Yavsc.Org/Migrations/PersistedGrantDb/20260301200508_init.cs b/src/Yavsc.Org/Migrations/PersistedGrantDb/20260301200508_init.cs
index 0c240b20..b1297867 100644
--- a/src/Yavsc.Org/Migrations/PersistedGrantDb/20260301200508_init.cs
+++ b/src/Yavsc.Org/Migrations/PersistedGrantDb/20260301200508_init.cs
@@ -1,5 +1,4 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
diff --git a/src/Yavsc.Org/Program.cs b/src/Yavsc.Org/Program.cs
index a0ef57d3..7f8e38b1 100644
--- a/src/Yavsc.Org/Program.cs
+++ b/src/Yavsc.Org/Program.cs
@@ -1,5 +1,3 @@
-using Anthropic.SDK;
-using Yavsc.Abstract.Interfaces;
using Yavsc.Extensions;
using Yavsc.Server.Helpers;
@@ -18,6 +16,6 @@ namespace Yavsc
app.Run();
}
-
+
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Org/Services/BlogSpotService.cs b/src/Yavsc.Org/Services/BlogSpotService.cs
index 5a47e85e..7eac07a1 100644
--- a/src/Yavsc.Org/Services/BlogSpotService.cs
+++ b/src/Yavsc.Org/Services/BlogSpotService.cs
@@ -2,7 +2,6 @@ using System.Diagnostics;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
-using Yavsc;
using Yavsc.Blogspot;
using Yavsc.Models;
using Yavsc.Models.Blog;
diff --git a/src/Yavsc.Org/Services/ChatHubConnexionManager.cs b/src/Yavsc.Org/Services/ChatHubConnexionManager.cs
index 43365366..a9782661 100644
--- a/src/Yavsc.Org/Services/ChatHubConnexionManager.cs
+++ b/src/Yavsc.Org/Services/ChatHubConnexionManager.cs
@@ -1,13 +1,5 @@
-
-using System;
using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Input;
-using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
-using Microsoft.Extensions.Logging;
using Yavsc.Abstract.Chat;
using Yavsc.Models;
using Yavsc.ViewModels.Chat;
diff --git a/src/Yavsc.Org/Services/YavscTemplateEngine.cs b/src/Yavsc.Org/Services/YavscTemplateEngine.cs
index 9b29d853..904f203a 100644
--- a/src/Yavsc.Org/Services/YavscTemplateEngine.cs
+++ b/src/Yavsc.Org/Services/YavscTemplateEngine.cs
@@ -10,15 +10,9 @@ using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using Yavsc.Models;
-using Yavsc.Services;
-using System.Reflection;
using Yavsc.Abstract.Templates;
using Microsoft.AspNetCore.Identity;
-using RazorEngine.Configuration;
-using Yavsc.Interface;
-using Microsoft.Extensions.Logging;
using System.Diagnostics;
-using RazorEngine.Compilation.ImpromptuInterface.Optimization;
using RazorEngine.Compilation.ImpromptuInterface;
namespace Yavsc.Lib
@@ -30,7 +24,7 @@ namespace Yavsc.Lib
"Yavsc.Templates" ,
"Yavsc.Models",
"Yavsc.Models.Identity"};
-
+
readonly IStringLocalizer stringLocalizer;
readonly ApplicationDbContext dbContext;
@@ -144,14 +138,14 @@ namespace Yavsc.Lib
var template = result.CallActLike(user);
return template.GeneratedText;
}
-
+
/* result.CallActLike<>
inMemoryAssembly.Seek(0, SeekOrigin.Begin);
Assembly assembly = Assembly.Load(inMemoryAssembly.ToArray());
// UserOrientedTemplate userOrientedTemplate = (UserOrientedTemplate)
// FIXME Activator.CreateInstance(Type.GetType(templateInfo.TemplateType));
-
+
foreach (var user in dbContext.ApplicationUser.Where(
u => u.AllowMonthlyEmail
))
@@ -160,7 +154,7 @@ namespace Yavsc.Lib
userOrientedTemplate.Init();
userOrientedTemplate.User = user; */
throw new NotImplementedException();
-
+
}
}
}
diff --git a/src/Yavsc.Org/ViewComponents/CalendarViewComponent.cs b/src/Yavsc.Org/ViewComponents/CalendarViewComponent.cs
index ed8b7acd..9b0fd6a0 100644
--- a/src/Yavsc.Org/ViewComponents/CalendarViewComponent.cs
+++ b/src/Yavsc.Org/ViewComponents/CalendarViewComponent.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
-using Yavsc.Models;
using Yavsc.Services;
namespace Yavsc.ViewComponents
diff --git a/src/Yavsc.Org/ViewComponents/CirclesControlViewComponent.cs b/src/Yavsc.Org/ViewComponents/CirclesControlViewComponent.cs
index c7af7c86..58aab3b8 100644
--- a/src/Yavsc.Org/ViewComponents/CirclesControlViewComponent.cs
+++ b/src/Yavsc.Org/ViewComponents/CirclesControlViewComponent.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
diff --git a/src/Yavsc.Org/ViewComponents/CommentViewComponent.cs b/src/Yavsc.Org/ViewComponents/CommentViewComponent.cs
index 62d3bb7a..6f85a953 100644
--- a/src/Yavsc.Org/ViewComponents/CommentViewComponent.cs
+++ b/src/Yavsc.Org/ViewComponents/CommentViewComponent.cs
@@ -1,9 +1,7 @@
-using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Localization;
using Yavsc.Models;
-using Yavsc.Models.Blog;
namespace Yavsc.ViewComponents
{
diff --git a/src/Yavsc.Org/ViewComponents/DirectoryViewComponent.cs b/src/Yavsc.Org/ViewComponents/DirectoryViewComponent.cs
index af7f436b..fea78afb 100644
--- a/src/Yavsc.Org/ViewComponents/DirectoryViewComponent.cs
+++ b/src/Yavsc.Org/ViewComponents/DirectoryViewComponent.cs
@@ -1,7 +1,5 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
-using System.Threading.Tasks;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.ViewModels.UserFiles;
diff --git a/src/Yavsc.Org/ViewComponents/TaggerComponent.cs b/src/Yavsc.Org/ViewComponents/TaggerComponent.cs
index 94655237..d9f26e60 100644
--- a/src/Yavsc.Org/ViewComponents/TaggerComponent.cs
+++ b/src/Yavsc.Org/ViewComponents/TaggerComponent.cs
@@ -1,8 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
-using Microsoft.Extensions.Logging;
using Yavsc.Interfaces;
-using Yavsc.Models;
namespace Yavsc.ViewComponents
{
diff --git a/src/Yavsc.Org/ViewModels/Account/SendCodeViewModel.cs b/src/Yavsc.Org/ViewModels/Account/SendCodeViewModel.cs
index a10bda89..ea4dfba5 100644
--- a/src/Yavsc.Org/ViewModels/Account/SendCodeViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Account/SendCodeViewModel.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace Yavsc.ViewModels.Account
diff --git a/src/Yavsc.Org/ViewModels/Administration/EnrolerViewModel.cs b/src/Yavsc.Org/ViewModels/Administration/EnrolerViewModel.cs
index 1963e357..471a080e 100644
--- a/src/Yavsc.Org/ViewModels/Administration/EnrolerViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Administration/EnrolerViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels
{
diff --git a/src/Yavsc.Org/ViewModels/Administration/FireViewModel.cs b/src/Yavsc.Org/ViewModels/Administration/FireViewModel.cs
index 52230137..53b63bad 100644
--- a/src/Yavsc.Org/ViewModels/Administration/FireViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Administration/FireViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels
{
diff --git a/src/Yavsc.Org/ViewModels/Gen/PdfGenerationViewModel.cs b/src/Yavsc.Org/ViewModels/Gen/PdfGenerationViewModel.cs
index cbc99b0a..fe934e3a 100644
--- a/src/Yavsc.Org/ViewModels/Gen/PdfGenerationViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Gen/PdfGenerationViewModel.cs
@@ -1,7 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Html;
-using Microsoft.AspNetCore.Mvc.Rendering;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Gen
{
diff --git a/src/Yavsc.Org/ViewModels/Manage/ConfigureTwoFactorViewModel.cs b/src/Yavsc.Org/ViewModels/Manage/ConfigureTwoFactorViewModel.cs
index 685d11be..57212785 100644
--- a/src/Yavsc.Org/ViewModels/Manage/ConfigureTwoFactorViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Manage/ConfigureTwoFactorViewModel.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace Yavsc.ViewModels.Manage
diff --git a/src/Yavsc.Org/ViewModels/Manage/IndexViewModel.cs b/src/Yavsc.Org/ViewModels/Manage/IndexViewModel.cs
index b54bebcc..03cc42d8 100644
--- a/src/Yavsc.Org/ViewModels/Manage/IndexViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Manage/IndexViewModel.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Microsoft.AspNetCore.Identity;
namespace Yavsc.ViewModels.Manage
diff --git a/src/Yavsc.Org/ViewModels/Manage/ManageLoginsViewModel.cs b/src/Yavsc.Org/ViewModels/Manage/ManageLoginsViewModel.cs
index d29107c3..2b77adcd 100644
--- a/src/Yavsc.Org/ViewModels/Manage/ManageLoginsViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Manage/ManageLoginsViewModel.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Microsoft.AspNetCore.Identity;
namespace Yavsc.ViewModels.Manage
diff --git a/src/Yavsc.Org/ViewModels/Manage/SetUserNameViewModel.cs b/src/Yavsc.Org/ViewModels/Manage/SetUserNameViewModel.cs
index 61cf0727..9cef1603 100644
--- a/src/Yavsc.Org/ViewModels/Manage/SetUserNameViewModel.cs
+++ b/src/Yavsc.Org/ViewModels/Manage/SetUserNameViewModel.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Manage
{
diff --git a/src/Yavsc.Org/Yavsc.Org.csproj b/src/Yavsc.Org/Yavsc.Org.csproj
index ccdb7f24..aeb94a8e 100644
--- a/src/Yavsc.Org/Yavsc.Org.csproj
+++ b/src/Yavsc.Org/Yavsc.Org.csproj
@@ -9,7 +9,7 @@
https://github.com/pazof/yavsc
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -54,4 +54,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Server/Exceptions/InvalidActivityModelException.cs b/src/Yavsc.Server/Exceptions/InvalidActivityModelException.cs
index 5b3d086a..c2739d7c 100644
--- a/src/Yavsc.Server/Exceptions/InvalidActivityModelException.cs
+++ b/src/Yavsc.Server/Exceptions/InvalidActivityModelException.cs
@@ -1,4 +1,3 @@
-using System;
namespace Yavsc.Exceptions
{
public class InvalidWorkflowModelException : Exception
diff --git a/src/Yavsc.Server/Exceptions/InvalidPathException.cs b/src/Yavsc.Server/Exceptions/InvalidPathException.cs
index d093d9ab..ea64128c 100644
--- a/src/Yavsc.Server/Exceptions/InvalidPathException.cs
+++ b/src/Yavsc.Server/Exceptions/InvalidPathException.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Exceptions
{
public class InvalidPathException: Exception
diff --git a/src/Yavsc.Server/Helpers/CompanyInfoHelpers.cs b/src/Yavsc.Server/Helpers/CompanyInfoHelpers.cs
index 01a35a75..2d007b4a 100644
--- a/src/Yavsc.Server/Helpers/CompanyInfoHelpers.cs
+++ b/src/Yavsc.Server/Helpers/CompanyInfoHelpers.cs
@@ -1,5 +1,3 @@
-using System.Net.Http;
-using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace Yavsc.Helpers
diff --git a/src/Yavsc.Server/Helpers/EstimateSignatureFileHelper.cs b/src/Yavsc.Server/Helpers/EstimateSignatureFileHelper.cs
index 122b382c..e2d40266 100644
--- a/src/Yavsc.Server/Helpers/EstimateSignatureFileHelper.cs
+++ b/src/Yavsc.Server/Helpers/EstimateSignatureFileHelper.cs
@@ -1,12 +1,7 @@
-using System;
-using System.IO;
using System.Security.Claims;
using System.Text;
using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
-using Yavsc.Models;
using Yavsc.Models.Billing;
using Yavsc.Server.Models.FileSystem;
namespace Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Server/Helpers/FileSystemHelpers.cs b/src/Yavsc.Server/Helpers/FileSystemHelpers.cs
index f53ce0e8..91202727 100644
--- a/src/Yavsc.Server/Helpers/FileSystemHelpers.cs
+++ b/src/Yavsc.Server/Helpers/FileSystemHelpers.cs
@@ -4,12 +4,10 @@ using System.Security.Claims;
using Microsoft.AspNetCore.Html;
using Microsoft.Extensions.FileProviders;
using Yavsc.Models;
-using Yavsc.Models.FileSystem;
using Yavsc.Models.Streaming;
using Yavsc.ViewModels;
using Microsoft.AspNetCore.Http;
using Yavsc.Exceptions;
-using Yavsc.Helpers;
using Yavsc.Abstract.Helpers;
using ImageMagick;
using Yavsc.Server.Models.FileSystem;
diff --git a/src/Yavsc.Server/Helpers/PayPalHelpers.cs b/src/Yavsc.Server/Helpers/PayPalHelpers.cs
index abd70849..9d4074d4 100644
--- a/src/Yavsc.Server/Helpers/PayPalHelpers.cs
+++ b/src/Yavsc.Server/Helpers/PayPalHelpers.cs
@@ -1,15 +1,11 @@
-using System.Collections.Generic;
-
using Microsoft.Extensions.Logging;
using Yavsc.Models.Billing;
using Microsoft.AspNetCore.Http;
-using System.Threading.Tasks;
using Newtonsoft.Json;
using PayPal.PayPalAPIInterfaceService.Model;
using PayPal.PayPalAPIInterfaceService;
using Yavsc.ViewModels.PayPal;
using Yavsc.Models;
-using System.Linq;
using Yavsc.Models.Payment;
using Microsoft.EntityFrameworkCore;
diff --git a/src/Yavsc.Server/Helpers/RequestHelper.cs b/src/Yavsc.Server/Helpers/RequestHelper.cs
index 9edbbbd8..1bdde9fe 100644
--- a/src/Yavsc.Server/Helpers/RequestHelper.cs
+++ b/src/Yavsc.Server/Helpers/RequestHelper.cs
@@ -1,10 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
using System.Net;
-using System.Net.Http;
using System.Net.Http.Headers;
-using System.Threading.Tasks;
using Yavsc.Server.Model;
namespace Yavsc.Server.Helpers
diff --git a/src/Yavsc.Server/Helpers/ServiceExtensions.cs b/src/Yavsc.Server/Helpers/ServiceExtensions.cs
index 0ac1f135..2c421025 100644
--- a/src/Yavsc.Server/Helpers/ServiceExtensions.cs
+++ b/src/Yavsc.Server/Helpers/ServiceExtensions.cs
@@ -1,8 +1,6 @@
using Microsoft.AspNetCore.Authentication;
-using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
namespace Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Server/Helpers/SimpleJsonPostMethod.cs b/src/Yavsc.Server/Helpers/SimpleJsonPostMethod.cs
index 7de9d358..83c8bca7 100644
--- a/src/Yavsc.Server/Helpers/SimpleJsonPostMethod.cs
+++ b/src/Yavsc.Server/Helpers/SimpleJsonPostMethod.cs
@@ -19,10 +19,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
using System.Net;
-using System.IO;
-using System.Threading.Tasks;
using Newtonsoft.Json;
-using System;
namespace Yavsc.Server.Helpers
{
@@ -76,7 +73,7 @@ namespace Yavsc.Server.Helpers
}
return ans;
}
-
+
}
}
diff --git a/src/Yavsc.Server/Interfaces/IConnexionManager.cs b/src/Yavsc.Server/Interfaces/IConnexionManager.cs
index 1283b500..46374d40 100644
--- a/src/Yavsc.Server/Interfaces/IConnexionManager.cs
+++ b/src/Yavsc.Server/Interfaces/IConnexionManager.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using Yavsc.ViewModels.Chat;
namespace Yavsc.Services
diff --git a/src/Yavsc.Server/Interfaces/IDiskUsageTracker.cs b/src/Yavsc.Server/Interfaces/IDiskUsageTracker.cs
index 6066e94c..15a2fe48 100644
--- a/src/Yavsc.Server/Interfaces/IDiskUsageTracker.cs
+++ b/src/Yavsc.Server/Interfaces/IDiskUsageTracker.cs
@@ -1,6 +1,3 @@
-
-using System;
-
namespace Yavsc.Services
{
diff --git a/src/Yavsc.Server/Interfaces/IFreeDateSet.cs b/src/Yavsc.Server/Interfaces/IFreeDateSet.cs
index 640248d3..4e42e3c3 100644
--- a/src/Yavsc.Server/Interfaces/IFreeDateSet.cs
+++ b/src/Yavsc.Server/Interfaces/IFreeDateSet.cs
@@ -17,8 +17,6 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
-using System.Collections.Generic;
using Yavsc.Server.Models.Calendar;
namespace Yavsc.Models.Calendar
diff --git a/src/Yavsc.Server/Interfaces/ILiveProcessor.cs b/src/Yavsc.Server/Interfaces/ILiveProcessor.cs
index d2d7f21e..97636cd5 100644
--- a/src/Yavsc.Server/Interfaces/ILiveProcessor.cs
+++ b/src/Yavsc.Server/Interfaces/ILiveProcessor.cs
@@ -1,5 +1,4 @@
using System.Collections.Concurrent;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Yavsc.Models;
using Yavsc.ViewModels.Streaming;
diff --git a/src/Yavsc.Server/Interfaces/ISmsSender.cs b/src/Yavsc.Server/Interfaces/ISmsSender.cs
index 6f5ebf18..2f3817a4 100644
--- a/src/Yavsc.Server/Interfaces/ISmsSender.cs
+++ b/src/Yavsc.Server/Interfaces/ISmsSender.cs
@@ -1,6 +1,3 @@
-
-using System.Threading.Tasks;
-
namespace Yavsc.Services
{
public interface ISmsSender
diff --git a/src/Yavsc.Server/Interfaces/ISmtpClient.cs b/src/Yavsc.Server/Interfaces/ISmtpClient.cs
index 6692cdba..57b5cdcf 100644
--- a/src/Yavsc.Server/Interfaces/ISmtpClient.cs
+++ b/src/Yavsc.Server/Interfaces/ISmtpClient.cs
@@ -1,5 +1,3 @@
-using System.Threading;
-using System.Threading.Tasks;
using MimeKit;
namespace Yavsc.Interfaces
diff --git a/src/Yavsc.Server/Interfaces/IYavscMessageSender.cs b/src/Yavsc.Server/Interfaces/IYavscMessageSender.cs
index 9fcc4449..9d351ffd 100644
--- a/src/Yavsc.Server/Interfaces/IYavscMessageSender.cs
+++ b/src/Yavsc.Server/Interfaces/IYavscMessageSender.cs
@@ -1,7 +1,4 @@
-
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Yavsc.Interfaces.Workflow;
+using Yavsc.Interfaces.Workflow;
using Yavsc.Models.Google.Messaging;
using Yavsc.Models.Haircut;
using Yavsc.Models.Messaging;
@@ -11,18 +8,18 @@ namespace Yavsc.Services
public interface IYavscMessageSender
{
Task NotifyBookQueryAsync(
- IEnumerable connectionIds,
+ IEnumerable connectionIds,
RdvQueryEvent ev);
Task NotifyEstimateAsync(
- IEnumerable connectionIds,
+ IEnumerable connectionIds,
EstimationEvent ev);
Task NotifyHairCutQueryAsync(
- IEnumerable connectionIds,
+ IEnumerable connectionIds,
HairCutQueryEvent ev);
Task NotifyAsync(
- IEnumerable connectionIds,
+ IEnumerable connectionIds,
IEvent yaev);
}
}
diff --git a/src/Yavsc.Server/Models/Access/Ban.cs b/src/Yavsc.Server/Models/Access/Ban.cs
index 5b2d02a3..92198aab 100644
--- a/src/Yavsc.Server/Models/Access/Ban.cs
+++ b/src/Yavsc.Server/Models/Access/Ban.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
diff --git a/src/Yavsc.Server/Models/Access/CircleAuthorizationToBlogPost.cs b/src/Yavsc.Server/Models/Access/CircleAuthorizationToBlogPost.cs
index 7976395b..d3f79844 100644
--- a/src/Yavsc.Server/Models/Access/CircleAuthorizationToBlogPost.cs
+++ b/src/Yavsc.Server/Models/Access/CircleAuthorizationToBlogPost.cs
@@ -4,7 +4,6 @@ namespace Yavsc.Models.Access
using Models.Relationship;
using Newtonsoft.Json;
using Blog;
- using Yavsc.Abstract.Identity.Security;
using Yavsc.Abstract.BlogSpot;
public class CircleAuthorizationToBlogPost : PostAccessControlRulePayload
diff --git a/src/Yavsc.Server/Models/Access/ConsentInputModel.cs b/src/Yavsc.Server/Models/Access/ConsentInputModel.cs
index b5015bdd..cf20824a 100644
--- a/src/Yavsc.Server/Models/Access/ConsentInputModel.cs
+++ b/src/Yavsc.Server/Models/Access/ConsentInputModel.cs
@@ -1,9 +1,6 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-
-using System.Collections.Generic;
-
namespace Yavsc.Models.Access
{
public class ConsentInputModel
diff --git a/src/Yavsc.Server/Models/Access/ConsentViewModel.cs b/src/Yavsc.Server/Models/Access/ConsentViewModel.cs
index f94204ff..740c6881 100644
--- a/src/Yavsc.Server/Models/Access/ConsentViewModel.cs
+++ b/src/Yavsc.Server/Models/Access/ConsentViewModel.cs
@@ -1,9 +1,6 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-
-using System.Collections.Generic;
-
namespace Yavsc.Models.Access
{
public class ConsentViewModel : ConsentInputModel
diff --git a/src/Yavsc.Server/Models/Access/RuleSet.cs b/src/Yavsc.Server/Models/Access/RuleSet.cs
index c8b3068d..c4ca55d1 100644
--- a/src/Yavsc.Server/Models/Access/RuleSet.cs
+++ b/src/Yavsc.Server/Models/Access/RuleSet.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace Yavsc.Models.Access
{
public abstract class RuleSet :List> {
diff --git a/src/Yavsc.Server/Models/ApplicationDbContext.cs b/src/Yavsc.Server/Models/ApplicationDbContext.cs
index 5ebf931f..0ddab58e 100644
--- a/src/Yavsc.Server/Models/ApplicationDbContext.cs
+++ b/src/Yavsc.Server/Models/ApplicationDbContext.cs
@@ -8,8 +8,6 @@ namespace Yavsc.Models
using Abstract.Identity;
using Abstract.Models.Messaging;
using Access;
- using Attributes;
- using Auth;
using Bank;
using Billing;
using Blog;
@@ -22,7 +20,6 @@ namespace Yavsc.Models
using IT.Fixing;
using Market;
using Messaging;
- using Microsoft.AspNetCore.Http;
using Musical;
using Musical.Profiles;
using Payment;
diff --git a/src/Yavsc.Server/Models/Auth/DeviceDeclaration.cs b/src/Yavsc.Server/Models/Auth/DeviceDeclaration.cs
index a6190c96..1db1d89e 100644
--- a/src/Yavsc.Server/Models/Auth/DeviceDeclaration.cs
+++ b/src/Yavsc.Server/Models/Auth/DeviceDeclaration.cs
@@ -1,5 +1,4 @@
-using System;
-using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
@@ -21,13 +20,13 @@ namespace Yavsc.Models.Identity
///
/// Latest Activity Update
- ///
- /// Let's says,
- /// the latest time this device downloaded functional info from server
+ ///
+ /// Let's says,
+ /// the latest time this device downloaded functional info from server
/// activity list, let's say, promoted ones, those thar are at index, and
- /// all others, that are not listed as unsupported ones (not any more, after
+ /// all others, that are not listed as unsupported ones (not any more, after
/// has been annonced as obsolete a decent laps of time).
- ///
+ ///
/// In order to say, is any activity has changed here.
///
///
diff --git a/src/Yavsc.Server/Models/Auth/OAuth2Tokens.cs b/src/Yavsc.Server/Models/Auth/OAuth2Tokens.cs
index 89963ed4..88397a88 100644
--- a/src/Yavsc.Server/Models/Auth/OAuth2Tokens.cs
+++ b/src/Yavsc.Server/Models/Auth/OAuth2Tokens.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Auth
diff --git a/src/Yavsc.Server/Models/Auth/RefreshToken.cs b/src/Yavsc.Server/Models/Auth/RefreshToken.cs
index 89642295..0234291c 100644
--- a/src/Yavsc.Server/Models/Auth/RefreshToken.cs
+++ b/src/Yavsc.Server/Models/Auth/RefreshToken.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Auth
diff --git a/src/Yavsc.Server/Models/Bank/BalanceImpact.cs b/src/Yavsc.Server/Models/Bank/BalanceImpact.cs
index c5aa654b..3a248844 100644
--- a/src/Yavsc.Server/Models/Bank/BalanceImpact.cs
+++ b/src/Yavsc.Server/Models/Bank/BalanceImpact.cs
@@ -1,5 +1,3 @@
-
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
diff --git a/src/Yavsc.Server/Models/Billing/Estimate.cs b/src/Yavsc.Server/Models/Billing/Estimate.cs
index 817d22ae..e6495a14 100644
--- a/src/Yavsc.Server/Models/Billing/Estimate.cs
+++ b/src/Yavsc.Server/Models/Billing/Estimate.cs
@@ -1,9 +1,5 @@
-
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
namespace Yavsc.Models.Billing
{
diff --git a/src/Yavsc.Server/Models/Billing/EstimateTemplate.cs b/src/Yavsc.Server/Models/Billing/EstimateTemplate.cs
index d191f9d7..49af6b0e 100644
--- a/src/Yavsc.Server/Models/Billing/EstimateTemplate.cs
+++ b/src/Yavsc.Server/Models/Billing/EstimateTemplate.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
diff --git a/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs b/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs
index b2af663b..ad651d36 100644
--- a/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs
+++ b/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs
@@ -1,5 +1,3 @@
-
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
diff --git a/src/Yavsc.Server/Models/Billing/Signature.cs b/src/Yavsc.Server/Models/Billing/Signature.cs
index 2e26ae9c..10da97f1 100644
--- a/src/Yavsc.Server/Models/Billing/Signature.cs
+++ b/src/Yavsc.Server/Models/Billing/Signature.cs
@@ -1,8 +1,6 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
-using Yavsc.Models.Relationship;
namespace Yavsc.Models.Billing;
diff --git a/src/Yavsc.Server/Models/Billing/histoestim.cs b/src/Yavsc.Server/Models/Billing/histoestim.cs
index 3821bf5f..1f9b99f1 100644
--- a/src/Yavsc.Server/Models/Billing/histoestim.cs
+++ b/src/Yavsc.Server/Models/Billing/histoestim.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Models.Billing
{
public partial class histoestim
diff --git a/src/Yavsc.Server/Models/Blog/BlogAttachedFile.cs b/src/Yavsc.Server/Models/Blog/BlogAttachedFile.cs
index 8f556d5c..a857665d 100644
--- a/src/Yavsc.Server/Models/Blog/BlogAttachedFile.cs
+++ b/src/Yavsc.Server/Models/Blog/BlogAttachedFile.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Org.BouncyCastle.Crypto.Modes;
using Microsoft.EntityFrameworkCore;
namespace Yavsc.Models.Blog
diff --git a/src/Yavsc.Server/Models/Blog/Comment.cs b/src/Yavsc.Server/Models/Blog/Comment.cs
index d1d09c29..acb5e003 100644
--- a/src/Yavsc.Server/Models/Blog/Comment.cs
+++ b/src/Yavsc.Server/Models/Blog/Comment.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
diff --git a/src/Yavsc.Server/Models/Calendar/Availabliity.cs b/src/Yavsc.Server/Models/Calendar/Availabliity.cs
index e39dd476..02bdbb28 100644
--- a/src/Yavsc.Server/Models/Calendar/Availabliity.cs
+++ b/src/Yavsc.Server/Models/Calendar/Availabliity.cs
@@ -1,5 +1,3 @@
-using Yavsc.Models.Calendar;
-
namespace Yavsc.Server.Models.Calendar
{
public class Availability : List
diff --git a/src/Yavsc.Server/Models/Calendar/Period.cs b/src/Yavsc.Server/Models/Calendar/Period.cs
index 50303463..dfc285cf 100644
--- a/src/Yavsc.Server/Models/Calendar/Period.cs
+++ b/src/Yavsc.Server/Models/Calendar/Period.cs
@@ -19,7 +19,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Server.Models.Calendar
diff --git a/src/Yavsc.Server/Models/Chat/ChatRoom.cs b/src/Yavsc.Server/Models/Chat/ChatRoom.cs
index e03421c0..1b7f1c58 100644
--- a/src/Yavsc.Server/Models/Chat/ChatRoom.cs
+++ b/src/Yavsc.Server/Models/Chat/ChatRoom.cs
@@ -1,6 +1,3 @@
-
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
diff --git a/src/Yavsc.Server/Models/Cratie/Option.cs b/src/Yavsc.Server/Models/Cratie/Option.cs
index ed157717..d3a3caaf 100644
--- a/src/Yavsc.Server/Models/Cratie/Option.cs
+++ b/src/Yavsc.Server/Models/Cratie/Option.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Models.Cratie
{
public class Option: ITrackedEntity
diff --git a/src/Yavsc.Server/Models/Cratie/Scrutin.cs b/src/Yavsc.Server/Models/Cratie/Scrutin.cs
index 753cec34..a4ca11dd 100644
--- a/src/Yavsc.Server/Models/Cratie/Scrutin.cs
+++ b/src/Yavsc.Server/Models/Cratie/Scrutin.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Cratie
diff --git a/src/Yavsc.Server/Models/EMailing/MailingTemplate.cs b/src/Yavsc.Server/Models/EMailing/MailingTemplate.cs
index 71e773d8..3626388b 100644
--- a/src/Yavsc.Server/Models/EMailing/MailingTemplate.cs
+++ b/src/Yavsc.Server/Models/EMailing/MailingTemplate.cs
@@ -1,10 +1,6 @@
-using System;
using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
using RazorEngine.Templating;
using Yavsc.Attributes.Validation;
-using Yavsc.Models;
-using Yavsc.Models.Calendar;
using Yavsc.Server.Models.Calendar;
namespace Yavsc.Server.Models.EMailing
diff --git a/src/Yavsc.Server/Models/Edition/IDocument.cs b/src/Yavsc.Server/Models/Edition/IDocument.cs
index 396e4eba..28307d42 100644
--- a/src/Yavsc.Server/Models/Edition/IDocument.cs
+++ b/src/Yavsc.Server/Models/Edition/IDocument.cs
@@ -1,4 +1,3 @@
-
//
// IDocument.cs
//
@@ -20,8 +19,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
-
namespace Yavsc.Models {
public class Parameter {
diff --git a/src/Yavsc.Server/Models/FormFile.cs b/src/Yavsc.Server/Models/FormFile.cs
index 9bac0ae4..bda84217 100644
--- a/src/Yavsc.Server/Models/FormFile.cs
+++ b/src/Yavsc.Server/Models/FormFile.cs
@@ -1,5 +1,3 @@
-
-using System.IO;
using System.Net.Mime;
namespace Yavsc.Server.Model
diff --git a/src/Yavsc.Server/Models/HairCut/BrusherProfile.cs b/src/Yavsc.Server/Models/HairCut/BrusherProfile.cs
index ace5a12b..ba47bfdc 100644
--- a/src/Yavsc.Server/Models/HairCut/BrusherProfile.cs
+++ b/src/Yavsc.Server/Models/HairCut/BrusherProfile.cs
@@ -23,7 +23,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
-using System.Collections.Generic;
namespace Yavsc.Models.Haircut
{
diff --git a/src/Yavsc.Server/Models/HairCut/HairCutPaymentEvent.cs b/src/Yavsc.Server/Models/HairCut/HairCutPaymentEvent.cs
index e76bbb37..35324928 100644
--- a/src/Yavsc.Server/Models/HairCut/HairCutPaymentEvent.cs
+++ b/src/Yavsc.Server/Models/HairCut/HairCutPaymentEvent.cs
@@ -1,5 +1,4 @@
using Microsoft.Extensions.Localization;
-using System.Linq;
using Yavsc.Interfaces.Workflow;
using Yavsc.Models.Haircut;
diff --git a/src/Yavsc.Server/Models/HairCut/HairCutQuery.cs b/src/Yavsc.Server/Models/HairCut/HairCutQuery.cs
index 5aab5258..0960db6d 100644
--- a/src/Yavsc.Server/Models/HairCut/HairCutQuery.cs
+++ b/src/Yavsc.Server/Models/HairCut/HairCutQuery.cs
@@ -1,6 +1,3 @@
-
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
@@ -8,7 +5,6 @@ using Yavsc.Models.Relationship;
using Yavsc.Billing;
using System.Globalization;
using Yavsc.Helpers;
-using System.Linq;
using Microsoft.Extensions.Localization;
using Yavsc.ViewModels.PayPal;
using Yavsc.Models.HairCut;
diff --git a/src/Yavsc.Server/Models/HairCut/HairMultiCutQuery.cs b/src/Yavsc.Server/Models/HairCut/HairMultiCutQuery.cs
index b68ed38b..21ae437c 100644
--- a/src/Yavsc.Server/Models/HairCut/HairMultiCutQuery.cs
+++ b/src/Yavsc.Server/Models/HairCut/HairMultiCutQuery.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
diff --git a/src/Yavsc.Server/Models/HairCut/HairPrestation.cs b/src/Yavsc.Server/Models/HairCut/HairPrestation.cs
index ce560d01..a14053b3 100644
--- a/src/Yavsc.Server/Models/HairCut/HairPrestation.cs
+++ b/src/Yavsc.Server/Models/HairCut/HairPrestation.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
diff --git a/src/Yavsc.Server/Models/HairCut/Haircut.cs b/src/Yavsc.Server/Models/HairCut/Haircut.cs
index dc7549a3..77cb0eb9 100644
--- a/src/Yavsc.Server/Models/HairCut/Haircut.cs
+++ b/src/Yavsc.Server/Models/HairCut/Haircut.cs
@@ -1,4 +1,3 @@
-using System;
namespace Yavsc.Haircut
{
public interface IProviderInfo
diff --git a/src/Yavsc.Server/Models/HairCut/Views/HaircutQueryInfo.cs b/src/Yavsc.Server/Models/HairCut/Views/HaircutQueryInfo.cs
index d86da930..c9213862 100644
--- a/src/Yavsc.Server/Models/HairCut/Views/HaircutQueryInfo.cs
+++ b/src/Yavsc.Server/Models/HairCut/Views/HaircutQueryInfo.cs
@@ -20,7 +20,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
using System.ComponentModel.DataAnnotations;
using Yavsc.Abstract.Identity;
using Yavsc.Models.Relationship;
diff --git a/src/Yavsc.Server/Models/IT/Project.cs b/src/Yavsc.Server/Models/IT/Project.cs
index 1a7fa4e4..1fce99de 100644
--- a/src/Yavsc.Server/Models/IT/Project.cs
+++ b/src/Yavsc.Server/Models/IT/Project.cs
@@ -1,9 +1,6 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
using Yavsc.Abstract.IT;
-using Yavsc.Attributes.Validation;
using Yavsc.Billing;
using Yavsc.Models.Billing;
using Yavsc.Server.Models.IT.SourceCode;
diff --git a/src/Yavsc.Server/Models/IT/ProjectBuildConfiguration.cs b/src/Yavsc.Server/Models/IT/ProjectBuildConfiguration.cs
index e0ea867e..e2f96bed 100644
--- a/src/Yavsc.Server/Models/IT/ProjectBuildConfiguration.cs
+++ b/src/Yavsc.Server/Models/IT/ProjectBuildConfiguration.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Server.Models.IT
{
diff --git a/src/Yavsc.Server/Models/IT/SourceCode/Batch.cs b/src/Yavsc.Server/Models/IT/SourceCode/Batch.cs
index 2405c6e1..8a0d4c6b 100644
--- a/src/Yavsc.Server/Models/IT/SourceCode/Batch.cs
+++ b/src/Yavsc.Server/Models/IT/SourceCode/Batch.cs
@@ -1,4 +1,3 @@
-using System;
using Yavsc.Abstract.Interfaces;
namespace Yavsc.Server.Models.IT.SourceCode
diff --git a/src/Yavsc.Server/Models/IT/SourceCode/GitClone.cs b/src/Yavsc.Server/Models/IT/SourceCode/GitClone.cs
index 5c926f3b..826e5de3 100644
--- a/src/Yavsc.Server/Models/IT/SourceCode/GitClone.cs
+++ b/src/Yavsc.Server/Models/IT/SourceCode/GitClone.cs
@@ -3,8 +3,6 @@
// paul 21/06/2018 11:27 20182018 6 21
// */
using System.Diagnostics;
-using System.IO;
-using System;
namespace Yavsc.Server.Models.IT.SourceCode
{
@@ -40,7 +38,7 @@ namespace Yavsc.Server.Models.IT.SourceCode
using (var writer = new StreamWriter(stream))
{
var process = Process.Start(cloneStart);
- // TODO publish the starting log url ...
+ // TODO publish the starting log url ...
while (!process.HasExited)
{
if (process.StandardOutput.Peek() > -1)
diff --git a/src/Yavsc.Server/Models/IT/SourceCode/ProjectBuild.cs b/src/Yavsc.Server/Models/IT/SourceCode/ProjectBuild.cs
index 3c636e0f..f65b17b5 100644
--- a/src/Yavsc.Server/Models/IT/SourceCode/ProjectBuild.cs
+++ b/src/Yavsc.Server/Models/IT/SourceCode/ProjectBuild.cs
@@ -1,6 +1,4 @@
-using System;
using System.Diagnostics;
-using System.IO;
namespace Yavsc.Server.Models.IT.SourceCode
{
diff --git a/src/Yavsc.Server/Models/IT/SourceCode/SingleCmdProjectBatch.cs b/src/Yavsc.Server/Models/IT/SourceCode/SingleCmdProjectBatch.cs
index 73a7f075..2ce16256 100644
--- a/src/Yavsc.Server/Models/IT/SourceCode/SingleCmdProjectBatch.cs
+++ b/src/Yavsc.Server/Models/IT/SourceCode/SingleCmdProjectBatch.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.IO;
namespace Yavsc.Server.Models.IT.SourceCode
{
diff --git a/src/Yavsc.Server/Models/IdentityUserLogin.cs b/src/Yavsc.Server/Models/IdentityUserLogin.cs
index 49afeeea..bfbd4e89 100644
--- a/src/Yavsc.Server/Models/IdentityUserLogin.cs
+++ b/src/Yavsc.Server/Models/IdentityUserLogin.cs
@@ -1,6 +1,5 @@
namespace Yavsc.Models.Auth
{
- using Microsoft.AspNetCore.Identity;
using System.ComponentModel.DataAnnotations.Schema;
public class YaIdentityUserLogin
diff --git a/src/Yavsc.Server/Models/Kyc/TrustToken.cs b/src/Yavsc.Server/Models/Kyc/TrustToken.cs
index 47084cb0..2e240bae 100644
--- a/src/Yavsc.Server/Models/Kyc/TrustToken.cs
+++ b/src/Yavsc.Server/Models/Kyc/TrustToken.cs
@@ -3,7 +3,6 @@ namespace Yavsc.Models.Kyc
{
using System;
using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
///
/// Token opaque représentant une entité sans l'identifier.
diff --git a/src/Yavsc.Server/Models/Market/Catalog.cs b/src/Yavsc.Server/Models/Market/Catalog.cs
index b58a1c1c..aee16e3f 100644
--- a/src/Yavsc.Server/Models/Market/Catalog.cs
+++ b/src/Yavsc.Server/Models/Market/Catalog.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace Yavsc.Models.Market {
public class Catalog {
diff --git a/src/Yavsc.Server/Models/Market/Money.cs b/src/Yavsc.Server/Models/Market/Money.cs
index fd6a5546..a4b599d3 100644
--- a/src/Yavsc.Server/Models/Market/Money.cs
+++ b/src/Yavsc.Server/Models/Market/Money.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.Models.Market {
///
/// Not yet used!
diff --git a/src/Yavsc.Server/Models/Market/Service.cs b/src/Yavsc.Server/Models/Market/Service.cs
index 8177bd59..34c996e5 100644
--- a/src/Yavsc.Server/Models/Market/Service.cs
+++ b/src/Yavsc.Server/Models/Market/Service.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market {
diff --git a/src/Yavsc.Server/Models/Messaging/CircleEvent.cs b/src/Yavsc.Server/Models/Messaging/CircleEvent.cs
index 369e3a54..b1eb782b 100644
--- a/src/Yavsc.Server/Models/Messaging/CircleEvent.cs
+++ b/src/Yavsc.Server/Models/Messaging/CircleEvent.cs
@@ -19,13 +19,11 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Messaging
{
using Models.Relationship;
- using Yavsc.Attributes.Validation;
///
/// Event pub.
diff --git a/src/Yavsc.Server/Models/Messaging/DimissClicked.cs b/src/Yavsc.Server/Models/Messaging/DimissClicked.cs
index 3ac16646..88295fd8 100644
--- a/src/Yavsc.Server/Models/Messaging/DimissClicked.cs
+++ b/src/Yavsc.Server/Models/Messaging/DimissClicked.cs
@@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Abstract.Models.Messaging;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Messaging
{
diff --git a/src/Yavsc.Server/Models/Messaging/LiveFlow.cs b/src/Yavsc.Server/Models/Messaging/LiveFlow.cs
index b121877b..7e3914c0 100644
--- a/src/Yavsc.Server/Models/Messaging/LiveFlow.cs
+++ b/src/Yavsc.Server/Models/Messaging/LiveFlow.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Abstract.Streaming;
diff --git a/src/Yavsc.Server/Models/Musical/Instrument.cs b/src/Yavsc.Server/Models/Musical/Instrument.cs
index 0b81fed0..105d2442 100644
--- a/src/Yavsc.Server/Models/Musical/Instrument.cs
+++ b/src/Yavsc.Server/Models/Musical/Instrument.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Musical
{
diff --git a/src/Yavsc.Server/Models/Musical/InstrumentRating.cs b/src/Yavsc.Server/Models/Musical/InstrumentRating.cs
index 7578a427..150d2967 100644
--- a/src/Yavsc.Server/Models/Musical/InstrumentRating.cs
+++ b/src/Yavsc.Server/Models/Musical/InstrumentRating.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Musical
diff --git a/src/Yavsc.Server/Models/Musical/MusicalPreference.cs b/src/Yavsc.Server/Models/Musical/MusicalPreference.cs
index dc66667d..009e1167 100644
--- a/src/Yavsc.Server/Models/Musical/MusicalPreference.cs
+++ b/src/Yavsc.Server/Models/Musical/MusicalPreference.cs
@@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Musical
{
diff --git a/src/Yavsc.Server/Models/Musical/MusicalTendency.cs b/src/Yavsc.Server/Models/Musical/MusicalTendency.cs
index 0804bd1e..9b5743b7 100644
--- a/src/Yavsc.Server/Models/Musical/MusicalTendency.cs
+++ b/src/Yavsc.Server/Models/Musical/MusicalTendency.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Musical {
diff --git a/src/Yavsc.Server/Models/Musical/Profiles/DjPerformerProfile.cs b/src/Yavsc.Server/Models/Musical/Profiles/DjPerformerProfile.cs
index 863e8263..2669e0d9 100644
--- a/src/Yavsc.Server/Models/Musical/Profiles/DjPerformerProfile.cs
+++ b/src/Yavsc.Server/Models/Musical/Profiles/DjPerformerProfile.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
diff --git a/src/Yavsc.Server/Models/Musical/Profiles/DjSettings.cs b/src/Yavsc.Server/Models/Musical/Profiles/DjSettings.cs
index d74a0284..6d7cc372 100644
--- a/src/Yavsc.Server/Models/Musical/Profiles/DjSettings.cs
+++ b/src/Yavsc.Server/Models/Musical/Profiles/DjSettings.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Musical.Profiles
diff --git a/src/Yavsc.Server/Models/Musical/Profiles/FormationPerformerProfile.cs b/src/Yavsc.Server/Models/Musical/Profiles/FormationPerformerProfile.cs
index 410864e4..496bd40f 100644
--- a/src/Yavsc.Server/Models/Musical/Profiles/FormationPerformerProfile.cs
+++ b/src/Yavsc.Server/Models/Musical/Profiles/FormationPerformerProfile.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
diff --git a/src/Yavsc.Server/Models/Musical/Profiles/MusicLoverSettings.cs b/src/Yavsc.Server/Models/Musical/Profiles/MusicLoverSettings.cs
index fae39a40..40c87347 100644
--- a/src/Yavsc.Server/Models/Musical/Profiles/MusicLoverSettings.cs
+++ b/src/Yavsc.Server/Models/Musical/Profiles/MusicLoverSettings.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Musical.Profiles
diff --git a/src/Yavsc.Server/Models/Musical/Profiles/MusicianPerformerProfile.cs b/src/Yavsc.Server/Models/Musical/Profiles/MusicianPerformerProfile.cs
index 62719963..83ed28bb 100644
--- a/src/Yavsc.Server/Models/Musical/Profiles/MusicianPerformerProfile.cs
+++ b/src/Yavsc.Server/Models/Musical/Profiles/MusicianPerformerProfile.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
diff --git a/src/Yavsc.Server/Models/Musical/Profiles/StarPerformerProfile.cs b/src/Yavsc.Server/Models/Musical/Profiles/StarPerformerProfile.cs
index 43b976b4..eff45874 100644
--- a/src/Yavsc.Server/Models/Musical/Profiles/StarPerformerProfile.cs
+++ b/src/Yavsc.Server/Models/Musical/Profiles/StarPerformerProfile.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
diff --git a/src/Yavsc.Server/Models/Payment/PaypalPayment.cs b/src/Yavsc.Server/Models/Payment/PaypalPayment.cs
index f33160e5..bb214cad 100644
--- a/src/Yavsc.Server/Models/Payment/PaypalPayment.cs
+++ b/src/Yavsc.Server/Models/Payment/PaypalPayment.cs
@@ -1,12 +1,10 @@
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace Yavsc.Models.Payment {
+namespace Yavsc.Models.Payment
+{
using Yavsc;
using Relationship;
- using Yavsc.Attributes.Validation;
public class PayPalPayment : ITrackedEntity
{
diff --git a/src/Yavsc.Server/Models/Relationship/Circle.cs b/src/Yavsc.Server/Models/Relationship/Circle.cs
index 97b79f8d..35b40c07 100644
--- a/src/Yavsc.Server/Models/Relationship/Circle.cs
+++ b/src/Yavsc.Server/Models/Relationship/Circle.cs
@@ -1,9 +1,6 @@
-
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Relationship
{
diff --git a/src/Yavsc.Server/Models/Relationship/CircleMember.cs b/src/Yavsc.Server/Models/Relationship/CircleMember.cs
index a102b260..e83215c7 100644
--- a/src/Yavsc.Server/Models/Relationship/CircleMember.cs
+++ b/src/Yavsc.Server/Models/Relationship/CircleMember.cs
@@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Relationship
{
diff --git a/src/Yavsc.Server/Models/Relationship/Contact.cs b/src/Yavsc.Server/Models/Relationship/Contact.cs
index 7976432b..4e87f322 100644
--- a/src/Yavsc.Server/Models/Relationship/Contact.cs
+++ b/src/Yavsc.Server/Models/Relationship/Contact.cs
@@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Relationship
{
diff --git a/src/Yavsc.Server/Models/Relationship/Tag.cs b/src/Yavsc.Server/Models/Relationship/Tag.cs
index ea9cc222..9fd1907b 100644
--- a/src/Yavsc.Server/Models/Relationship/Tag.cs
+++ b/src/Yavsc.Server/Models/Relationship/Tag.cs
@@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Relationship
{
diff --git a/src/Yavsc.Server/Models/Workflow/Activity.cs b/src/Yavsc.Server/Models/Workflow/Activity.cs
index af9a0909..0f813a27 100644
--- a/src/Yavsc.Server/Models/Workflow/Activity.cs
+++ b/src/Yavsc.Server/Models/Workflow/Activity.cs
@@ -1,6 +1,3 @@
-
-using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
diff --git a/src/Yavsc.Server/Models/Workflow/CommandForm.cs b/src/Yavsc.Server/Models/Workflow/CommandForm.cs
index 4063babd..a5b76153 100644
--- a/src/Yavsc.Server/Models/Workflow/CommandForm.cs
+++ b/src/Yavsc.Server/Models/Workflow/CommandForm.cs
@@ -4,8 +4,7 @@ using Newtonsoft.Json;
namespace Yavsc.Models.Workflow
{
- using Yavsc;
- using Yavsc.Attributes.Validation;
+ using Yavsc;
public class CommandForm : ICommandForm
{
diff --git a/src/Yavsc.Server/Models/Workflow/PerformerProfile.cs b/src/Yavsc.Server/Models/Workflow/PerformerProfile.cs
index a9f4a507..7067bc13 100644
--- a/src/Yavsc.Server/Models/Workflow/PerformerProfile.cs
+++ b/src/Yavsc.Server/Models/Workflow/PerformerProfile.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
diff --git a/src/Yavsc.Server/Models/Workflow/Profiles/FormationSettings.cs b/src/Yavsc.Server/Models/Workflow/Profiles/FormationSettings.cs
index 2f7095da..1c30d32c 100644
--- a/src/Yavsc.Server/Models/Workflow/Profiles/FormationSettings.cs
+++ b/src/Yavsc.Server/Models/Workflow/Profiles/FormationSettings.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Yavsc.Attributes.Validation;
diff --git a/src/Yavsc.Server/Models/Workflow/RdvQuery.cs b/src/Yavsc.Server/Models/Workflow/RdvQuery.cs
index d908c492..34bae29a 100644
--- a/src/Yavsc.Server/Models/Workflow/RdvQuery.cs
+++ b/src/Yavsc.Server/Models/Workflow/RdvQuery.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
diff --git a/src/Yavsc.Server/Models/Workflow/RendezVous.cs b/src/Yavsc.Server/Models/Workflow/RendezVous.cs
index 2f2e35f9..ddfbf587 100644
--- a/src/Yavsc.Server/Models/Workflow/RendezVous.cs
+++ b/src/Yavsc.Server/Models/Workflow/RendezVous.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
@@ -6,7 +5,6 @@ using Yavsc.Models.Market;
namespace Yavsc.Models.Workflow
{
using Models.Relationship;
- using Yavsc.Attributes.Validation;
///
/// A date, between two persons
diff --git a/src/Yavsc.Server/Models/Workflow/UserActivity.cs b/src/Yavsc.Server/Models/Workflow/UserActivity.cs
index d9841ce7..5e2abf35 100644
--- a/src/Yavsc.Server/Models/Workflow/UserActivity.cs
+++ b/src/Yavsc.Server/Models/Workflow/UserActivity.cs
@@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Workflow
{
diff --git a/src/Yavsc.Server/Services/BlogSpotService.cs b/src/Yavsc.Server/Services/BlogSpotService.cs
index eb6fa457..6b85a4c3 100644
--- a/src/Yavsc.Server/Services/BlogSpotService.cs
+++ b/src/Yavsc.Server/Services/BlogSpotService.cs
@@ -2,7 +2,6 @@ using System.Diagnostics;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
-using Yavsc;
using Yavsc.Models;
using Yavsc.Models.Blog;
using Yavsc.Server.Exceptions;
diff --git a/src/Yavsc.Server/Services/ClaudeModerationService.cs b/src/Yavsc.Server/Services/ClaudeModerationService.cs
index 0d6260ae..a510e55c 100644
--- a/src/Yavsc.Server/Services/ClaudeModerationService.cs
+++ b/src/Yavsc.Server/Services/ClaudeModerationService.cs
@@ -3,8 +3,6 @@ using Yavsc.Abstract.Interfaces;
using Anthropic.SDK;
using Anthropic.SDK.Messaging;
using Anthropic.SDK.Constants;
-using Anthropic.SDK.Models;
-using Newtonsoft.Json;
using Microsoft.Extensions.Configuration;
using System.Text.Json;
public class ClaudeModerationService : IModerationService
@@ -87,4 +85,4 @@ public class ClaudeModerationService : IModerationService
0f);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc.Server/Services/FileSystemAuthManager.cs b/src/Yavsc.Server/Services/FileSystemAuthManager.cs
index 973ccffc..53f29210 100644
--- a/src/Yavsc.Server/Services/FileSystemAuthManager.cs
+++ b/src/Yavsc.Server/Services/FileSystemAuthManager.cs
@@ -1,9 +1,7 @@
using System.Security.Claims;
using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options;
using rules;
-using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
diff --git a/src/Yavsc.Server/Services/GoogleApis/CalendarManager.cs b/src/Yavsc.Server/Services/GoogleApis/CalendarManager.cs
index f91b3393..8d9d7c23 100644
--- a/src/Yavsc.Server/Services/GoogleApis/CalendarManager.cs
+++ b/src/Yavsc.Server/Services/GoogleApis/CalendarManager.cs
@@ -29,7 +29,6 @@ namespace Yavsc.Services
{
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
- using Yavsc.Models.Calendar;
using Yavsc.Server.Helpers;
using Yavsc.Server.Models.Calendar;
using Yavsc.ViewModels.Calendar;
diff --git a/src/Yavsc.Server/Services/GoogleApis/MapTracks.cs b/src/Yavsc.Server/Services/GoogleApis/MapTracks.cs
index 230bee9a..6691674b 100644
--- a/src/Yavsc.Server/Services/GoogleApis/MapTracks.cs
+++ b/src/Yavsc.Server/Services/GoogleApis/MapTracks.cs
@@ -18,7 +18,6 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System.Threading.Tasks;
using Yavsc.Models.Google;
using Yavsc.Server.Helpers;
@@ -56,11 +55,11 @@ namespace Yavsc.GoogleApis
/// Entities.
public static async Task CreateEntity( Entity[] entities ) {
string [] ans = null;
-
+
using (SimpleJsonPostMethod wr =
new SimpleJsonPostMethod (googleMapTracksPath + "entities/create"))
{
- ans = await wr.Invoke (entities);
+ ans = await wr.Invoke (entities);
}
return ans;
}
diff --git a/src/Yavsc.Server/Services/GoogleApis/PeopleApi.cs b/src/Yavsc.Server/Services/GoogleApis/PeopleApi.cs
index e67fa30e..de50e555 100644
--- a/src/Yavsc.Server/Services/GoogleApis/PeopleApi.cs
+++ b/src/Yavsc.Server/Services/GoogleApis/PeopleApi.cs
@@ -19,7 +19,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System.IO;
using System.Net;
using Newtonsoft.Json;
using Yavsc.Abstract.Identity;
diff --git a/src/Yavsc.Server/Services/IFileSystemAuthManager.cs b/src/Yavsc.Server/Services/IFileSystemAuthManager.cs
index 9551cc6a..36d44c2d 100644
--- a/src/Yavsc.Server/Services/IFileSystemAuthManager.cs
+++ b/src/Yavsc.Server/Services/IFileSystemAuthManager.cs
@@ -1,6 +1,5 @@
using System.Security.Claims;
-using Microsoft.Extensions.FileProviders;
namespace Yavsc.Services
{
diff --git a/src/Yavsc.Server/Services/MailSender.cs b/src/Yavsc.Server/Services/MailSender.cs
index 5e9e6d49..417fca6b 100644
--- a/src/Yavsc.Server/Services/MailSender.cs
+++ b/src/Yavsc.Server/Services/MailSender.cs
@@ -1,4 +1,3 @@
-using System.Net;
using MailKit.Security;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
diff --git a/src/Yavsc.Server/Services/ProfileService.cs b/src/Yavsc.Server/Services/ProfileService.cs
index bda689a4..b6da3a56 100644
--- a/src/Yavsc.Server/Services/ProfileService.cs
+++ b/src/Yavsc.Server/Services/ProfileService.cs
@@ -2,7 +2,6 @@ using System.Security.Claims;
using IdentityModel;
using IdentityServer8.Models;
using IdentityServer8.Services;
-using IdentityServer8.Stores;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
using Yavsc.Models;
diff --git a/src/Yavsc.Server/Services/SIRENCheker.cs b/src/Yavsc.Server/Services/SIRENCheker.cs
index 0843e946..eedea3f0 100644
--- a/src/Yavsc.Server/Services/SIRENCheker.cs
+++ b/src/Yavsc.Server/Services/SIRENCheker.cs
@@ -1,5 +1,3 @@
-using System.Net.Http;
-using System.Threading.Tasks;
using Yavsc.Helpers;
namespace Yavsc.Services
diff --git a/src/Yavsc.Server/Settings/SiteSettings.cs b/src/Yavsc.Server/Settings/SiteSettings.cs
index 1f63ea2c..9267370e 100644
--- a/src/Yavsc.Server/Settings/SiteSettings.cs
+++ b/src/Yavsc.Server/Settings/SiteSettings.cs
@@ -1,4 +1,3 @@
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Yavsc.Models.Relationship;
namespace Yavsc
diff --git a/src/Yavsc.Server/Settings/UserPolicies.cs b/src/Yavsc.Server/Settings/UserPolicies.cs
index 5f48426b..125a6236 100644
--- a/src/Yavsc.Server/Settings/UserPolicies.cs
+++ b/src/Yavsc.Server/Settings/UserPolicies.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using Yavsc.Models;
namespace Yavsc.Server.Settings
diff --git a/src/Yavsc.Server/Templates/UserOrientedTemplate.cs b/src/Yavsc.Server/Templates/UserOrientedTemplate.cs
index 43ceb532..7c85f104 100644
--- a/src/Yavsc.Server/Templates/UserOrientedTemplate.cs
+++ b/src/Yavsc.Server/Templates/UserOrientedTemplate.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Collections.Generic;
using Yavsc.Abstract.Templates;
using Yavsc.Models;
diff --git a/src/Yavsc.Server/ViewModels/Account/ChangePasswordBindingModel.cs b/src/Yavsc.Server/ViewModels/Account/ChangePasswordBindingModel.cs
index bb2478d6..f5cb6bc1 100644
--- a/src/Yavsc.Server/ViewModels/Account/ChangePasswordBindingModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/ChangePasswordBindingModel.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.Models.Account {
public class ChangePasswordBindingModel {
diff --git a/src/Yavsc.Server/ViewModels/Account/ExternalLoginConfirmationViewModel.cs b/src/Yavsc.Server/ViewModels/Account/ExternalLoginConfirmationViewModel.cs
index 09519543..a9ab63df 100644
--- a/src/Yavsc.Server/ViewModels/Account/ExternalLoginConfirmationViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/ExternalLoginConfirmationViewModel.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Abstract;
using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Account
diff --git a/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs b/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs
index a7f65c70..35c50878 100644
--- a/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Account
{
diff --git a/src/Yavsc.Server/ViewModels/Account/SignInModel.cs b/src/Yavsc.Server/ViewModels/Account/SignInModel.cs
index 272563d5..d2aa69ad 100755
--- a/src/Yavsc.Server/ViewModels/Account/SignInModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/SignInModel.cs
@@ -1,8 +1,4 @@
-
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Runtime.InteropServices;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Account
{
diff --git a/src/Yavsc.Server/ViewModels/Account/UnregisterViewModel.cs b/src/Yavsc.Server/ViewModels/Account/UnregisterViewModel.cs
index 13e412f1..e28fcfed 100644
--- a/src/Yavsc.Server/ViewModels/Account/UnregisterViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/UnregisterViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Account
{
diff --git a/src/Yavsc.Server/ViewModels/Account/VerifyCodeViewModel.cs b/src/Yavsc.Server/ViewModels/Account/VerifyCodeViewModel.cs
index 413eda97..a768e249 100644
--- a/src/Yavsc.Server/ViewModels/Account/VerifyCodeViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/VerifyCodeViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Account
{
diff --git a/src/Yavsc.Server/ViewModels/Auth/FileSpotInfo.cs b/src/Yavsc.Server/ViewModels/Auth/FileSpotInfo.cs
index 78141e98..b151b4e7 100644
--- a/src/Yavsc.Server/ViewModels/Auth/FileSpotInfo.cs
+++ b/src/Yavsc.Server/ViewModels/Auth/FileSpotInfo.cs
@@ -1,5 +1,3 @@
-
-using System.IO;
using Microsoft.AspNetCore.Authorization;
using Yavsc.Models.Blog;
diff --git a/src/Yavsc.Server/ViewModels/Calendar/DateTimeChooserViewModel.cs b/src/Yavsc.Server/ViewModels/Calendar/DateTimeChooserViewModel.cs
index de078cdb..967a9173 100644
--- a/src/Yavsc.Server/ViewModels/Calendar/DateTimeChooserViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Calendar/DateTimeChooserViewModel.cs
@@ -1,5 +1,3 @@
-using System;
-using Yavsc.Models.Calendar;
using Yavsc.Server.Models.Calendar;
namespace Yavsc.ViewModels.Calendar
diff --git a/src/Yavsc.Server/ViewModels/Chat/ChatRoomInfo.cs b/src/Yavsc.Server/ViewModels/Chat/ChatRoomInfo.cs
index ff17d848..b74206f2 100644
--- a/src/Yavsc.Server/ViewModels/Chat/ChatRoomInfo.cs
+++ b/src/Yavsc.Server/ViewModels/Chat/ChatRoomInfo.cs
@@ -19,8 +19,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System.Collections.Generic;
-
namespace Yavsc
{
public class ChatRoomInfo
diff --git a/src/Yavsc.Server/ViewModels/Chat/ChatUserInfo.cs b/src/Yavsc.Server/ViewModels/Chat/ChatUserInfo.cs
index 66350be9..f8a8d19d 100644
--- a/src/Yavsc.Server/ViewModels/Chat/ChatUserInfo.cs
+++ b/src/Yavsc.Server/ViewModels/Chat/ChatUserInfo.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Yavsc.Models.Chat;
namespace Yavsc.ViewModels.Chat {
diff --git a/src/Yavsc.Server/ViewModels/FrontOffice/PerformerProfileViewModel.cs b/src/Yavsc.Server/ViewModels/FrontOffice/PerformerProfileViewModel.cs
index f5dce499..d2a23319 100644
--- a/src/Yavsc.Server/ViewModels/FrontOffice/PerformerProfileViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/FrontOffice/PerformerProfileViewModel.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Yavsc.Models.Workflow;
namespace Yavsc.ViewModels.FrontOffice
diff --git a/src/Yavsc.Server/ViewModels/LiveCastHandler.cs b/src/Yavsc.Server/ViewModels/LiveCastHandler.cs
index f3ce00cb..55c3160d 100644
--- a/src/Yavsc.Server/ViewModels/LiveCastHandler.cs
+++ b/src/Yavsc.Server/ViewModels/LiveCastHandler.cs
@@ -1,15 +1,7 @@
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.IO;
+using System.Collections.Concurrent;
using System.Net.WebSockets;
-using System.Threading;
-using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
-using Newtonsoft.Json;
-using Yavsc.Helpers;
using Yavsc.Models;
-using Yavsc.Models.FileSystem;
using Yavsc.Server.Helpers;
using Yavsc.Server.Models.FileSystem;
@@ -54,7 +46,7 @@ namespace Yavsc.ViewModels.Streaming
item.Overridden = true;
usage -= fi.Length;
}
-
+
logger.LogInformation("Opening the file");
using (var dest = fi.Open(FileMode.Create, FileAccess.Write, FileShare.Read))
{
diff --git a/src/Yavsc.Server/ViewModels/Manage/AddPhoneNumberViewModel.cs b/src/Yavsc.Server/ViewModels/Manage/AddPhoneNumberViewModel.cs
index 7c606ed3..bc823f50 100644
--- a/src/Yavsc.Server/ViewModels/Manage/AddPhoneNumberViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Manage/AddPhoneNumberViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Manage
{
diff --git a/src/Yavsc.Server/ViewModels/Manage/DoDirectCreditViewModel.cs b/src/Yavsc.Server/ViewModels/Manage/DoDirectCreditViewModel.cs
index cec754f0..7ee28f2c 100644
--- a/src/Yavsc.Server/ViewModels/Manage/DoDirectCreditViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Manage/DoDirectCreditViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Manage
{
diff --git a/src/Yavsc.Server/ViewModels/Manage/SetAddressViewModel.cs b/src/Yavsc.Server/ViewModels/Manage/SetAddressViewModel.cs
index ca568414..b7998761 100644
--- a/src/Yavsc.Server/ViewModels/Manage/SetAddressViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Manage/SetAddressViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Manage
{
diff --git a/src/Yavsc.Server/ViewModels/Manage/VerifyPhoneNumberViewModel.cs b/src/Yavsc.Server/ViewModels/Manage/VerifyPhoneNumberViewModel.cs
index 160185c9..71e87280 100644
--- a/src/Yavsc.Server/ViewModels/Manage/VerifyPhoneNumberViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Manage/VerifyPhoneNumberViewModel.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Manage
{
diff --git a/src/Yavsc.Server/ViewModels/Test/CalendarViewModel.cs b/src/Yavsc.Server/ViewModels/Test/CalendarViewModel.cs
index cd3b58c1..105665fd 100644
--- a/src/Yavsc.Server/ViewModels/Test/CalendarViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Test/CalendarViewModel.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Yavsc.ViewModels.Test
{
public class CalendarViewModel
diff --git a/src/Yavsc.Server/Yavsc.Server.csproj b/src/Yavsc.Server/Yavsc.Server.csproj
index 4eaf6a83..7adb3a78 100644
--- a/src/Yavsc.Server/Yavsc.Server.csproj
+++ b/src/Yavsc.Server/Yavsc.Server.csproj
@@ -9,7 +9,7 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -43,4 +43,4 @@
-
\ No newline at end of file
+
diff --git a/src/Yavsc.Tests.Shared/InMemoryDatabaseName.cs b/src/Yavsc.Tests.Shared/InMemoryDatabaseName.cs
new file mode 100644
index 00000000..1c78c6dd
--- /dev/null
+++ b/src/Yavsc.Tests.Shared/InMemoryDatabaseName.cs
@@ -0,0 +1,30 @@
+namespace Yavsc.Tests.Shared;
+
+///
+/// Helpers for the in-memory connection string used by test fixtures.
+///
+/// EF Core's UseInMemoryDatabase(name) returns the same backing
+/// store to every DbContext that asks for it under the same
+/// , in the same process. That means every
+/// fixture that uses the bare "InMemory" connection string
+/// shares the same in-memory database — which leaks state between
+/// fixtures that are supposed to be independent, and silently makes
+/// tests order-dependent.
+///
+/// The fix is to give each fixture its own suffix.
+/// returns a stable, fixture-scoped connection string. The fixture
+/// stores the suffix in an instance field so successive calls within
+/// the same fixture always resolve to the same database.
+///
+public static class InMemoryDatabaseName
+{
+ /// Base connection string for the in-memory provider,
+ /// as it appears in appsettings-org.Testing.json.
+ public const string Base = "InMemory";
+
+ /// Builds a per-fixture connection string. Two calls
+ /// with the same return the same
+ /// string; two calls with different ids return different
+ /// strings, isolating the underlying in-memory stores.
+ public static string For(string fixtureId) => $"{Base}-{fixtureId}";
+}
diff --git a/src/Yavsc.Tests.Shared/Yavsc.Tests.Shared.csproj b/src/Yavsc.Tests.Shared/Yavsc.Tests.Shared.csproj
index 52effc72..7f2f382a 100644
--- a/src/Yavsc.Tests.Shared/Yavsc.Tests.Shared.csproj
+++ b/src/Yavsc.Tests.Shared/Yavsc.Tests.Shared.csproj
@@ -14,7 +14,7 @@
-->
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -23,4 +23,4 @@
-
\ No newline at end of file
+
diff --git a/src/cli/Commands/GenerationCommander.cs b/src/cli/Commands/GenerationCommander.cs
index 55712f5b..7690a301 100644
--- a/src/cli/Commands/GenerationCommander.cs
+++ b/src/cli/Commands/GenerationCommander.cs
@@ -3,7 +3,6 @@ using cli.Model;
using cli.Services;
using cli.Settings;
using Microsoft.Extensions.CommandLineUtils;
-using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@@ -44,7 +43,7 @@ namespace cli.Commands
config.HelpOption("-? | -h | --help");
});
cmd.OnExecute(() => {
-
+
var logger = loggerFactory.CreateLogger();
var modelFullName = mdClass?.Value ?? options?.Value.ModelFullName;
var nameSpace = nameSpaceArg?.Value?? options?.Value.NameSpace;
@@ -56,10 +55,10 @@ namespace cli.Commands
logger.LogInformation($"Using parameters : modelFullName:{modelFullName} nameSpace:{nameSpace} dbContext:{dbContext} controllerName:{controllerName} relativePath:{relativePath}");
mvcGenerator.Generate(modelFullName,
- dbContext,
+ dbContext,
controllerName,
relativePath);
-
+
logger.LogInformation("Finished generation");
return 0;
diff --git a/src/cli/Commands/UserListCleanUp.cs b/src/cli/Commands/UserListCleanUp.cs
index e5360f36..7d171ed9 100644
--- a/src/cli/Commands/UserListCleanUp.cs
+++ b/src/cli/Commands/UserListCleanUp.cs
@@ -1,5 +1,4 @@
using cli.Model;
-using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.CommandLineUtils;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -30,7 +29,7 @@ namespace cli.Commands
if (!showhelp)
{
-
+
var mailer = Program.AppHost.Services.GetService();
var loggerFactory = Program.AppHost.Services.GetService();
diff --git a/src/cli/Program.cs b/src/cli/Program.cs
index aeb573b1..6c0d0cef 100644
--- a/src/cli/Program.cs
+++ b/src/cli/Program.cs
@@ -1,6 +1,5 @@
// See https://aka.ms/new-console-template for more information
-using cli;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
internal class Program
@@ -16,7 +15,7 @@ internal class Program
.AddJsonFile("appsettings-cli.json", optional: false, reloadOnChange: false)
.AddJsonFile($"appsettings-cli.{builder.Environment.EnvironmentName}.json", optional: true, reloadOnChange: false)
.AddEnvironmentVariables();
-
+
AppHost = builder.Build();
AppConfiguration = builder.Configuration;
AppHost.Start();
diff --git a/src/cli/Services/YaRazorEngineHost.cs b/src/cli/Services/YaRazorEngineHost.cs
index 3d29812a..038cd5fb 100644
--- a/src/cli/Services/YaRazorEngineHost.cs
+++ b/src/cli/Services/YaRazorEngineHost.cs
@@ -1,6 +1,4 @@
-using Microsoft.AspNetCore.Razor;
-
-namespace cli
+namespace cli
{
public class YaRazorEngineHost
{
diff --git a/src/cli/Settings/ConnectionSettings.cs b/src/cli/Settings/ConnectionSettings.cs
index 62622ebc..21836d2e 100644
--- a/src/cli/Settings/ConnectionSettings.cs
+++ b/src/cli/Settings/ConnectionSettings.cs
@@ -1,7 +1,6 @@
namespace cli
{
using System.ComponentModel.DataAnnotations.Schema;
- using System.Runtime.Serialization;
using Newtonsoft.Json;
using Yavsc;
diff --git a/src/cli/cli.csproj b/src/cli/cli.csproj
index 010c4eaf..237ccdd8 100644
--- a/src/cli/cli.csproj
+++ b/src/cli/cli.csproj
@@ -7,7 +7,7 @@
true
1.1.0.0
1.1.0.0
- 1.1.0-beta.1+1.Branch.release-1.0.8-rc1.Sha.1167169aa89e1bf25290e9a152d27b357a500ab3
+ 1.1.0-beta.1+49.Branch.release-1.0.8-rc3.Sha.5274d7bdf5d14406748a2063b5ae15191aac4359
1.1.0-beta.1
@@ -25,4 +25,4 @@
-
+
\ No newline at end of file
diff --git a/yavsc.sln b/yavsc.sln
index 33ecf0fc..00b90dea 100644
--- a/yavsc.sln
+++ b/yavsc.sln
@@ -37,7 +37,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Tests.Shared", "src\Y
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Api.Client", "src\Yavsc.Api.Client\Yavsc.Api.Client.csproj", "{59AF5DEA-D349-495A-BC44-FC7BD4E55099}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostIt.Tests", "src\PostIt.Tests\PostIt.Tests.csproj", "{838B9737-88CA-432E-835C-F96817CF8085}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostIt.Tests", "src\PostIt\PostIt.Tests\PostIt.Tests.csproj", "{021E6F5A-B81D-42A7-9918-DFE39B424FC2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -217,18 +217,18 @@ Global
{59AF5DEA-D349-495A-BC44-FC7BD4E55099}.Release|x64.Build.0 = Release|Any CPU
{59AF5DEA-D349-495A-BC44-FC7BD4E55099}.Release|x86.ActiveCfg = Release|Any CPU
{59AF5DEA-D349-495A-BC44-FC7BD4E55099}.Release|x86.Build.0 = Release|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Debug|x64.ActiveCfg = Debug|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Debug|x64.Build.0 = Debug|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Debug|x86.ActiveCfg = Debug|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Debug|x86.Build.0 = Debug|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Release|Any CPU.Build.0 = Release|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Release|x64.ActiveCfg = Release|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Release|x64.Build.0 = Release|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Release|x86.ActiveCfg = Release|Any CPU
- {838B9737-88CA-432E-835C-F96817CF8085}.Release|x86.Build.0 = Release|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Debug|x64.Build.0 = Debug|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Debug|x86.Build.0 = Debug|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Release|x64.ActiveCfg = Release|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Release|x64.Build.0 = Release|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Release|x86.ActiveCfg = Release|Any CPU
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -249,6 +249,6 @@ Global
{0E471075-DABF-40E9-98B7-1630BEF19145} = {CDB1BDB5-53F9-4B43-864F-60F2E74F44E2}
{34D1F73D-BF74-47CC-9358-9F4F221C75D7} = {CDB1BDB5-53F9-4B43-864F-60F2E74F44E2}
{59AF5DEA-D349-495A-BC44-FC7BD4E55099} = {CDB1BDB5-53F9-4B43-864F-60F2E74F44E2}
- {838B9737-88CA-432E-835C-F96817CF8085} = {CDB1BDB5-53F9-4B43-864F-60F2E74F44E2}
+ {021E6F5A-B81D-42A7-9918-DFE39B424FC2} = {E13D107F-4053-D0DE-6394-453609595BFE}
EndGlobalSection
EndGlobal