Example #1
0
        public static Delta Delta(Revision revision, DiffingConfig diffingConfig = null, string comment = null)
        {
            if (revision == null)
            {
                BH.Engine.Reflection.Compute.RecordError("Cannot create a Delta from a null revision.");
                return(null);
            }

            Diff diff = Compute.DiffRevisions(null, revision, diffingConfig);

            return(new Delta(revision.StreamId, diff, revision.RevisionId, new Guid(), DateTime.UtcNow.Ticks, m_Author, comment));
        }
Example #2
0
        public static Delta Delta(Revision pastRevision, Revision currentRevision, DiffingConfig diffingConfig = null, string comment = null)
        {
            if (pastRevision == null)
            {
                BH.Engine.Reflection.Compute.RecordError("Cannot create a Delta from a null past revision.");
                return(null);
            }

            if (currentRevision == null)
            {
                BH.Engine.Reflection.Compute.RecordError("Cannot create a Delta from a null current revision.");
                return(null);
            }

            Diff diff = Compute.DiffRevisions(pastRevision, currentRevision, diffingConfig);

            return(new Delta(pastRevision.StreamId, diff, pastRevision.RevisionId, currentRevision.RevisionId, DateTime.UtcNow.Ticks, m_Author, comment));
        }
Example #3
0
        public static Delta Delta(Revision revision, DiffConfig diffConfig = null, string comment = null)
        {
            Diff diff = Compute.DiffRevisions(null, revision, diffConfig);

            return(new Delta(revision.StreamId, diff, revision.RevisionId, new Guid(), DateTime.UtcNow.Ticks, m_Author, comment));
        }
Example #4
0
        public static Delta Delta(Revision pastRevision, Revision currentRevision, DiffConfig diffConfig = null, string comment = null)
        {
            Diff diff = Compute.DiffRevisions(pastRevision, currentRevision, diffConfig);

            return(new Delta(pastRevision.StreamId, diff, pastRevision.RevisionId, currentRevision.RevisionId, DateTime.UtcNow.Ticks, m_Author, comment));
        }