3 instantiations of Int32OrStringV1
Aspire.Hosting.Kubernetes (3)
Resources\Int32OrStringV1.cs (2)
87return new(value); 97return value is not null ? new Int32OrStringV1(value) : null;
Yaml\IntOrStringConverter.cs (1)
45return string.IsNullOrEmpty(value) ? null : new Int32OrStringV1(value);
24 references to Int32OrStringV1
Aspire.Hosting.Kubernetes (24)
Resources\ContainerPortV1.cs (2)
71public Int32OrStringV1? ContainerPort { get; set; } 78public 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. 69public static explicit operator int(Int32OrStringV1 value) => 77public static explicit operator string?(Int32OrStringV1? value) => 85public static implicit operator Int32OrStringV1(int value) 95public static implicit operator Int32OrStringV1?(string? value) 106public static bool operator ==(Int32OrStringV1? left, int right) 117public static bool operator !=(Int32OrStringV1? left, int right) 133public static bool operator ==(Int32OrStringV1? left, string? right) 154public static bool operator !=(Int32OrStringV1? left, string? right)
Resources\ServicePortV1.cs (2)
55public Int32OrStringV1 Port { get; set; } = null!; 62public 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> 24return 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> 58if (value is not Int32OrStringV1 obj) 60throw new InvalidOperationException($"Expected {nameof(Int32OrStringV1)} but got {value?.GetType()}");