You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Diffing_Engine/Compute/DiffWithCustomIds.cs
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -74,36 +74,36 @@ public static Diff DiffWithCustomIds(List<object> pastObjects, List<string> past
74
74
// "followingObjectsIds": Ids of the "followingObjects" that should be used to match them with the "pastObjects". If no match is found, a followingObject is identified as "added".
75
75
// "diffingConfig": Additional configurations.
76
76
// "recordEvents": Because this method can be called from many different places, some Notes/Warnings/Errors may not be relevant in all cases, so we give the option to turn them off.
// Check if input objects and correspondent Id lists are of equal size.
115
-
if(pastObjects.Count()!=pastObjectsIds.Count())
115
+
if(pastObjects.Count()!=pastObjectsIDs.Count())
116
116
{
117
-
if(recordEvents)BH.Engine.Base.Compute.RecordError($"The number of input `{nameof(pastObjects)}` must be the same as the number of input `{nameof(pastObjectsIds)}`.");
117
+
if(recordEvents)BH.Engine.Base.Compute.RecordError($"The number of input `{nameof(pastObjects)}` must be the same as the number of input `{nameof(pastObjectsIDs)}`.");
if(recordEvents)BH.Engine.Base.Compute.RecordError($"The number of input `{nameof(followingObjects)}` must be the same as the number of input `{nameof(followingObjectsIds)}`.");
123
+
if(recordEvents)BH.Engine.Base.Compute.RecordError($"The number of input `{nameof(followingObjects)}` must be the same as the number of input `{nameof(followingObjectsIDs)}`.");
124
124
returnnull;
125
125
}
126
126
127
127
// Make dictionary with object ids to speed up/simplify the lookups.
128
-
Dictionary<string,object>pastObjs_dict=pastObjectsIds.Zip(pastObjects,(k,v)=>new{k,v}).ToDictionary(x =>x.k, x =>x.v);
129
-
Dictionary<string,object>follObjs_dict=followingObjectsIds.Zip(followingObjects,(k,v)=>new{k,v}).ToDictionary(x =>x.k, x =>x.v);
128
+
Dictionary<string,object>pastObjs_dict=pastObjectsIDs.Zip(pastObjects,(k,v)=>new{k,v}).ToDictionary(x =>x.k, x =>x.v);
129
+
Dictionary<string,object>follObjs_dict=followingObjectsIDs.Zip(followingObjects,(k,v)=>new{k,v}).ToDictionary(x =>x.k, x =>x.v);
// If there is no overlap in the keys between the two sets, no "modified" object can have been detected.
246
246
// This could be either because there are truly no modified objects, or more likely because the user has input objects that do not have a valid Id assigned.
$"\nThis can also happen if the input objects come from models that were completely re-created between revisions (i.e. their IDs are completely different). In this latter case, the Diffing worked successfully but you may want to use a different ID.");
[Description("Returns a Delta object with the Diff between the two input Revisions, also called `Diff-based Delta`.")]
46
-
[Input("previousRevision","A previous Revision")]
46
+
[Input("pastRevision","A previous Revision")]
47
47
[Input("currentRevision","A new Revision")]
48
-
[Input("DiffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
48
+
[Input("diffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
[Description("Returns a Delta object containing all the objects of the input Revision, also called `Revision-Based Delta`.")]
73
73
[Input("revision","A new Revision")]
74
-
[Input("DiffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
74
+
[Input("diffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
[Description("Returns a Delta object, containing all the input objects wrapped in a Revision. Also called `Revision-Based Delta`.")]
89
90
[Input("objects","Objects that will be wrapped into a new Revision in order to produce this Delta.")]
90
-
[Input("streamId","Id of the Stream that will own the revision produced by this Delta.")]
91
+
[Input("streamID","Id of the Stream that will own the revision produced by this Delta.")]
91
92
[Input("revisionName","Name to be assigned to the Revision that this Delta will produce.")]
92
93
[Input("comment","Comment to be stored along the Revision that this Delta will produce.")]
93
-
[Input("DiffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
[Input("diffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
[Description("Returns a Delta object based on the provided Diff.")]
102
103
[Input("diff","Diff that will be included in this Delta.")]
103
-
[Input("streamId","Id of the Stream that will own the revision produced by this Delta.")]
104
-
[Input("revisionName","Name to be assigned to the Revision that this Delta will produce.")]
104
+
[Input("streamID","ID of the Stream that will own the revision produced by this Delta.")]
105
+
[Input("revisionFrom","ID of revision this delta is going from..")]
105
106
[Input("comment","Comment to be stored along the Revision that this Delta will produce.")]
106
-
[Input("DiffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
[Input("diffingConfig","Sets configs such as properties to be ignored in the diffing, or enable/disable property-by-property diffing.\nBy default it takes the DiffingConfig property of the Revision. This input can be used to override it.")]
0 commit comments