/// <summary> /// Parses the parameter value into the internal components structure. /// <br> /// Used to update all components from a full new value, as an alternative /// to setting individual components. Previous component values are overwritten. /// </summary> /// <param name="value"> complete field value including separators and CRLF /// @since 7.8 </param> //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: @Override public void parse(final String value) public override void parse(string value) { init(4); if (value != null) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String toparse = com.prowidesoftware.swift.model.field.SwiftParseUtils.getAlphaPrefix(value); string toparse = SwiftParseUtils.getAlphaPrefix(value); if (toparse != null && toparse.Length > 0) { if (toparse.Length > 0) { Component1 = StringUtils.Substring(toparse, 0, 1); if (toparse.Length >= 4) { Component2 = StringUtils.Substring(toparse, 1, 4); if (toparse.Length > 4) { Component3 = StringUtils.Substring(toparse, 4 - toparse); } } else { Component2 = StringUtils.Substring(toparse, 1 - toparse); } } } setComponent4(SwiftParseUtils.getNumericSuffix(value)); } }
/// <summary> /// Parses the parameter value into the internal components structure. /// <br> /// Used to update all components from a full new value, as an alternative /// to setting individual components. Previous component values are overwritten. /// </summary> /// <param name="value"> complete field value including separators and CRLF /// @since 7.8 </param> //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: @Override public void parse(final String value) public override void parse(string value) { init(3); Component1 = SwiftParseUtils.getTokenFirst(value, ":", "//"); string toparse = SwiftParseUtils.getTokenSecondLast(value, "//"); setComponent2(SwiftParseUtils.getAlphaPrefix(toparse)); setComponent3(SwiftParseUtils.getNumericSuffix(toparse)); }
/// <summary> /// Parses the parameter value into the internal components structure. /// <br> /// Used to update all components from a full new value, as an alternative /// to setting individual components. Previous component values are overwritten. /// </summary> /// <param name="value"> complete field value including separators and CRLF /// @since 7.8 </param> //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: @Override public void parse(final String value) public override void parse(string value) { init(4); Component1 = SwiftParseUtils.getTokenFirst(value, ":", "//"); string toparse = SwiftParseUtils.getTokenSecondLast(value, "//"); string alpha = SwiftParseUtils.getAlphaPrefix(toparse); if (alpha != null && alpha.Length >= 4) { //optional letter Component2 = StringUtils.Substring(alpha, 0, 1); //remaining string setComponent3(StringUtils.Substring(alpha, 1 - alpha)); } else if (toparse != null && toparse.Length >= 3) { //optional letter not present setComponent3(alpha); } setComponent4(SwiftParseUtils.getNumericSuffix(toparse)); }
/// <summary> /// Parses the parameter value into the internal components structure. /// <br> /// Used to update all components from a full new value, as an alternative /// to setting individual components. Previous component values are overwritten. /// </summary> /// <param name="value"> complete field value including separators and CRLF /// @since 7.8 </param> //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: @Override public void parse(final String value) public override void parse(string value) { init(2); Component1 = SwiftParseUtils.getAlphaPrefix(value); setComponent2(SwiftParseUtils.getNumericSuffix(value)); }