From a8578e990723aa59e57577f9c8994b3f751bfa2b Mon Sep 17 00:00:00 2001 From: Kailey Joanette Date: Sun, 6 Oct 2019 15:54:15 -0400 Subject: [PATCH] removed string interpolation --- .../Drawers/Odin/DynamicPortListBackedResolver.cs | 12 ++++++------ .../Drawers/Odin/DynamicPortListNoDataResolver.cs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Scripts/Editor/Drawers/Odin/DynamicPortListBackedResolver.cs b/Scripts/Editor/Drawers/Odin/DynamicPortListBackedResolver.cs index 62396a1..4b98412 100644 --- a/Scripts/Editor/Drawers/Odin/DynamicPortListBackedResolver.cs +++ b/Scripts/Editor/Drawers/Odin/DynamicPortListBackedResolver.cs @@ -65,7 +65,7 @@ namespace XNodeEditor.Odin attributes = attributes .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( name: CollectionResolverUtilities.DefaultIndexToChildName( childIndex ), @@ -99,9 +99,9 @@ namespace XNodeEditor.Odin int nextId = this.ChildCount; 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 - 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(); @@ -115,9 +115,9 @@ namespace XNodeEditor.Odin // Remove happens before insert and we lose all the connections // Add a new port at the end 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 - 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; @@ -205,7 +205,7 @@ namespace XNodeEditor.Odin List dynamicPorts = new List(); 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 ) break; diff --git a/Scripts/Editor/Drawers/Odin/DynamicPortListNoDataResolver.cs b/Scripts/Editor/Drawers/Odin/DynamicPortListNoDataResolver.cs index d20ba57..f65d40a 100644 --- a/Scripts/Editor/Drawers/Odin/DynamicPortListNoDataResolver.cs +++ b/Scripts/Editor/Drawers/Odin/DynamicPortListNoDataResolver.cs @@ -48,7 +48,7 @@ namespace XNodeEditor attributes = attributes .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( name: CollectionResolverUtilities.DefaultIndexToChildName( childIndex ), @@ -82,9 +82,9 @@ namespace XNodeEditor int nextId = this.ChildCount; 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 - 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(); @@ -98,9 +98,9 @@ namespace XNodeEditor // Remove happens before insert and we lose all the connections // Add a new port at the end 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 - 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; @@ -211,7 +211,7 @@ namespace XNodeEditor List dynamicPorts = new List(); 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 ) break;