PresentationOptions
ConsoleMonster.Presenters
Culture, reference time and time zone for presenting values. Tables, record views, cards and key/value lists take one, so output is deterministic when these are fixed (tests, snapshots) and follows the user's settings otherwise.
Inheritance
- object
- PresentationOptions
Usage
Explore 42 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 14
- Property Grid.Presentation
- Extension method PresentationOptions.Culture
- Extension method PresentationOptions.Now
- Extension method PresentationOptions.TimeZone
- Method PresentationOptionsFluent.Culture
- Method PresentationOptionsFluent.Now
- Method PresentationOptionsFluent.TimeZone
- Property GroupedStreamingTable<T1, T2>.Presentation
- Property InspectorView.Presentation
- Property KeyValueList.Presentation
- Property RecordView.Presentation
- Property Table.Presentation
- Property Table<T>.Presentation
- Property Tree.Presentation
Accepted by parameters 28
- Extension method Grid.Presentation
- Extension method Grid.Presentation
- Method GridFluent.Presentation
- Method GridFluent.Presentation
- Extension method PresentationOptions.Culture
- Extension method PresentationOptions.Now
- Extension method PresentationOptions.TimeZone
- Method PresentationOptionsFluent.Culture
- Method PresentationOptionsFluent.Now
- Method PresentationOptionsFluent.TimeZone
- Extension method InspectorView.Presentation
- Extension method InspectorView.Presentation
- Method InspectorViewFluent.Presentation
- Method InspectorViewFluent.Presentation
- Extension method KeyValueList.Presentation
- Extension method KeyValueList.Presentation
- Method KeyValueListFluent.Presentation
- Method KeyValueListFluent.Presentation
- Extension method RecordView.Presentation
- Extension method RecordView.Presentation
- Method RecordViewFluent.Presentation
- Method RecordViewFluent.Presentation
- Method TableFluent.Presentation``1
- Method TableFluent.Presentation``1
- Extension method Tree.Presentation
- Extension method Tree.Presentation
- Method TreeFluent.Presentation
- Method TreeFluent.Presentation
Constructors
public PresentationOptions() #Methods
public PresenterContext CreateContext(RenderContext render) #Creates a presenter context for a render.
Parameters
- render ConsoleMonster.Canvas.RenderContext
- The render context.
public static DateTimeOffset ReferenceNow() #Reads the presentation clock: CONSOLEMONSTER_NOW when it is a valid ISO timestamp, otherwise the current local time. This affects displayed timestamps, not elapsed-time measurements or scheduling.
Returns
DateTimeOffset The reference time, retaining the configured timestamp's offset.Inherited Methods
Properties
public CultureInfo? Culture { get; set; } #The culture for numbers and dates, or null for the render culture (the profile's TerminalProfile.Culture, else the current culture).
public DateTimeOffset? Now { get; set; } #The reference time for relative dates, or null for CONSOLEMONSTER_NOW (recordings/tests) and then the current time at render.
public TimeZoneInfo? TimeZone { get; set; } #The time zone for absolute dates, or null for local time.
Extension Methods
public static PresentationOptions Culture(PresentationOptions presentationOptions, CultureInfo? value) #Sets PresentationOptions.Culture: The culture for numbers and dates, or null for the render culture (the profile's TerminalProfile.Culture, else the current culture).
Parameters
- presentationOptions ConsoleMonster.Presenters.PresentationOptions
- The instance.
- value System.Globalization.CultureInfo?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Presenters.PresentationOptions { Culture = value }; presentationOptions.Culture(value);public static PresentationOptions Now(PresentationOptions presentationOptions, DateTimeOffset? value) #Sets PresentationOptions.Now: The reference time for relative dates, or null for CONSOLEMONSTER_NOW (recordings/tests) and then the current time at render.
Parameters
- presentationOptions ConsoleMonster.Presenters.PresentationOptions
- The instance.
- value System.DateTimeOffset?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Presenters.PresentationOptions { Now = value }; presentationOptions.Now(value);public static PresentationOptions TimeZone(PresentationOptions presentationOptions, TimeZoneInfo? value) #Sets PresentationOptions.TimeZone: The time zone for absolute dates, or null for local time.
Parameters
- presentationOptions ConsoleMonster.Presenters.PresentationOptions
- The instance.
- value System.TimeZoneInfo?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Presenters.PresentationOptions { TimeZone = value }; presentationOptions.TimeZone(value);