internal static CompositeSharedOpaqueSealDirectory InternalDeserializeCompositeSharedOpaqueSealDirectory(PipReader reader)
        {
            DirectoryArtifact artifact = reader.ReadDirectoryArtifact();
            var directory = new CompositeSharedOpaqueSealDirectory(
                artifact.Path,
                reader.ReadArray(reader1 => reader1.ReadDirectoryArtifact()),
                reader.ReadPipProvenance(),
                reader.ReadReadOnlyArray(reader1 => reader1.ReadStringId()));

            directory.SetDirectoryArtifact(artifact);
            Contract.Assume(directory.IsInitialized && directory.Directory == artifact);

            return(directory);
        }
Example #2
0
        internal static SealDirectory InternalDeserializeSealDirectory(PipReader reader)
        {
            DirectoryArtifact artifact = reader.ReadDirectoryArtifact();
            var directory = new SealDirectory(
                artifact.Path,
                reader.ReadSortedReadOnlyArray(reader1 => reader1.ReadFileArtifact(), OrdinalFileArtifactComparer.Instance),
                (SealDirectoryKind)reader.ReadByte(),
                reader.ReadPipProvenance(),
                reader.ReadReadOnlyArray(reader1 => reader1.ReadStringId()),
                reader.ReadReadOnlyArray(reader1 => reader1.ReadStringId()),
                reader.ReadBoolean());

            directory.SetDirectoryArtifact(artifact);
            Contract.Assume(directory.IsInitialized && directory.Directory == artifact);

            return(directory);
        }
        internal static CompositeSharedOpaqueSealDirectory InternalDeserializeCompositeSharedOpaqueSealDirectory(PipReader reader)
        {
            DirectoryArtifact artifact = reader.ReadDirectoryArtifact();
            var directory = new CompositeSharedOpaqueSealDirectory(
                artifact.Path,
                reader.ReadArray(reader1 => reader1.ReadDirectoryArtifact()),
                reader.ReadPipProvenance(),
                reader.ReadReadOnlyArray(reader1 => reader1.ReadStringId()),
                reader.ReadBoolean()
                    ? new SealDirectoryContentFilter((SealDirectoryContentFilter.ContentFilterKind)reader.ReadByte(), reader.ReadString())
                    : (SealDirectoryContentFilter?)null,
                (SealDirectoryCompositionActionKind)reader.ReadByte());

            directory.SetDirectoryArtifact(artifact);
            Contract.Assume(directory.IsInitialized && directory.Directory == artifact);

            return(directory);
        }