Try our conversational search powered by Generative AI!

ProgramService class

Version InfoThis topic applies to Episerver.ConnectForMarketingAutomation 4.0.0 and lower. For later versions, see Sample Connector - IMarketingConnector

 Interface for working with provider programs.

  • Inheritance hierarchy.
    System.Object
      DemoConnector.Services.ProgramService
  • Namespace. DemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public class ProgramService : IProgramService

Constructor 

Initializes a new instance of the ProgramService class

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public ProgramService()

Methods 

ProgramService.CreateProgram method 

Implement this method if your connector can create program objects on the end point.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public void CreateProgram(
      IProgram newProgram
    )
  • Parameters.
    • newProgram. Type: IProgram
      New program to create.
  • Implements. IProgramService.CreateProgram(IProgram)
  • Remarks. The MAI framework never calls this method, it is supplied as part of the interface for convience only, it is up to your implementation to decide to implement and call it or not.

ProgramService.GetAllPrograms method 

Not called by the MAI Framework.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public IEnumerable<IProgram> GetAllPrograms()
  • Return value. TypeIEnumerable< IProgram>
    List of Programs
  • Implements. IProgramService.GetAllPrograms()

ProgramService.GetProgramsByProfileAndStatus method 

Returns a list of IInProgram objects which describe a Program

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public IEnumerable<IInProgram> GetProgramsByProfileAndStatus(
      Profile profile,
      ProgramStatus status
    )
  • Parameters.
  • Return value. TypeIEnumerable< IInProgram>
    List of Programs
  • Implements.IProgramService.GetProgramsByProfileAndStatus(Profile, ProgramStatus)
  • Remarks. Throw NotImplementedException if your connector will not support programs.

ProgramService.GetProgramsByStatus method 

Returns a list of Programs for the visitor group criteria page.

Last updated: Dec 10, 2015