コード例 #1
0
 public Diff(IEnumerable <object> addedObjects, IEnumerable <object> removedObjects, IEnumerable <object> modifiedObjects, DiffingConfig diffingConfig, Dictionary <string, Dictionary <string, Tuple <object, object> > > modifiedPropsPerObject = null, IEnumerable <object> unchangedObjects = null)
 {
     AddedObjects           = addedObjects;
     RemovedObjects         = removedObjects;
     ModifiedObjects        = modifiedObjects;
     DiffingConfig          = diffingConfig;
     ModifiedPropsPerObject = modifiedPropsPerObject;
     UnchangedObjects       = unchangedObjects;
 }
コード例 #2
0
        /***************************************************/
        /**** Constructor                               ****/
        /***************************************************/


        public Revision(IEnumerable <object> objects, Guid streamId, DiffingConfig revisionDiffConfing = null, string revisionName = null, string comment = null, Guid revisionId = default(Guid), long timestamp = default(long), string author = null)
        {
            StreamId            = streamId;
            RevisionId          = (revisionId == default(Guid)) ? Guid.NewGuid() : revisionId;
            RevisionName        = revisionName;
            Timestamp           = (timestamp == 0 || timestamp == default(long)) ? DateTime.UtcNow.Ticks : timestamp;
            Author              = String.IsNullOrWhiteSpace(author) ? Environment.UserDomainName + "/" + Environment.UserName : author;
            Comment             = comment;
            Objects             = objects;
            RevisionDiffConfing = revisionDiffConfing == null ? new DiffingConfig() : revisionDiffConfing;
        }