浏览代码

fix string interpolation $

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
c892ecc3
共有 7 个文件被更改,包括 12 次插入12 次删除
  1. 2
      com.unity.uiwidgets/Runtime/animation/tween_sequence.cs
  2. 2
      com.unity.uiwidgets/Runtime/painting/inline_span.cs
  3. 2
      com.unity.uiwidgets/Runtime/rendering/view.cs
  4. 4
      com.unity.uiwidgets/Runtime/service/text_input.cs
  5. 6
      com.unity.uiwidgets/Runtime/widgets/focus_manager.cs
  6. 2
      com.unity.uiwidgets/Runtime/widgets/gesture_detector.cs
  7. 6
      com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs

2
com.unity.uiwidgets/Runtime/animation/tween_sequence.cs


if (_intervals[index].contains(t))
return _evaluateAt(t, index);
}
D.assert(false, ()=>"TweenSequence.evaluate() could not find an interval for $t");
D.assert(false, ()=>$"TweenSequence.evaluate() could not find an interval for {t}");
return default(T);
}
public override string ToString(){

2
com.unity.uiwidgets/Runtime/painting/inline_span.cs


public override string ToString() =>
$"{foundation_.objectRuntimeType(this, "InlineSpanSemanticsInformation")}" +
$"{text: $text, semanticsLabel: $semanticsLabel, recognizer: $recognizer}";
"text: " + text + " , semanticsLabel: "+ semanticsLabel + " , recognizer: " + recognizer;
public bool Equals(InlineSpanSemanticsInformation other) {
if (ReferenceEquals(null, other)) {

2
com.unity.uiwidgets/Runtime/rendering/view.cs


}
public override string ToString() {
return $"${size} at ${devicePixelRatio}x";
return $"{size} at {devicePixelRatio}x";
}
}

4
com.unity.uiwidgets/Runtime/service/text_input.cs


return TextInputAction.newline;
}
throw new UIWidgetsError("Unknown text input action: $action");
throw new UIWidgetsError($"Unknown text input action: {action}");
}
public static FloatingCursorDragState _toTextCursorAction(string state) {

return FloatingCursorDragState.End;
}
throw new UIWidgetsError("Unknown text cursor action: $state");
throw new UIWidgetsError($"Unknown text cursor action: {state}");
}
public static RawFloatingCursorPoint _toTextPoint(FloatingCursorDragState state,

6
com.unity.uiwidgets/Runtime/widgets/focus_manager.cs


D.assert(findFirstFocus != null);
if (!canRequestFocus) {
D.assert(FocusManagerUtils._focusDebug(
"Node NOT requesting focus because canRequestFocus is false: $this"));
$"Node NOT requesting focus because canRequestFocus is false: {this}"));
return;
}

public void setFirstFocus(FocusScopeNode scope) {
D.assert(scope != null);
D.assert(scope != this, ()=>"Unexpected self-reference in setFirstFocus.");
D.assert(FocusManagerUtils._focusDebug("Setting scope as first focus in $this to node:", new List<string>{scope.ToString()}));
D.assert(FocusManagerUtils._focusDebug($"Setting scope as first focus in {this} to node:", new List<string>{scope.ToString()}));
if (scope._parent == null) {
_reparent(scope);
}

}
public void autofocus(FocusNode node) {
D.assert(FocusManagerUtils._focusDebug("Node autofocusing: $node"));
D.assert(FocusManagerUtils._focusDebug($"Node autofocusing: {node}"));
if (focusedChild == null) {
if (node._parent == null) {
_reparent(node);

2
com.unity.uiwidgets/Runtime/widgets/gesture_detector.cs


internal override bool _debugAssertTypeMatches(Type type) {
D.assert(type == typeof(T),
() => "GestureRecognizerFactory of type " + typeof(T) + " was used where type $type was specified.");
() => "GestureRecognizerFactory of type " + typeof(T) + $" was used where type {type} was specified.");
return true;
}
}

6
com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs


name: "The relevant error-causing widget was",
children: new List<DiagnosticsNode>() {
new ErrorDescription(
"${target.widget.toStringShort()} ${_describeCreationLocation(target)}"),
$"{target.widget.toStringShort()} " + $"{_describeCreationLocation(target)}"),
}
));
nodes.Add(new ErrorSpacer());

if (file != null) {
parts.Add(file);
}
parts.Add("$line");
parts.Add("$column");
parts.Add($"{line}");
parts.Add($"{column}");
string result = "";
foreach (var part in parts) {
result += part;

正在加载...
取消
保存