public void UpdateUnstructuredProperties(UnstructuredPropertiesUpdate myUnstructuredUpdates) { lock (_lockobject) { if (myUnstructuredUpdates != null) { if (myUnstructuredUpdates.Deleted != null) { if (_unstructuredProperties != null) { foreach (var item in myUnstructuredUpdates.Deleted) { if (_unstructuredProperties != null) { _unstructuredProperties.Remove(item); } } } } if (myUnstructuredUpdates.Updated != null) { if (_unstructuredProperties != null) { foreach (var item in myUnstructuredUpdates.Updated) { if (_unstructuredProperties.ContainsKey(item.Key)) { _unstructuredProperties[item.Key] = item.Value; } else { _unstructuredProperties.Add(item.Key, item.Value); } } } else { _unstructuredProperties = new Dictionary <String, Object>(); foreach (var item in myUnstructuredUpdates.Updated) { _unstructuredProperties.Add(item.Key, item.Value); } } } } } }
/// <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; }