}// END ThrowOnInconsistentCommands ///////////////////// protected void ThrowOnInconsistentCommands(IAttributeCommand command, IAttributeAliasCommand innerCommand) { var properties = command as ICreateOrMergePatchOrDeleteAttribute; var innerProperties = innerCommand as ICreateOrMergePatchOrRemoveAttributeAlias; if (properties == null || innerProperties == null) { return; } if (innerProperties.AttributeId == default(string)) { innerProperties.AttributeId = properties.AttributeId; } else { var outerAttributeIdName = "AttributeId"; var outerAttributeIdValue = properties.AttributeId; var innerAttributeIdName = "AttributeId"; var innerAttributeIdValue = innerProperties.AttributeId; ThrowOnInconsistentIds(innerProperties, innerAttributeIdName, innerAttributeIdValue, outerAttributeIdName, outerAttributeIdValue); } }// END ThrowOnInconsistentCommands /////////////////////
}// END Map(IRemove... //////////////////////////// protected virtual IAttributeAliasEvent Map(IAttributeAliasCommand c, IAttributeCommand outerCommand, long version, IAttributeState outerState) { var create = (c.CommandType == CommandType.Create) ? (c as ICreateAttributeAlias) : null; if (create != null) { return(MapCreate(create, outerCommand, version, outerState)); } var merge = (c.CommandType == CommandType.MergePatch || c.CommandType == null) ? (c as IMergePatchAttributeAlias) : null; if (merge != null) { return(MapMergePatch(merge, outerCommand, version, outerState)); } var remove = (c.CommandType == CommandType.Remove) ? (c as IRemoveAttributeAlias) : null; if (remove != null) { return(MapRemove(remove, outerCommand, version)); } throw new NotSupportedException(); }
void IAttributeAliasCommands.Remove(IAttributeAliasCommand c) { _innerCommands.Remove((CreateOrMergePatchOrRemoveAttributeAliasDto)c); }
public void Remove(IAttributeAliasCommand c) { _innerCommands.Remove(c); }
public void Add(IAttributeAliasCommand c) { _innerCommands.Add(c); }