/// <summary> /// Creates a new vertex update definition /// </summary> /// <param name="myCommentUpdate">The comment update</param> /// <param name="myUpdatedStructuredProperties">The update for the structured properties</param> /// <param name="myUpdatedUnstructuredProperties">The update for the unstructured properties</param> /// <param name="myUpdatedBinaryProperties">The update for the binary properties</param> /// <param name="mySingleEdgeUpdate">The update for the single edges</param> /// <param name="myHyperEdgeUpdate">The update for the hyper edges</param> /// <param name="myToBeAddedIncomingEdges">The incoming edges that should be added to the vertex</param> public VertexUpdateDefinition( String myCommentUpdate = null, StructuredPropertiesUpdate myUpdatedStructuredProperties = null, UnstructuredPropertiesUpdate myUpdatedUnstructuredProperties = null, BinaryPropertiesUpdate myUpdatedBinaryProperties = null, SingleEdgeUpdate mySingleEdgeUpdate = null, HyperEdgeUpdate myHyperEdgeUpdate = null, IEnumerable <IncomingEdgeAddDefinition> myToBeAddedIncomingEdges = null) : base(myCommentUpdate, myUpdatedStructuredProperties, myUpdatedUnstructuredProperties) { UpdatedBinaryProperties = myUpdatedBinaryProperties; UpdatedSingleEdges = mySingleEdgeUpdate; UpdateHyperEdges = myHyperEdgeUpdate; ToBeAddedIncomingEdges = myToBeAddedIncomingEdges; }
public void UpdateStructuredProperties(StructuredPropertiesUpdate myStructuredUpdates) { lock (_lockobject) { if (myStructuredUpdates != null) { if (myStructuredUpdates.Deleted != null) { if (_structuredProperties != null) { foreach (var item in myStructuredUpdates.Deleted) { _structuredProperties.Remove(item); } } } if (myStructuredUpdates.Updated != null) { if (_structuredProperties != null) { foreach (var item in myStructuredUpdates.Updated) { if (_structuredProperties.ContainsKey(item.Key)) { _structuredProperties[item.Key] = item.Value; } else { _structuredProperties.Add(item.Key, item.Value); } } } else { _structuredProperties = new Dictionary <Int64, IComparable>(); foreach (var item in myStructuredUpdates.Updated) { _structuredProperties.Add(item.Key, item.Value); } } } } } }