On this page

Language reference

Find a construct, its exact behavior and the corresponding implementation account. The specification defines source semantics. Reference C# illustrates implementations; the developer bridge highlights differences from C# and VB.NET.

What you need Detailed reference
A keyword, operator, contextual name or API Alphabetical lookup
Why source is invalid and how to repair its intent Diagnostics and repairs
Source, literals, names and project declarations Syntax and binding
Types, defaults, locals, actions and callable values Types and actions
Generic declarations, constraints and typed construction Generics and constraints
Classes, constructors, interfaces and class kinds Objects and construction
Evaluation, select, contracts, patterns and lazy values Expressions and checks
Optional work, lazy state, cached failures and recursive forcing Lazy values and publication
Strict/Try sequence selection, indexing and maps Collections and lookup
URI, HTML, XML, JSON and quoted-string content Encoding for the destination
Receiver scopes, exceptions and disposal Resources and errors
Await, task capture, owned work and cancellation Async and concurrency
Handler identity, source replacement and observation lifetime Events and subscriptions
CLR binding, attributes and service ownership .NET contracts
Gate, consumption, text, sequences and service behavior Standard-library contracts
Selected CLR declarations, source member types and export boundaries Library API catalogue
Feature discovery, operations, wrappers and engine/asset boundaries Adapter declarations
Evaluation, cleanup and coordination implementation cases C# reference implementation
Queue, renderer and API application patterns Customer showcase reference

Behavior at boundaries

These cases are useful when reviewing business logic or comparing it with a native .NET call. Follow the contract of the symbol actually bound, especially when a library method has a familiar name.

Boundary DirectSharp contract Details
Missing versus empty selection Try selection returns nothing when no items are selected; valid strict zero selection is present empty Sequence contracts
Source too short for a strict request Deferred traversal can expose a prefix before the shortage fails; tolerant Try selection collects available values at the call C# sequence patterns
Async result versus operation Await a fresh call for its result, capture it with task_of, or launch it with run; bare awaitable calls are diagnosed Async intent
Several steps per concurrent branch Inline run blocks progress independently; return finishes one branch after cleanup Inline branches
Forgotten captured operation Warn on locally detectable abandonment; owned run work is joined automatically Operation observation
Await and UI access Ordinary await normally retains the UI context; ConfigureAwait(false) opts out rather than dispatching to it Continuation context
Async and synchronous cleanup The static disposable contract and action context select one route; successful authored cleanup is shared across both protocols Resource lifetimes
Cleanup fails or overlaps Authored cleanup rejects overlap and retains its original failure; imported types and Gate retain their own separate contracts Authored cleanup
Reader row versus retained object A current IDataRecord view changes as its reader advances; project independent values before retaining or parallelizing it Consumable sources
Producer fails with queued work An explicitly failed live wrapper drains buffered items, then reports the original failure; native channels retain native behavior Live concurrent collections
Service names versus service keys Source names ignore case; keyed service identity is exact and rejects a null key Lookup signatures
Detach a handler during a raise An already captured native invocation list can still deliver it; detachment does not cancel in-flight work Event lifetime
Selected winner versus published result A winner is still subject to owned joins and external causes recorded before publication Concurrent outcomes

Source and literals

Read this topic.

Names and project declarations

Read this topic.

Types, nothing and default

Read this topic.

Local declarations

Read this topic.

Operators, conditionals and assignment

Read this topic.

Inclusive sequence selection

Read this topic.

Count-taking sequence helpers

Read this topic.

Indexed lookup and map insertion

Read this topic.

Expression select and take

Read this topic.

require, ensure and old_value_of

Read this topic.

Pattern and regex captures

Read this topic.

Lazy values

Read the construct summary, then the complete report example and C# state pattern.

Customer validation reference lowering

Read this topic.

Ordinary class and constructor

Read this example.

Inherited calls and expression selectors

Read this example.

Class-kind binding and diagnostics

Read this example.

Calling the sample

Read this example.