internal ICloudDrive CreateCloudDrive(string schema, string userName, string root, CloudDriveParameters parameters)
        {
            var rootName = new RootName(schema, userName, root);

            var asyncGateway = default(IAsyncCloudGateway);
            if (GatewayManager.TryGetAsyncCloudGatewayForSchema(rootName.Schema, out asyncGateway))
                return new AsyncCloudDrive(rootName, asyncGateway, parameters);

            var gateway = default(ICloudGateway);
            if (GatewayManager.TryGetCloudGatewayForSchema(rootName.Schema, out gateway))
                return new CloudDrive(rootName, gateway, parameters);

            throw new KeyNotFoundException(string.Format(CultureInfo.CurrentCulture, Resources.NoGatewayForSchema, rootName.Schema));
        }
 public AsyncCloudDrive(RootName rootName, IAsyncCloudGateway gateway, CloudDriveParameters parameters) : base(rootName, parameters)
 {
     this.gateway = gateway;
 }