1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

removed string interpolation

This commit is contained in:
Kailey Joanette 2019-10-06 15:54:15 -04:00
parent a66926e777
commit a8578e9907
2 changed files with 12 additions and 12 deletions

View File

@ -65,7 +65,7 @@ namespace XNodeEditor.Odin
attributes = attributes attributes = attributes
.Append( GetPortAttribute( Property.Name, childIndex ) ) .Append( GetPortAttribute( Property.Name, childIndex ) )
.AppendIf( labelTextAttribute == null && hideLabelAttribute == null, new LabelTextAttribute( $"{Property.Name} {childIndex}" ) ); .AppendIf( labelTextAttribute == null && hideLabelAttribute == null, new LabelTextAttribute( string.Format( "{0} {1}", Property.Name, childIndex ) ) );
result = InspectorPropertyInfo.CreateValue( result = InspectorPropertyInfo.CreateValue(
name: CollectionResolverUtilities.DefaultIndexToChildName( childIndex ), name: CollectionResolverUtilities.DefaultIndexToChildName( childIndex ),
@ -99,9 +99,9 @@ namespace XNodeEditor.Odin
int nextId = this.ChildCount; int nextId = this.ChildCount;
if ( IsInput ) if ( IsInput )
this.node.AddDynamicInput( typeof( TElement ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicInput( typeof( TElement ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
else else
this.node.AddDynamicOutput( typeof( TElement ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicOutput( typeof( TElement ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
lastRemovedConnections.Clear(); lastRemovedConnections.Clear();
@ -115,9 +115,9 @@ namespace XNodeEditor.Odin
// Remove happens before insert and we lose all the connections // Remove happens before insert and we lose all the connections
// Add a new port at the end // Add a new port at the end
if ( IsInput ) if ( IsInput )
this.node.AddDynamicInput( typeof( TElement ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicInput( typeof( TElement ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
else else
this.node.AddDynamicOutput( typeof( TElement ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicOutput( typeof( TElement ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
var dynamicPorts = this.ports; var dynamicPorts = this.ports;
@ -205,7 +205,7 @@ namespace XNodeEditor.Odin
List<NodePort> dynamicPorts = new List<NodePort>(); List<NodePort> dynamicPorts = new List<NodePort>();
for ( int i = 0; i < int.MaxValue; ++i ) for ( int i = 0; i < int.MaxValue; ++i )
{ {
var nodePort = node.GetPort( $"{Property.Name} {i}" ); var nodePort = node.GetPort( string.Format( "{0} {1}", Property.Name, i ) );
if ( nodePort == null ) if ( nodePort == null )
break; break;

View File

@ -48,7 +48,7 @@ namespace XNodeEditor
attributes = attributes attributes = attributes
.Append( GetPortAttribute( Property.Name, childIndex ) ) .Append( GetPortAttribute( Property.Name, childIndex ) )
.AppendIf( labelTextAttribute == null && hideLabelAttribute == null, new LabelTextAttribute( $"{Property.Name} {childIndex}" ) ); .AppendIf( labelTextAttribute == null && hideLabelAttribute == null, new LabelTextAttribute( string.Format( "{0} {1}", Property.Name, childIndex ) ) );
result = InspectorPropertyInfo.CreateValue( result = InspectorPropertyInfo.CreateValue(
name: CollectionResolverUtilities.DefaultIndexToChildName( childIndex ), name: CollectionResolverUtilities.DefaultIndexToChildName( childIndex ),
@ -82,9 +82,9 @@ namespace XNodeEditor
int nextId = this.ChildCount; int nextId = this.ChildCount;
if ( IsInput ) if ( IsInput )
this.node.AddDynamicInput( typeof( TNotAList ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicInput( typeof( TNotAList ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
else else
this.node.AddDynamicOutput( typeof( TNotAList ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicOutput( typeof( TNotAList ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
lastRemovedConnections.Clear(); lastRemovedConnections.Clear();
@ -98,9 +98,9 @@ namespace XNodeEditor
// Remove happens before insert and we lose all the connections // Remove happens before insert and we lose all the connections
// Add a new port at the end // Add a new port at the end
if ( IsInput ) if ( IsInput )
this.node.AddDynamicInput( typeof( TNotAList ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicInput( typeof( TNotAList ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
else else
this.node.AddDynamicOutput( typeof( TNotAList ), connectionType, typeConstraint, $"{Property.Name} {nextId}" ); this.node.AddDynamicOutput( typeof( TNotAList ), connectionType, typeConstraint, string.Format( "{0} {1}", Property.Name, nextId ) );
var dynamicPorts = this.ports; var dynamicPorts = this.ports;
@ -211,7 +211,7 @@ namespace XNodeEditor
List<NodePort> dynamicPorts = new List<NodePort>(); List<NodePort> dynamicPorts = new List<NodePort>();
for ( int i = 0; i < int.MaxValue; ++i ) for ( int i = 0; i < int.MaxValue; ++i )
{ {
var nodePort = node.GetPort( $"{Property.Name} {i}" ); var nodePort = node.GetPort( string.Format( "{0} {1}", Property.Name, i ) );
if ( nodePort == null ) if ( nodePort == null )
break; break;