public OneDriveThumbAsset(string parentpath, OneDriveFileSystem fs, string name, string url, int width, int height, string mime) : base(parentpath, fs) { _name = name; _mime = mime; Width = width; Height = height; _url = url; }
public async Task <FileSystemResult <IFileSystem> > InitAsync(string fname, IOAuthProvider provider, Dictionary <string, object> settings, string userauthorization = null) { FileSystemResult <OneDriveFileSystem> r = await OneDriveFileSystem.Create(fname, provider, settings, Name, userauthorization); if (!r.IsOk) { return(new FileSystemResult <IFileSystem>(r.Error)); } OneDriveFileSystem f = r.Result; return(new FileSystemResult <IFileSystem>(f)); }
public static async Task <FileSystemResult <OneDriveFileSystem> > Create(string fname, IOAuthProvider provider, Dictionary <string, object> settings, string pluginanme, string userauthorization = null) { OneDriveFileSystem am = new OneDriveFileSystem(provider); am.FS = am; am.OAuth.OAuthUrl = OneDriveOAuth; am.OAuth.EndPointUrl = null; am.OAuth.OAuthLoginUrl = OneDriveOAuthLogin; am.OAuth.DefaultScopes = OneDriveScopes; bool userauth = !string.IsNullOrEmpty(userauthorization); if (userauth) { am.DeserializeAuth(userauthorization); } FileSystemResult r = await am.OAuth.Login(settings, pluginanme, userauth, true); if (!r.IsOk) { return(new FileSystemResult <OneDriveFileSystem>(r.Error)); } r = await am.OAuth.MayRefreshToken(); if (!r.IsOk) { return(new FileSystemResult <OneDriveFileSystem>(r.Error)); } r = await am.QuotaAsync(); if (!r.IsOk) { return(new FileSystemResult <OneDriveFileSystem>(r.Error)); } r = await am.PopulateAsync(); if (!r.IsOk) { return(new FileSystemResult <OneDriveFileSystem>(r.Error)); } return(new FileSystemResult <OneDriveFileSystem>(am)); }
public OneDriveDirectory(string parentpath, OneDriveFileSystem fs) : base(parentpath, fs, OneDriveMappings.Maps) { IsPopulated = false; }
public OneDriveObject(string parentname, OneDriveFileSystem fs, Mappings maps) : base(parentname, maps) { FS = fs; }
public OneDriveFile(string parentpath, OneDriveFileSystem fs) : base(parentpath, fs, OneDriveMappings.Maps) { }
public OneDriveRoot(OneDriveFileSystem fs) : base(string.Empty, fs) { IsRoot = true; }