mirror of
https://github.com/ivuorinen/hiha-arvio.git
synced 2026-02-07 09:47:08 +00:00
MILESTONE 1 COMPLETE: Project Setup: - Create .NET 8 MAUI solution targeting iOS, macOS, and web - Configure nullable reference types and warnings as errors - Add required dependencies (MAUI 8.0.3, SQLite, CommunityToolkit.Mvvm) - Add testing dependencies (xUnit, NSubstitute, FluentAssertions, Coverlet) - Create comprehensive .editorconfig with C# coding standards - Update CLAUDE.md with development commands Core Models (TDD - 48 tests, all passing): - EstimateMode enum (Work, Generic, Humorous modes) - EstimateResult model with validation (intensity 0.0-1.0, non-null text) - ShakeData model with intensity validation - AppSettings model with defaults (Work mode, max history 10) Build Status: - All platforms build successfully (net8.0, iOS, macOS) - 0 warnings, 0 errors - Test coverage: 51.28% line, 87.5% branch (models have ~100% coverage) Per spec: Strict TDD followed (RED-GREEN-REFACTOR), models fully validated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
namespace HihaArvio.Models;
|
|
|
|
/// <summary>
|
|
/// Represents current shake gesture data.
|
|
/// </summary>
|
|
public class ShakeData
|
|
{
|
|
private double _intensity;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the normalized shake intensity (0.0 to 1.0).
|
|
/// </summary>
|
|
/// <exception cref="ArgumentOutOfRangeException">Thrown when value is outside [0.0, 1.0] range.</exception>
|
|
public double Intensity
|
|
{
|
|
get => _intensity;
|
|
set
|
|
{
|
|
if (value < 0.0 || value > 1.0)
|
|
{
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(value),
|
|
value,
|
|
"Intensity must be between 0.0 and 1.0.");
|
|
}
|
|
|
|
_intensity = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the duration of the current shake gesture.
|
|
/// </summary>
|
|
public TimeSpan Duration { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether a shake is currently in progress.
|
|
/// </summary>
|
|
public bool IsShaking { get; set; }
|
|
}
|