public ResultFieldModel(ResultTypeViewModel resultTypeViewModel) { this.resultTypeViewModel = resultTypeViewModel; originalField = new ResultTypeField(); IsDefault = true; columnNameIsValid = true; nameIsValid = true; this.selectedType = TypeHelpers.MapType(typeof(string)); this.selectedElementType = null; DragDropController = new DragDropController(this); }
public ResultFieldModel(ResultTypeViewModel resultTypeViewModel, ResultTypeField resultTypeField) : this(resultTypeViewModel) { originalField = resultTypeField; ColumnName = resultTypeField.ColumnName; Name = resultTypeField.Name; if (resultTypeField.TypeReference != null) { selectedType = resultTypeField.TypeReference; selectedElementType = (selectedType.IsList) ? resultTypeField.TypeReference.GetEnumerableContentType() : null; } IsDefault = false; nameIsValid = true; columnNameIsValid = true; }