Resl1001 Unsafe .Value Access Warning Code Fix
title: RESL1001 — Unsafe .Value Access [Warning + Code Fix]
var result = GetUser(id);
var name = result.Value; // ⚠️ RESL1001: Access to '.Value' without checking 'IsSuccess'
// 💡 Fix A: Wrap in if (result.IsSuccess) { ... }
// 💡 Fix B: Replace with result.Match(v => v, e => default)
// ✅ Safe alternatives:
if (result.IsSuccess)
var name = result.Value; // No warning — guarded by IsSuccess
var name = result.Match( // No warning — pattern matching
onSuccess: u => u.Name,
onFailure: _ => "Unknown");