private IAsyncResult OnBeginDownloadBinaryContentByUser(object[] inValues, AsyncCallback callback, object asyncState) { string itemIdOrTempFileId = (string)inValues[0]; AccessTokenData accessToken = (AccessTokenData)inValues[1]; return(this.BeginDownloadBinaryContentByUser(itemIdOrTempFileId, accessToken, callback, asyncState)); }
private IAsyncResult OnBeginUploadBinaryByteArray(object[] inValues, AsyncCallback callback, object asyncState) { AccessTokenData accessToken = (AccessTokenData)inValues[0]; byte[] data = (byte[])inValues[1]; return(this.BeginUploadBinaryByteArray(accessToken, data, callback, asyncState)); }
private IAsyncResult OnBeginUploadBinaryContent(object[] inValues, AsyncCallback callback, object asyncState) { AccessTokenData accessToken = (AccessTokenData)inValues[0]; Stream uploadContent = (Stream)inValues[1]; return(this.BeginUploadBinaryContent(accessToken, uploadContent, callback, asyncState)); }
public string UploadBinaryContent(AccessTokenData AccessToken, Stream UploadContent) { return(((IStreamUpload)this).UploadBinaryContent(new UploadRequest { AccessToken = AccessToken, UploadContent = UploadContent }).FilePath); }
public string UploadBinaryContent(AccessTokenData AccessToken, Stream UploadContent) { return(Channel.UploadBinaryContent(new UploadRequest201501 { AccessToken = AccessToken, UploadContent = UploadContent }).FilePath); }
public IAsyncResult BeginUploadBinaryContent(AccessTokenData AccessToken, Stream UploadContent, AsyncCallback callback, object asyncState) { return(((IStreamUpload)this).BeginUploadBinaryContent(new UploadRequest { AccessToken = AccessToken, UploadContent = UploadContent }, callback, asyncState)); }
public void UploadBinaryByteArrayAsync(AccessTokenData accessToken, byte[] data, object userState) { if (this.onBeginUploadBinaryByteArrayDelegate == null) { this.onBeginUploadBinaryByteArrayDelegate = new ClientBase <IStreamUpload> .BeginOperationDelegate(this.OnBeginUploadBinaryByteArray); } if (this.onEndUploadBinaryByteArrayDelegate == null) { this.onEndUploadBinaryByteArrayDelegate = new ClientBase <IStreamUpload> .EndOperationDelegate(this.OnEndUploadBinaryByteArray); } if (this.onUploadBinaryByteArrayCompletedDelegate == null) { this.onUploadBinaryByteArrayCompletedDelegate = new SendOrPostCallback(this.OnUploadBinaryByteArrayCompleted); } base.InvokeAsync(this.onBeginUploadBinaryByteArrayDelegate, new object[] { accessToken, data }, this.onEndUploadBinaryByteArrayDelegate, this.onUploadBinaryByteArrayCompletedDelegate, userState); }
public void UploadBinaryContentAsync(AccessTokenData AccessToken, Stream UploadContent, object userState) { if (this.onBeginUploadBinaryContentDelegate == null) { this.onBeginUploadBinaryContentDelegate = new ClientBase <IStreamUpload> .BeginOperationDelegate(this.OnBeginUploadBinaryContent); } if (this.onEndUploadBinaryContentDelegate == null) { this.onEndUploadBinaryContentDelegate = new ClientBase <IStreamUpload> .EndOperationDelegate(this.OnEndUploadBinaryContent); } if (this.onUploadBinaryContentCompletedDelegate == null) { this.onUploadBinaryContentCompletedDelegate = new SendOrPostCallback(this.OnUploadBinaryContentCompleted); } base.InvokeAsync(this.onBeginUploadBinaryContentDelegate, new object[] { AccessToken, UploadContent }, this.onEndUploadBinaryContentDelegate, this.onUploadBinaryContentCompletedDelegate, userState); }
public void DownloadBinaryContentByUserAsync(string itemIdOrTempFileId, AccessTokenData accessToken, object userState) { if (this.onBeginDownloadBinaryContentByUserDelegate == null) { this.onBeginDownloadBinaryContentByUserDelegate = new ClientBase <IStreamDownload> .BeginOperationDelegate(this.OnBeginDownloadBinaryContentByUser); } if (this.onEndDownloadBinaryContentByUserDelegate == null) { this.onEndDownloadBinaryContentByUserDelegate = new ClientBase <IStreamDownload> .EndOperationDelegate(this.OnEndDownloadBinaryContentByUser); } if (this.onDownloadBinaryContentByUserCompletedDelegate == null) { this.onDownloadBinaryContentByUserCompletedDelegate = new SendOrPostCallback(this.OnDownloadBinaryContentByUserCompleted); } base.InvokeAsync(this.onBeginDownloadBinaryContentByUserDelegate, new object[] { itemIdOrTempFileId, accessToken }, this.onEndDownloadBinaryContentByUserDelegate, this.onDownloadBinaryContentByUserCompletedDelegate, userState); }
public void UploadBinaryByteArrayAsync(AccessTokenData accessToken, byte[] data) { this.UploadBinaryByteArrayAsync(accessToken, data, null); }
public UploadRequest(AccessTokenData AccessToken, Stream UploadContent) { this.AccessToken = AccessToken; this.UploadContent = UploadContent; }
public IAsyncResult BeginUploadBinaryByteArray(AccessTokenData accessToken, byte[] data, AsyncCallback callback, object asyncState) { return(base.Channel.BeginUploadBinaryByteArray(accessToken, data, callback, asyncState)); }
public string UploadBinaryByteArray(AccessTokenData accessToken, byte[] data) { return(base.Channel.UploadBinaryByteArray(accessToken, data)); }
public static bool IsSystemAdministrator(this AccessTokenData accessToken) { return((accessToken.Privileges & 1) != 0 || accessToken.HasSystemPrivilege("tcm:SystemAdministration")); }
public async Task <Stream> DownloadBinaryContentByUserAsync(string itemIdOrTempFileId, AccessTokenData accessToken) { return(await Task <Stream> .Factory.FromAsync(Channel.BeginDownloadBinaryContentByUser, Channel.EndDownloadBinaryContentByUser, itemIdOrTempFileId, accessToken, null)); }
public Stream DownloadBinaryContentByUser(string itemIdOrTempFileId, AccessTokenData accessToken) { return(Channel.DownloadBinaryContentByUser(itemIdOrTempFileId, accessToken)); }
public void DownloadBinaryContentByUserAsync(string itemIdOrTempFileId, AccessTokenData accessToken) { this.DownloadBinaryContentByUserAsync(itemIdOrTempFileId, accessToken, null); }
public IAsyncResult BeginDownloadBinaryContentByUser(string itemIdOrTempFileId, AccessTokenData accessToken, AsyncCallback callback, object asyncState) { return(base.Channel.BeginDownloadBinaryContentByUser(itemIdOrTempFileId, accessToken, callback, asyncState)); }
public void UploadBinaryContentAsync(AccessTokenData AccessToken, Stream UploadContent) { this.UploadBinaryContentAsync(AccessToken, UploadContent, null); }
public static bool HasSystemPrivilege(this AccessTokenData accessToken, string privilegeKey = "tcm:SystemAdministration") { return(accessToken.InheritedSystemPrivileges != null && accessToken.InheritedSystemPrivileges.Keys.Any((SystemPrivilege sysPriv) => sysPriv.Key == privilegeKey || sysPriv.Key == "tcm:SystemAdministration")); }