Ejemplo n.º 1
0
        /// <summary>
        /// For DropBox
        /// </summary>
        /// <param name="events"></param>
        /// <param name="requestToken"></param>
        public DropBoxProfile(IEventAggregator events,
                              string clientId, string clientSecret,
                              Func <UserLogin> loginFunc,
                              string aliasMask = "{0}'s DropBox")
            : base(events)
        {
            ProfileName = "DropBox";
            ProfileIcon = ResourceUtils.GetEmbeddedResourceAsByteArray(this, "/Model/DropBox/DropBox_Logo.png");
            ModelCache  = new EntryModelCache <DropBoxItemModel>(m => m.FullPath, () => Alias, true);
            //_accessToken = accessToken;
            Path          = PathHelper.Web;
            _loginFunc    = loginFunc;
            _clientId     = clientId;
            _clientSecret = clientSecret;
            _aliasMask    = aliasMask;

            _thumbnailExtractor = new DropBoxModelThumbnailExtractor(() => GetClient());


            DiskIO            = new DropBoxDiskIOHelper(this);
            HierarchyComparer = PathComparer.WebDefault;
            MetadataProvider  = new DropBoxMetadataProvider(() => GetClient());
            //CommandProviders = new List<ICommandProvider>();
            SuggestSource = new NullSuggestSource();
            //PathMapper = new SkyDriveDiskPathMapper(this, null);
            DragDrop = new FileBasedDragDropHandler(this);
        }
Ejemplo n.º 2
0
        internal GoogleDriveProfile(IEventAggregator events,
                                    IConfigurableHttpClientInitializer credential,
                                    string aliasMask      = "{0}'s GoogleDrive",
                                    string rootAccessPath = "/gdrive")
            : base(events)
        {
            ProfileName = "GoogleDrive";
            ProfileIcon = ResourceUtils.GetEmbeddedResourceAsByteArray(this, "/Model/GoogleDrive/GoogleDrive_Logo.png");
            _credential = credential;

            _aliasMask        = aliasMask;
            Path              = PathHelper.Web;
            DiskIO            = new GoogleDriveDiskIOHelper(this);
            HierarchyComparer = PathComparer.WebDefault;
            MetadataProvider  = new GoogleDriveMetadataProvider();
            //CommandProviders = new List<ICommandProvider>();
            SuggestSource   = new NullSuggestSource();
            DragDrop        = new FileBasedDragDropHandler(this);
            _rootAccessPath = rootAccessPath;
        }
Ejemplo n.º 3
0
 public SkyDriveProfile(IEventAggregator events, string clientId, Func <string> authCodeFunc,
                        string aliasMask      = "{0}'s SkyDrive",
                        string rootAccessPath = "/me/skydrive")
     : base(events)
 {
     ProfileName       = "SkyDrive";
     ProfileIcon       = ResourceUtils.GetEmbeddedResourceAsByteArray(this, "/Model/SkyDrive/OneDrive_Logo.png");
     ModelCache        = new EntryModelCache <SkyDriveItemModel>(m => m.UniqueId, () => Alias, true);
     Alias             = "SkyDrive";
     _aliasMask        = aliasMask;
     Path              = PathHelper.Web;
     DiskIO            = new SkyDriveDiskIOHelper(this);
     HierarchyComparer = PathComparer.WebDefault;
     MetadataProvider  = new SkyDriveMetadataProvider();
     CommandProviders  = new List <ICommandProvider>();
     SuggestSource     = new NullSuggestSource();
     //PathMapper = new SkyDriveDiskPathMapper(this, null);
     DragDrop        = new FileBasedDragDropHandler(this);
     _authClient     = new LiveAuthClient(clientId);
     _authCodeFunc   = authCodeFunc;
     _rootAccessPath = rootAccessPath;
 }