C# Class Kudu.Services.DropboxHelper

显示文件 Open project: projectkudu/kudu

Private Properties

Property Type Description
ApplyChanges Task
ApplyChangesCore Task
CanIgnoreEntry bool
DropboxPathEncode string
GetOAuthHeader string
GetRepositoryPath string
IsFileChanged bool
LogError void
LogInfo void
ResetStats void
SafeCreateDir void
SafeDelete void
SafeWriteFile Task
Sync Task
UpdateStatusFile void

Public Methods

Method Description
CreateDropboxHttpClient ( DropboxDeployInfo info, Kudu.Services.DropboxEntryInfo entry ) : HttpClient
CreateDropboxV2HttpClient ( string baseUrl, string oauthToken ) : HttpClient
DropboxHelper ( ITracer tracer, IDeploymentStatusManager status, IDeploymentSettingsManager settings, IEnvironment environment ) : System
ProcessFileAsync ( HttpClient client, string path, string parent, System.DateTime lastModifiedUtc ) : Task
UpdateDropboxDeployInfo ( DropboxDeployInfo dropboxInfo ) : Task

Private Methods

Method Description
ApplyChanges ( Kudu.Services.DropboxInfo dropboxInfo, bool useOAuth20 ) : Task
ApplyChangesCore ( DropboxDeployInfo info, bool useOAuth20 ) : Task
CanIgnoreEntry ( string parent, Kudu.Services.DropboxEntryInfo entry ) : bool

An entry can be ignored if it doesn't belong to the path of the synced app or if it looks like a tool generated folder (e.g. .hg or .git)

DropboxPathEncode ( string path ) : string
GetOAuthHeader ( DropboxDeployInfo info, Kudu.Services.DropboxEntryInfo delta ) : string
GetRepositoryPath ( string parent, string path ) : string
IsFileChanged ( string parent, string path, System.DateTime modified ) : bool
LogError ( string value ) : void
LogInfo ( string value ) : void
ResetStats ( ) : void
SafeCreateDir ( string parent, string path ) : void
SafeDelete ( string parent, string path ) : void
SafeWriteFile ( string parent, string path, System.DateTime lastModifiedUtc, Stream stream ) : Task
Sync ( Kudu.Services.DropboxInfo dropboxInfo, string branch, IRepository repository, ITracer tracer ) : Task
UpdateStatusFile ( object state ) : void

Method Details

CreateDropboxHttpClient() public method

public CreateDropboxHttpClient ( DropboxDeployInfo info, Kudu.Services.DropboxEntryInfo entry ) : HttpClient
info DropboxDeployInfo
entry Kudu.Services.DropboxEntryInfo
return System.Net.Http.HttpClient

CreateDropboxV2HttpClient() public method

public CreateDropboxV2HttpClient ( string baseUrl, string oauthToken ) : HttpClient
baseUrl string
oauthToken string
return System.Net.Http.HttpClient

DropboxHelper() public method

public DropboxHelper ( ITracer tracer, IDeploymentStatusManager status, IDeploymentSettingsManager settings, IEnvironment environment ) : System
tracer ITracer
status IDeploymentStatusManager
settings IDeploymentSettingsManager
environment IEnvironment
return System

ProcessFileAsync() public method

public ProcessFileAsync ( HttpClient client, string path, string parent, System.DateTime lastModifiedUtc ) : Task
client System.Net.Http.HttpClient
path string
parent string
lastModifiedUtc System.DateTime
return Task

UpdateDropboxDeployInfo() public method

public UpdateDropboxDeployInfo ( DropboxDeployInfo dropboxInfo ) : Task
dropboxInfo DropboxDeployInfo
return Task