Example #1
0
File: Diff.cs Project: Tsakpot/BHoM
 public Diff(IEnumerable <object> addedObjects, IEnumerable <object> removedObjects, IEnumerable <object> modifiedObjects, DiffConfig diffConfig, Dictionary <string, Dictionary <string, Tuple <object, object> > > modifiedPropsPerObject = null, IEnumerable <object> unchangedObjects = null)
 {
     AddedObjects           = addedObjects;
     RemovedObjects         = removedObjects;
     ModifiedObjects        = modifiedObjects;
     DiffConfig             = diffConfig;
     ModifiedPropsPerObject = modifiedPropsPerObject;
     UnchangedObjects       = unchangedObjects;
 }
Example #2
0
        /***************************************************/
        /**** Constructor                               ****/
        /***************************************************/


        public Revision(IEnumerable <object> objects, Guid streamId, DiffConfig 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 DiffConfig() : revisionDiffConfing;
        }
Example #3
0
        public Stream(IEnumerable <IBHoMObject> objects, DiffConfig streamDiffConfig = null, string streamId = null, string revision = null, string comment = null)
        {
            Objects = objects;

            StreamId = string.IsNullOrWhiteSpace(streamId) ? Guid.NewGuid().ToString("N") : StreamId;
            Revision = revision;
            Comment  = comment;

            Timestamp = DateTime.UtcNow.Ticks;
            Author    = Environment.UserDomainName + "/" + Environment.UserName;

            StreamDiffConfig = streamDiffConfig;
        }