Ejemplo n.º 1
0
        private static bool IsValid(ICredentialsAdapter adapter)
        {
            CredentialsAdapterAttribute attribute = adapter.GetType().GetCustomAttributes(typeof(CredentialsAdapterAttribute), false).FirstOrDefault() as CredentialsAdapterAttribute;

            if (attribute == null)
            {
                return(false);
            }
            return(attribute.Id.Equals(GitManager.Settings.CredentialsManager, StringComparison.InvariantCultureIgnoreCase));
        }
Ejemplo n.º 2
0
        private static string GetAdapterId(ICredentialsAdapter adapter)
        {
            CredentialsAdapterAttribute attribute = adapter.GetType().GetCustomAttributes(typeof(CredentialsAdapterAttribute), false).FirstOrDefault() as CredentialsAdapterAttribute;

            if (attribute == null)
            {
                return("");
            }
            return(attribute.Id);
        }
Ejemplo n.º 3
0
        private string GetAdapterName(ICredentialsAdapter adapter)
        {
            if (adapter == null)
            {
                return("None");
            }
            CredentialsAdapterAttribute attribute = adapter.GetType().GetCustomAttributes(typeof(CredentialsAdapterAttribute), false).FirstOrDefault() as CredentialsAdapterAttribute;

            if (attribute == null)
            {
                return("");
            }
            return(attribute.Name);
        }