public void Evaluate(int SpreadMax) { if (this.FInLayoutType.IsChanged || this.FInFormat.IsChanged) { this.FOutput.SliceCount = SpreadMax; int offset = 0; for (int i = 0; i < SpreadMax; i++) { Format fmt = (Format)Enum.Parse(typeof(Format), this.FInFormat[i].Name); this.FOutput[i] = InputLayoutFactory.GetInputElement(this.FInLayoutType[i], fmt, 0, offset); offset += FormatHelper.Instance.GetSize(fmt); } } }
public void Evaluate(int SpreadMax) { if (this.FInLayoutType.IsChanged || this.FInFormat.IsChanged || this.FAutoIndex.IsChanged) { this.FOutput.SliceCount = SpreadMax; int offset = 0; InputElement[] elements = new InputElement[SpreadMax]; for (int i = 0; i < SpreadMax; i++) { Format fmt = (Format)Enum.Parse(typeof(Format), this.FInFormat[i].Name); elements[i] = InputLayoutFactory.GetInputElement(this.FInLayoutType[i], fmt, 0, offset); offset += FormatHelper.Instance.GetSize(fmt); } if (this.FAutoIndex[0]) { InputLayoutFactory.AutoIndex(elements); } this.FOutput.AssignFrom(elements); } }