public static UploadSession Start(Guid sessionId, OwnerId ownerId, List <FileUploadDescription> fileDescriptions, bool uploadAsPublic) { UploadSession session = new UploadSession(sessionId, ownerId, fileDescriptions, uploadAsPublic); session.State = SessionState.Started; session.StartDate = DateTimeOffset.UtcNow; return(session); }
public FileUploaded(string fileId, OwnerId ownerId, string fileName, string contentType, bool isPublic) : base(schemaVersion: 1) { this.FileId = fileId; this.OwnerId = ownerId; this.FileName = FileName; this.ContentType = contentType; this.IsPublic = isPublic; }
public UploadSessionStarted(string sessionId, OwnerId ownerId, IEnumerable <FileUploadDescription> fileDescriptions, bool uploadAsPublic) : base(schemaVersion: 1) { // TODO: Complete member initialization this.SessionId = sessionId; this.OwnerId = ownerId; this.FileDescriptions = fileDescriptions; this.UploadAsPublic = uploadAsPublic; }
private FileInformationIndex(Guid fileId, OwnerId ownerId, string fileName, ContentType contentType, int contentLength, ResourceUri uri, bool isPublic) { this.Id = fileId; this.OwnerId = ownerId; this.FileName = fileName; this.ContentType = contentType; this.ContentLength = contentLength; this.Uri = uri; this.IsPublic = isPublic; }
private UploadSession(Guid sessionId, OwnerId ownerId, List <FileUploadDescription> fileDescriptions, bool uploadAsPublic) { this.Id = sessionId; this.OwnerId = ownerId; this.State = SessionState.NotStarted; this.StartDate = null; this.EndDate = null; this.SetFileDescriptions(fileDescriptions); this.UploadAsPublic = uploadAsPublic; this.AddChange(new UploadSessionStarted(sessionId.ToString(), ownerId, fileDescriptions, uploadAsPublic)); }
private File(Guid fileId, OwnerId ownerId, string fileName, ContentType contentType, Stream content, bool isPublic) { this.Id = fileId; this.OwnerId = ownerId; this.FileName = fileName; this.ContentType = contentType; this.Content = content; this.IsPublic = isPublic; this.ContainerName = null; this.OriginUri = null; this.AccessUri = null; this.AddChange(new FileUploaded(this.Id.ToString(), this.OwnerId, this.FileName, this.ContentType.ToString(), this.IsPublic)); }
public static FileInformationIndex Create(Guid fileId, OwnerId ownerId, string fileName, ContentType contentType, int contentLength, ResourceUri uri, bool isPublic) { return(new FileInformationIndex(fileId, ownerId, fileName, contentType, contentLength, uri, isPublic)); }
public static File Upload(Guid fileId, OwnerId ownerId, string fileName, ContentType contentType, Stream content, bool isPublic) { return(new File(fileId, ownerId, fileName, contentType, content, isPublic)); }