public EditableApiAccessKeyHashViewModel GetEditableApiAccessKeyHashViewModel(IList <string> algorithms, ApiAccessKeyHashViewModel apiAccessKeyHash = null) { return(m_editableViewModelFactory.GetEditableApiAccessKeyHashViewModel(algorithms, apiAccessKeyHash)); }
public EditableApiAccessKeyHashViewModel GetEditableApiAccessKeyHashViewModel(IList <string> algorithms, ApiAccessKeyHashViewModel apiAccessKeyHash = null) { var editableApiAccessKeyHash = new EditableApiAccessKeyHashViewModel(); if (apiAccessKeyHash != null) { editableApiAccessKeyHash.Name = apiAccessKeyHash.Name; editableApiAccessKeyHash.Algorithm = apiAccessKeyHash.Algorithm; } var selectAlgorithmList = algorithms.Select(x => new SelectListItem(x, x, x.Equals(editableApiAccessKeyHash.Algorithm, StringComparison.InvariantCultureIgnoreCase))).ToList(); editableApiAccessKeyHash.SelectableAlgorithms = selectAlgorithmList; return(editableApiAccessKeyHash); }