Box.net code snipped

Jan 9, 2012 at 8:48 AM

How to use this library for Box.net . Please provide code sample.

 

Jan 9, 2012 at 2:52 PM

What u need? dud

I made a console application with this excellent library.

This console sync all my files in a specific folder in Box.Net

If u need any assistance let me know.

Best Regards

Jan 10, 2012 at 6:38 AM

sounds good dear. I just need code sample upload file without using form request , because I'm implementing box.net in REST services. 

Jan 16, 2012 at 8:54 PM
zrasool wrote:

sounds good dear. I just need code sample upload file without using form request , because I'm implementing box.net in REST services. 

I implemented my project with C# Console Application. This made a simple check on folder that i want to sync. Upload and Download work perfectly.

Upload method sample if you need details let me know

#region Variaveis
private CloudStorage boxNetStorage;
private BoxComDTO _oBDto;
private readonly ICloudStorageAccessToken oAccess;
#endregion

#region Construtor
public ServiceBoxComBLL()
{

}
public ServiceBoxComBLL(BoxComDTO oBDto)
{
	_oBDto = oBDto;
	oAccess = connBoxCom(oBDto);
}

~ServiceBoxComBLL()  // destructor
{
	if (boxNetStorage.IsOpened)
	{
		boxNetStorage.Close();
	}
}
#endregion

public ICloudFileSystemEntry UploadBoxNet(BoxComDTO oBCDto)
{
	try
	{
		ICloudFileSystemEntry ret = boxNetStorage.UploadFile(oBCDto.localItem.FullName, oBCDto.RemoteDir);
		return ret;

	}
	catch (SharpBoxException sSBex)
	{
		throw new SharpBoxException(sSBex.ErrorCode);
	}
	catch (Exception)
	{
		throw;
	}

}