|
18 | 18 |
|
19 | 19 | using ch.cyberduck.core;
|
20 | 20 | using ch.cyberduck.core.aquaticprime;
|
21 |
| -using ch.cyberduck.core.azure; |
22 |
| -using ch.cyberduck.core.b2; |
23 | 21 | using ch.cyberduck.core.bonjour;
|
24 |
| -using ch.cyberduck.core.box; |
25 |
| -using ch.cyberduck.core.brick; |
26 |
| -using ch.cyberduck.core.ctera; |
27 |
| -using ch.cyberduck.core.dav; |
28 |
| -using ch.cyberduck.core.deepbox; |
29 |
| -using ch.cyberduck.core.dropbox; |
30 |
| -using ch.cyberduck.core.eue; |
31 | 22 | using ch.cyberduck.core.exception;
|
32 |
| -using ch.cyberduck.core.ftp; |
33 |
| -using ch.cyberduck.core.googledrive; |
34 |
| -using ch.cyberduck.core.googlestorage; |
35 |
| -using ch.cyberduck.core.hubic; |
36 | 23 | using ch.cyberduck.core.importer;
|
37 |
| -using ch.cyberduck.core.irods; |
38 | 24 | using ch.cyberduck.core.local;
|
39 |
| -using ch.cyberduck.core.manta; |
40 |
| -using ch.cyberduck.core.nextcloud; |
41 |
| -using ch.cyberduck.core.nio; |
42 | 25 | using ch.cyberduck.core.notification;
|
43 | 26 | using ch.cyberduck.core.oauth;
|
44 |
| -using ch.cyberduck.core.onedrive; |
45 |
| -using ch.cyberduck.core.openstack; |
46 |
| -using ch.cyberduck.core.owncloud; |
47 | 27 | using ch.cyberduck.core.pool;
|
48 | 28 | using ch.cyberduck.core.preferences;
|
49 | 29 | using ch.cyberduck.core.profiles;
|
50 |
| -using ch.cyberduck.core.s3; |
51 |
| -using ch.cyberduck.core.sds; |
52 | 30 | using ch.cyberduck.core.serializer;
|
53 |
| -using ch.cyberduck.core.sftp; |
54 |
| -using ch.cyberduck.core.smb; |
55 |
| -using ch.cyberduck.core.spectra; |
56 |
| -using ch.cyberduck.core.storegate; |
57 | 31 | using ch.cyberduck.core.threading;
|
58 | 32 | using ch.cyberduck.core.transfer;
|
59 | 33 | using ch.cyberduck.core.updater;
|
|
90 | 64 | using static Windows.Win32.PInvoke;
|
91 | 65 | using Application = ch.cyberduck.core.local.Application;
|
92 | 66 | using UnhandledExceptionEventArgs = System.UnhandledExceptionEventArgs;
|
| 67 | +using ServiceLoader = java.util.ServiceLoader; |
93 | 68 |
|
94 | 69 | namespace Ch.Cyberduck.Ui.Controller
|
95 | 70 | {
|
@@ -150,12 +125,10 @@ public MainController(ProtocolFactory protocolFactory, BaseController controller
|
150 | 125 | AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
151 | 126 | }
|
152 | 127 |
|
153 |
| - protocolFactory.register(new FTPProtocol(), new FTPTLSProtocol(), new SFTPProtocol(), new DAVProtocol(), new SMBProtocol(), |
154 |
| - new DAVSSLProtocol(), new SwiftProtocol(), new S3Protocol(), new GoogleStorageProtocol(), |
155 |
| - new AzureProtocol(), new IRODSProtocol(), new SpectraProtocol(), new B2Protocol(), new DriveProtocol(), |
156 |
| - new DropboxProtocol(), new HubicProtocol(), new LocalProtocol(), new OneDriveProtocol(), new SharepointProtocol(), new SharepointSiteProtocol(), |
157 |
| - new MantaProtocol(), new SDSProtocol(), new StoregateProtocol(), new BrickProtocol(), new NextcloudProtocol(), new OwncloudProtocol(), new CteraProtocol(), new BoxProtocol(), new EueProtocol(), |
158 |
| - new DeepboxProtocol()); |
| 128 | + foreach (Protocol p in ServiceLoader.load(typeof(Protocol))) |
| 129 | + { |
| 130 | + protocolFactory.register(p); |
| 131 | + } |
159 | 132 | protocolFactory.load();
|
160 | 133 |
|
161 | 134 | SynchronizationContext.SetSynchronizationContext(new WindowsFormsSynchronizationContext());
|
|
0 commit comments