Skip to content

Added override to Delete method in toolkit. #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions SAP2000_Adapter/CRUD/Delete/_IDelete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
using System.Collections.Generic;
using System.Linq;
using BH.oM.Adapter;
using BH.oM.Data.Requests;

namespace BH.Adapter.SAP2000
{
Expand Down Expand Up @@ -70,6 +71,26 @@ protected override int IDelete(Type type, IEnumerable<object> ids, ActionConfig
}

/***************************************************/

protected override int Delete(FilterRequest request, ActionConfig actionConfig = null)
{
// Get object ids
List<object> objectIds = new List<object>();
object idObject;
if (request.Equalities.TryGetValue("ObjectIds", out idObject))

{
objectIds = (List<object>)idObject;

// Delete
return IDelete(request.Type, objectIds, actionConfig);
}

return 0;

}

/***************************************************/
}
}

Expand Down
4 changes: 2 additions & 2 deletions SAP2000_Adapter/SAP2000_Adapter.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -261,4 +261,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>