예제 #1
0
        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));
        }
예제 #2
0
        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());
        }