3 instantiations of Int32OrStringV1
Aspire.Hosting.Kubernetes (3)
Resources\Int32OrStringV1.cs (2)
87
return
new
(value);
97
return value is not null ? new
Int32OrStringV1
(value) : null;
Yaml\IntOrStringConverter.cs (1)
45
return string.IsNullOrEmpty(value) ? null : new
Int32OrStringV1
(value);
24 references to Int32OrStringV1
Aspire.Hosting.Kubernetes (24)
Resources\ContainerPortV1.cs (2)
71
public
Int32OrStringV1
? ContainerPort { get; set; }
78
public
Int32OrStringV1
? HostPort { get; set; }
Resources\Int32OrStringV1.cs (10)
19
/// Initializes a new instance of the <see cref="
Int32OrStringV1
"/> class with a 32-bit integer value.
26
/// Initializes a new instance of the <see cref="
Int32OrStringV1
"/> class with a string value.
69
public static explicit operator int(
Int32OrStringV1
value) =>
77
public static explicit operator string?(
Int32OrStringV1
? value) =>
85
public static implicit operator
Int32OrStringV1
(int value)
95
public static implicit operator
Int32OrStringV1
?(string? value)
106
public static bool operator ==(
Int32OrStringV1
? left, int right)
117
public static bool operator !=(
Int32OrStringV1
? left, int right)
133
public static bool operator ==(
Int32OrStringV1
? left, string? right)
154
public static bool operator !=(
Int32OrStringV1
? left, string? right)
Resources\ServicePortV1.cs (2)
55
public
Int32OrStringV1
Port { get; set; } = null!;
62
public
Int32OrStringV1
TargetPort { get; set; } = null!;
Yaml\IntOrStringConverter.cs (10)
12
/// and deserialization of objects of type <see cref="
Int32OrStringV1
"/>.
21
/// <returns>Returns true if the specified type is <see cref="
Int32OrStringV1
"/>, otherwise false.</returns>
24
return type == typeof(
Int32OrStringV1
);
28
/// Reads a YAML scalar from the parser and converts it into an instance of <see cref="
Int32OrStringV1
"/>.
31
/// <param name="type">The target type for deserialization, expected to be <see cref="
Int32OrStringV1
"/>.</param>
33
/// <returns>Returns an instance of <see cref="
Int32OrStringV1
"/> constructed from the parsed scalar value.</returns>
52
/// <param name="value">The object to be serialized. Expected to be of type <see cref="
Int32OrStringV1
"/>.</param>
55
/// <exception cref="InvalidOperationException">Thrown when the provided value is not of type <see cref="
Int32OrStringV1
"/>.</exception>
58
if (value is not
Int32OrStringV1
obj)
60
throw new InvalidOperationException($"Expected {nameof(
Int32OrStringV1
)} but got {value?.GetType()}");