Beispiel #1
0
        internal Entity AddEntity(string name, string regid, string role, string thumbprint = null)
        {
            XElement e;

            Swid.Root().Add(e = new XElement(Iso19770_2.Entity)
                                .Set(Iso19770_2.NameAttribute, name)
                                .Set(Iso19770_2.RegIdAttribute, regid)
                                .Set(Iso19770_2.RoleAttribute, role)
                                .Set(Iso19770_2.ThumbprintAttribute, thumbprint)
                            );
            return(new Entity(e));
        }
Beispiel #2
0
        internal Link AddLink(string referenceUri, string relationship, string mediaType, string ownership, string use, string appliesToMedia, string artifact)
        {
            XElement e;

            Swid.Root().Add(e = new XElement(Iso19770_2.Link)
                                .Set(Iso19770_2.HRefAttribute, referenceUri)
                                .Set(Iso19770_2.RelationshipAttribute, relationship)
                                .Set(Iso19770_2.MediaTypeAttribute, mediaType)
                                .Set(Iso19770_2.OwnershipAttribute, ownership)
                                .Set(Iso19770_2.UseAttribute, use)
                                .Set(Iso19770_2.MediaAttribute, appliesToMedia)
                                .Set(Iso19770_2.ArtifactAttribute, artifact)
                            );
            return(new Link(e));
        }