5 instantiations of OrientationType
Microsoft.AspNetCore.Components.Platform (5)
OrientationType.cs (5)
34
public static OrientationType PortraitPrimary { get; } =
new
("portrait-primary");
39
public static OrientationType PortraitSecondary { get; } =
new
("portrait-secondary");
44
public static OrientationType LandscapePrimary { get; } =
new
("landscape-primary");
49
public static OrientationType LandscapeSecondary { get; } =
new
("landscape-secondary");
93
static OrientationType IWebIdlEnum<OrientationType>.Create(string value) =>
new
(value);
20 references to OrientationType
Microsoft.AspNetCore.Components.Platform (20)
OrientationType.cs (17)
14
[JsonConverter(typeof(WebIdlEnumJsonConverter<
OrientationType
>))]
15
public readonly struct OrientationType : IEquatable<
OrientationType
>, IWebIdlEnum<
OrientationType
>
21
/// Initializes a new instance of <see cref="
OrientationType
"/> with the specified string.
34
public static
OrientationType
PortraitPrimary { get; } = new("portrait-primary");
39
public static
OrientationType
PortraitSecondary { get; } = new("portrait-secondary");
44
public static
OrientationType
LandscapePrimary { get; } = new("landscape-primary");
49
public static
OrientationType
LandscapeSecondary { get; } = new("landscape-secondary");
62
public bool Equals(
OrientationType
other) => _value == other._value;
68
/// <returns><see langword="true"/> if <paramref name="obj"/> is an <see cref="
OrientationType
"/> with the same string; otherwise, <see langword="false"/>.</returns>
69
public override bool Equals(object? obj) => obj is
OrientationType
other && Equals(other);
83
public static bool operator ==(
OrientationType
left,
OrientationType
right) => left.Equals(right);
91
public static bool operator !=(
OrientationType
left,
OrientationType
right) => !left.Equals(right);
93
static
OrientationType
IWebIdlEnum<
OrientationType
>.Create(string value) => new(value);
ScreenOrientation.cs (3)
33
/// <returns>The orientation of the screen, such as <see cref="
OrientationType
.LandscapePrimary"/>.</returns>
35
public async ValueTask<
OrientationType
> GetTypeAsync()
39
return await orientation.GetValueAsync<
OrientationType
>("type").ConfigureAwait(false);