Source/NFX/Serialization/JSON/NLSMap.cs
/// <summary>
/// Takes entries from this instance and overides them by ISO keys from another instance returning the new instance
/// </summary>
Takes entries from this instance and overides them by ISO keys from another instance returning the new instance
Takes entries from this instance and overides them by ISO keys from another instance returning the new instance
public NLSMap OverrideBy(NLSMap other)
      {
        if (m_Data==null) return other;
        if (other.m_Data==null) return this;
        var lst = new List<NDPair>(m_Data);
        for(var j=0; j<other.m_Data.Length; j++)
        {
          var found = false;
          for(var i=0; i<lst.Count; i++)
          {
            if (lst[i].ISO==other.m_Data[j].ISO)
            {
              lst[i] = other.m_Data[j];
              found = true;
              break;
            }
          }
          if (!found)
           lst.Add(other.m_Data[j]);
        }
        if (lst.Count>MAX_ISO_COUNT) throw new NFXException("Exceeded NLSMap.MAX_ISO_COUNT");
        return new NLSMap( lst.ToArray() );
      }
public NLSMap OverrideBy ( NLSMap other ) { if ( m_Data == null ) return other ; if ( other . m_Data == null ) return this ; var lst = new List < NDPair > ( m_Data ) ; for ( var j = 0 ; j < other . m_Data . Length ; j ++ ) { var found = false ; for ( var i = 0 ; i < lst . Count ; i ++ ) { if ( lst [ i ] . ISO == other . m_Data [ j ] . ISO ) { lst [ i ] = other . m_Data [ j ] ; found = true ; break ; } } if ( ! found ) lst . Add ( other . m_Data [ j ] ) ; } if ( lst . Count > MAX_ISO_COUNT ) throw new NFXException ( " " ) ; return new NLSMap ( lst . ToArray ( ) ) ; }
Takes entries from this instance and overides them by ISO keys from another instance returning the new instance
Takes entries from this instance and overides them by ISO keys from another instance returning the new instance
other
NLSMap