public IDevOpsConnector GetDevOpsConnector(out string url, out string project) { IDevOpsConnector result = null; url = null; project = null; var propertyType = GetPropertyTypeDevOpsConnector(); if (propertyType != null) { var property = _model.GetProperty(propertyType); if (property is IPropertyJsonSerializableObject jsonSerializableObject && jsonSerializableObject.Value is DevOpsConnection connection) { result = ExtensionUtils.GetExtension <IDevOpsConnectorFactory>(connection.ExtensionId)?.Create(); if (result != null) { url = connection.Url; project = connection.Project; result.MasterParent = connection.MasterParent; result.Tag = connection.Tag; result.WorkItemType = connection.WorkItemType; var workItemStateMappings = connection.WorkItemStateMappings; if (workItemStateMappings?.Any() ?? false) { foreach (var mapping in workItemStateMappings) { result.SetWorkItemStateMapping(mapping.Field, mapping.Status); } } var workItemFieldMappings = connection.WorkItemFieldMappings; if (workItemFieldMappings?.Any() ?? false) { foreach (var mapping in workItemFieldMappings) { result.SetWorkItemFieldMapping(mapping.Field, mapping.GetMappedField(_model)); } } } } } return(result); }
internal static void ChangeConfigureButtonStatus(bool status) { var extension = ExtensionUtils.GetExtension <MitigationsKanbanPanelFactory>("68D6E6B3-FEE0-4236-AB44-EFCD0C15FBAA"); extension?.ChangeRibbonActionStatus?.Invoke(extension, "CreatePanel", status); }