это функция, которую я использую
Код: Выделить всё
public string gLInjectionStatusFormattedText (string? rawText) {
var text = rawText?.Replace("- Valve:", "\n Valve:")
.Replace("{CompletionAnalysisResults.troubleshooting_data.cont_gaslift_cmpl_inject_status.ref_data.current_op_valve_description}", "Weatherford RO-1 5/32 (THC)")
.Replace("- Mandrel number:", "\n Mandrel number:")
.Replace("{CompletionAnalysisResults.troubleshooting_data.cont_gaslift_cmpl_inject_status.ref_data.current_op_valve_mand_num}", "8")
.Replace("- Meas Depth:", "\n Meas Depth:")
.Replace("{CompletionAnalysisResults.troubleshooting_data.cont_gaslift_cmpl_inject_status.ref_data.current_op_valve_depth}", "4833.0 feet")
.Replace("{CompletionAnalysisResults.troubleshooting_data.cont_gaslift_cmpl_inject_status.ref_data.valve_status_summary}", "The deepest possible injection depth for this well is 4833.0 feet (MD) at current operating conditions.")
.Replace("Valve Status Summary:", "Valve Status Summary:");
return text ?? "";
}
Код: Выделить всё
@getSummaryStatusColor(summaryStatus.GLInjectionStatus)
GL Injection Status:
@gLInjectionStatusFormattedText(summaryStatus.GLInjectionText)
Я бы хотел, чтобы мой текст выглядел так
Код: Выделить всё
This well is injecting at its designed operating point:
Valve: Weatherford RO-1 5/32 (THC)
Mandrel number: 6
Meas Depth: 4833.0 feet
Valve Status Summary: The deepest possible injection depth for this well is 4833.0 feet (MD) at current operating conditions.
Lift gas injection is from an ORIF valve in mandrel number 6 at 4833.0 feet and has an estimated flow rate of 453.292 MCF/day.
Код: Выделить всё
This well is injecting at its designed operating point: Valve: Weatherford RO-1 5/32 (THC) Mandrel number: 8 Meas Depth: 4833.0 feet Valve Status Summary: The deepest possible injection depth for this well is 4833.0 feet (MD) at current operating conditions.
Подробнее здесь: https://stackoverflow.com/questions/786 ... -in-blazor