# IPlatformService

- File ID: file:wb18l0:iplatformservice-cs
- Path: NexusReader.Application/Abstractions/Services/IPlatformService.cs
- Role: service
- Layer: application

## Purpose

Defines a platform abstraction for device capabilities (vibration) and device metadata (device context) used by application code to remain platform-agnostic.

## Key Details

Uses FluentResults.Result for method returns, is an application-layer abstraction to be implemented by platform-specific code (likely in Infrastructure or UI platform projects).

## Symbols

- IPlatformService: Defines a platform abstraction for device capabilities (vibration) and device metadata (device context) used by application code to remain platform-agnostic.
- VibrateSuccessAsync(): Contract for invoking a short/success vibration on the device.
- VibrateErrorAsync(): Contract for invoking an error/alert vibration on the device.
- VibrateAsync(): Contract for invoking a vibration for a specified duration in milliseconds.
- GetDeviceContext(): Contract for obtaining device metadata (model, manufacturer, type, orientation) synchronously.
- DeviceContext: Holds device metadata (model, manufacturer, device type, and display orientation).
- DeviceType: Enumerates broad device categories.
- DisplayOrientation: Enumerates display orientations.

## Dependencies

- No resolved dependencies.

## Calls

- No resolved calls.

## Coverage

- Symbols: 8
- Executable symbols: 4
- Executable symbols with control flow: 4
- Grounded edges: 8
- Unresolved references: 0
- Control-flow fragments: 4
- Unresolved jumps: 0
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 2

## Control Flow Fragments

- VibrateSuccessAsync: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
- VibrateErrorAsync: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
- VibrateAsync: 4 nodes, 3 edges, 0 jumps, 0 unsupported constructs
- GetDeviceContext: 4 nodes, 3 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### IPlatformService Neighborhood

```mermaid
flowchart LR
    class_1gyz12d_iplatformservice("IPlatformService")
    file_wb18l0_iplatformservice_cs("IPlatformService")
    method_ptkxhj_vibratesuccessasync[["VibrateSuccessAsync()"]]
    method_qdnq0x_vibrateerrorasync[["VibrateErrorAsync()"]]
    method_sdo0jm_vibrateasync[["VibrateAsync()"]]
    method_w31hua_getdevicecontext[["GetDeviceContext()"]]
    type_1jksru0_devicetype[/"DeviceType"/]
    type_1qhatfu_displayorientation[/"DisplayOrientation"/]
    type_flcquz_devicecontext[/"DeviceContext"/]
```

### IPlatformService Execution Overview

```mermaid
flowchart TD
    class_1gyz12d_iplatformservice("IPlatformService")
    method_ptkxhj_vibratesuccessasync[["VibrateSuccessAsync()"]]
    method_qdnq0x_vibrateerrorasync[["VibrateErrorAsync()"]]
    method_sdo0jm_vibrateasync[["VibrateAsync()"]]
    method_w31hua_getdevicecontext[["GetDeviceContext()"]]
    class_1gyz12d_iplatformservice -->|contains| method_ptkxhj_vibratesuccessasync
    class_1gyz12d_iplatformservice -->|contains| method_qdnq0x_vibrateerrorasync
    class_1gyz12d_iplatformservice -->|contains| method_sdo0jm_vibrateasync
    class_1gyz12d_iplatformservice -->|contains| method_w31hua_getdevicecontext
```

## Diagram Validation

- Status: pass
