/// <summary>
 /// Initializes a new instance of the <see cref="MessageHandlerConfirmation"/> class.
 /// </summary>
 /// <param name="wrapper">The wrapper.</param>
 /// <param name="enumerator">The enumerator.</param>
 /// <param name="associationRoleEditable">if set to <c>true</c> [association role editable].</param>
 internal MessageHandlerConfirmation(IMessageHandlerConfigurationWrapper wrapper, Func <IMessageHandlerConfigurationWrapper, AssociationCouplerViewModel[]> enumerator, bool associationRoleEditable)
 {
     b_MessageHandlerConfigurationWrapper        = wrapper;
     m_AssociationCouplerViewModelEnumeratorFunc = enumerator;
     AssociationCouplersEnumerator           = m_AssociationCouplerViewModelEnumeratorFunc(wrapper);
     AssociationRoleSelectorControlViewModel = new Controls.AssociationRoleSelectorControlViewModel(CreateDefault, MessageHandlerConfigurationWrapper.TransportRole, associationRoleEditable);
 }
 public void AddMessageHandler(IMessageHandlerConfigurationWrapper item)
 {
     m_Configuration.Add(item);
 }
 public void Remove(IMessageHandlerConfigurationWrapper item)
 {
     m_Configuration.Remove(item);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Gets the <see cref="IEnumerable{T}" /> of all candidates <see cref="AssociationCouplerViewModel" /> that can be associated with <paramref name="mhcWrapper" />
 /// </summary>
 /// <param name="mhcWrapper">The wrapper.</param>
 /// <remarks>
 /// Implements <see cref="IAssociationServices"/>
 /// </remarks>
 /// <returns>All available <see cref="AssociationCouplerViewModel" /> as the <see cref="IEnumerable{T}" />.</returns>
 public AssociationCouplerViewModel[] GetAssociationCouplerViewModelEnumerator(IMessageHandlerConfigurationWrapper mhcWrapper)
 {
     return(m_DataSetsServices.GetDataSets(mhcWrapper.TransportRole).
            Select <DataSetConfigurationWrapper, AssociationCouplerViewModel>
                (dscWrapper => new AssociationCouplerViewModel(new AssociationCoupler(mhcWrapper.Check(dscWrapper),
                                                                                      (associated, association) => mhcWrapper.Associate(associated, association),
                                                                                      dscWrapper.ToString(),
                                                                                      DefaultAssociation(mhcWrapper.TransportRole, dscWrapper)))).
            ToArray <AssociationCouplerViewModel>());
 }