internal virtual ZipPackageRelationship CreateRelationship(Uri targetUri, TargetMode targetMode, string relationshipType)
        {
            var rel = new ZipPackageRelationship();

            rel.TargetUri        = targetUri;
            rel.TargetMode       = targetMode;
            rel.RelationshipType = relationshipType;
            rel.Id = "rId" + (maxRId++).ToString();
            _rels.Add(rel);
            return(rel);
        }
示例#2
0
        internal ZipPackageRelationshipCollection GetRelationshipsByType(string relationshipType)
        {
            var ret = new ZipPackageRelationshipCollection();

            foreach (var rel in _rels.Values)
            {
                if (rel.RelationshipType == relationshipType)
                {
                    ret.Add(rel);
                }
            }
            return(ret);
        }