Пример #1
0
        public SignatureChange(ParameterConfiguration originalConfiguration, ParameterConfiguration updatedConfiguration)
        {
            this.OriginalConfiguration = originalConfiguration;
            this.UpdatedConfiguration  = updatedConfiguration;

            // TODO: Could be better than O(n^2)
            var originalParameterList = originalConfiguration.ToListOfParameters();
            var updatedParameterList  = updatedConfiguration.ToListOfParameters();

            for (int i = 0; i < originalParameterList.Count; i++)
            {
                var parameter    = originalParameterList[i];
                var updatedIndex = updatedParameterList.IndexOf(parameter);
                _originalIndexToUpdatedIndexMap.Add(i, updatedIndex != -1 ? updatedIndex : (int?)null);
            }
        }