示例#1
0
        public bool IsActionInDelta(LinkChangeAction linkChangeAction)
        {
            ILink link = linkChangeAction.Link;

            using (RuntimeEntityModel context = RuntimeEntityModel.CreateInstance())
            {
                var duplicateActionInDelta = context.FindLinkChangeActionInDelta(
                    SessionGroupId,
                    SessionId,
                    SourceId,
                    linkChangeAction.ChangeActionId,
                    link.SourceArtifactId,
                    link.SourceArtifact.Uri,
                    link.TargetArtifact.Uri,
                    link.Comment,
                    link.LinkType.ReferenceName,
                    link.LinkType.FriendlyName,
                    GetExtendedPropertyString(link),
                    link.LinkType.SourceArtifactType.ReferenceName,
                    link.LinkType.SourceArtifactType.FriendlyName,
                    link.LinkType.SourceArtifactType.ContentTypeReferenceName,
                    link.LinkType.TargetArtifactType.ReferenceName,
                    link.LinkType.TargetArtifactType.FriendlyName,
                    link.LinkType.TargetArtifactType.ContentTypeReferenceName);

                return(duplicateActionInDelta.Count() > 0);
            }
        }