Beispiel #1
0
        /// <summary>
        /// Returns contacts from current connection or specified provider
        /// </summary>
        /// <param name="providerType">Provider Type (Connection should exist else exception is thrown)</param>
        /// <returns></returns>
        public List <Contact> GetContacts(PROVIDER_TYPE providerType = PROVIDER_TYPE.NOT_SPECIFIED)
        {
            if (providerType != PROVIDER_TYPE.NOT_SPECIFIED)
            {
                if (SessionManager.IsConnectedWith(providerType))
                {
                    return(GetConnection(providerType).GetContacts());
                }
                else
                {
                    throw new InvalidSocialAuthConnectionException(providerType);
                }
            }
            else
            {
                if (SessionManager.IsConnected)
                {
                    return(CurrentConnection.GetContacts());
                }

                else
                {
                    throw new InvalidSocialAuthConnectionException();
                }
            }
        }