/// <summary>
 /// Creates an Issue Repository based on the settings.
 /// </summary>
 public abstract IssueRepository Create(IssueRepositorySettings settings);
 public override IssueRepository Create(IssueRepositorySettings settings)
 {
     IssueRepositoryConnector dlg = Delegate;
     if (dlg != null)
     {
         return dlg.Create(settings);
     }
     return null;
 }
 public override IssueRepository Create(IssueRepositorySettings settings)
 {
     return settings != null && Name.Equals(settings.ConnectorName)
                ? VersionOneRepository.Create(settings)
                : null;
 }
        private bool SetIssueRepositoryProperties(AnkhContext context, SvnItem item, IssueRepositorySettings settings)
        {
            return context.GetService<IProgressRunner>().RunModal("Applying Issue Repository settings",
                delegate(object sender, ProgressWorkerArgs wa)
                {
                    wa.Client.SetProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryConnector, settings.ConnectorName);
                    wa.Client.SetProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryUri, settings.RepositoryUri.ToString());
                    string repositoryId = settings.RepositoryId;
                    if (string.IsNullOrEmpty(repositoryId))
                    {
                        wa.Client.DeleteProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryId);
                    }
                    else
                    {
                        wa.Client.SetProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryId, settings.RepositoryId);
                    }
                    IDictionary<string, object> customProperties = settings.CustomProperties;
                    if (customProperties == null
                        || customProperties.Count == 0
                        )
                    {
                        wa.Client.DeleteProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryPropertyNames);
                        wa.Client.DeleteProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryPropertyValues);
                    }
                    else
                    {
                        string[] propNameArray = new string[customProperties.Keys.Count];
                        customProperties.Keys.CopyTo(propNameArray, 0);
                        string propNames = string.Join(",", propNameArray);

                        List<string> propValueList = new List<string>();
                        foreach (string propName in propNameArray)
                        {
                            object propValue;
                            if (!customProperties.TryGetValue(propName, out propValue))
                            {
                                propValue = string.Empty;
                            }
                            propValueList.Add(propValue == null ? string.Empty : propValue.ToString());
                        }
                        string propValues = string.Join(",", propValueList.ToArray());
                        wa.Client.SetProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryPropertyNames, propNames);
                        wa.Client.SetProperty(item.FullPath, AnkhSccPropertyNames.IssueRepositoryPropertyValues, propValues);
                    }

                }).Succeeded;
        }
 public override IssueRepository Create(IssueRepositorySettings settings)
 {
     return null;
 }
 public bool ShouldPersist(IssueRepositorySettings other)
 {
     return !(true
         && other != null
         && string.Equals(ConnectorName, other.ConnectorName)
         && object.Equals(IssueRepositoryUri, other.RepositoryUri)
         && string.Equals(IssueRepositoryId, other.RepositoryId)
         && HasSameProperties(CustomProperties, other.CustomProperties)
         )
         ;
 }
 public static IssueRepository Create(IssueRepositorySettings settings)
 {
     return settings != null ? new VersionOneRepository(settings.RepositoryUri, settings.RepositoryId, settings.CustomProperties) : null;
 }