This documentation version is deprecated. Please click here for the latest version

SDK: Adding Create Actions (Advanced)

Prev Next

Version 7.x .NET Architecture Change


Adding this interface to a 'service' that is created.

public class MyEntityService : BaseEntityService<MyEntity>
{
   public override BaseActionType[] GetCreateMethods(Folder folder, AbstractUserContext userContext)
   {
       List<BaseActionType> actions = new List<BaseActionType>();
      
       return actions.ToArray();
   }
}


Creating entity action factory registered to 'folder'.

public class MyEntityService : BaseEntityService<MyEntity>
{
   public virtual void Initialize()
   {
       EntityActionFactoriesHolder.GetInstance().RegisterObjectForType(typeof(Folder), new MyFolderActionFactory());
   }
}

public class MyFolderActionFactory : IEntityActionFactory
{
   public BaseActionType[] GetActions(AbstractUserContext userContext, EntityActionType[] actionTypes, IPlatformEntity target, string entityId)
   {
       List<BaseActionType> list = new List<BaseActionType>();
      
       return list.ToArray();
   }
}