public static RequestAlterEdgeType MakeRequestAlterEdgeType(ServiceEdgeType myEdgeType, ServiceAlterEdgeChangeset myChangeset) { var Request = new RequestAlterEdgeType(myEdgeType.Name); #region Add Attributes foreach (var toAdd in myChangeset.ToBeAddedProperties) { Request.AddProperty(toAdd.ToPropertyPredefinition()); } #endregion #region Remove Attributes foreach (var toDel in myChangeset.ToBeRemovedProperties) { Request.RemoveProperty(toDel); } #endregion #region Rename Task myChangeset.ToBeRenamedProperties.Select((tuple, key) => Request.RenameAttribute(tuple.Key, tuple.Value)); #endregion if (myChangeset.Comment != null) Request.SetComment(myChangeset.Comment); if (myChangeset.NewTypeName != null) Request.RenameType(myChangeset.Comment); //todo add unknown attribute return Request; }
private void ProcessRenameType(AAlterTypeCommand myAlterCommand, ref RequestAlterEdgeType result) { var command = (AlterType_RenameType)myAlterCommand; result.RenameType(command.NewName); }