Пример #1
0
        private Contracts.Options CreateNewSynchronizationProfileOrNull(out ProfileType?type)
        {
            type = _uiService.QueryProfileType();
            if (!type.HasValue)
            {
                return(null);
            }

            var options = Contracts.Options.CreateDefault(type.Value);

            switch (type)
            {
            case ProfileType.Google:
                options.ServerAdapterType = ServerAdapterType.WebDavHttpClientBasedWithGoogleOAuth;
                break;

            case ProfileType.Swisscom:
                options.ServerAdapterType = ServerAdapterType.WebDavHttpClientBasedWithSwisscomOAuth;
                break;

            default:
                options.ServerAdapterType = ServerAdapterType.WebDavHttpClientBased;
                break;
            }
            return(options);
        }
Пример #2
0
 private IProfileType QueryProfileType()
 {
     return(_uiService.QueryProfileType(_profileTypeRegistry.AllTypes));
 }