Ejemplo n.º 1
0
            public void Execute(DB.UpdaterData data)
            {
                if (AddedElementIds is null)
                {
                    AddedElementIds = data.GetAddedElementIds();
                }
                else
                {
                    foreach (var item in data.GetAddedElementIds())
                    {
                        AddedElementIds.Add(item);
                    }
                }

                if (DeletedElementIds is null)
                {
                    DeletedElementIds = data.GetDeletedElementIds();
                }
                else
                {
                    foreach (var item in data.GetDeletedElementIds())
                    {
                        DeletedElementIds.Add(item);
                    }
                }

                if (ModifiedElementIds is null)
                {
                    ModifiedElementIds = data.GetModifiedElementIds();
                }
                else
                {
                    foreach (var item in data.GetModifiedElementIds())
                    {
                        ModifiedElementIds.Add(item);
                    }
                }

                Debug.Assert(AddedElementIds.Count == 0);

                if (ModifiedElementIds.Count > 0)
                {
                    var message = new DB.FailureMessage(DBX.ExternalFailures.ElementFailures.FailedToPurgeElement);

                    message.SetFailingElements(ElementIds);
                    message.SetAdditionalElements(data.GetModifiedElementIds());

                    data.GetDocument().PostFailure(message);
                }
            }
Ejemplo n.º 2
0
 public void Execute(DB.UpdaterData data)
 {
     AddedElementIds    = data.GetAddedElementIds();
     DeletedElementIds  = data.GetDeletedElementIds();
     ModifiedElementIds = data.GetModifiedElementIds();
 }