object Apply(NetworkFileItemCreated e) { var locator = new NetworkContentLocator { ContentId = e.SequenceNr, IsMap = e.IsMap, MapOrContent = e.MapOrContent }; var stream = new MemoryStream(locator.GetBytes()); return(_localState.NewFileItem(_root, new DirectoryId(e.ParentDirId), e.Name, stream, null)); }
object Apply(NetworkFileContentSet e) { var locator = new NetworkContentLocator { ContentId = e.SequenceNr, IsMap = e.IsMap, MapOrContent = e.MapOrContent }; var stream = new MemoryStream(locator.GetBytes()); _localState.SetContent(_root, new FileId(e.FileId), stream, null); return(new object()); }