public AttributeDictionary MessageDataFor_BaseMessage(bm.PrmSource prmSource         = bm.PrmSource.Default,
                                                              AttributeDictionary dictionary = null,
                                                              System.Boolean flag            = false,
                                                              DistributedAlgorithms.Algorithms.Base.Base.BaseMessage message = null)
        {
            if (prmSource == bm.PrmSource.MainPrm)
            {
                return(dictionary);
            }
            dictionary = new AttributeDictionary();
            dictionary.selfEnumName = "DistributedAlgorithms.Algorithms.Snapshots.LaiYoung_OneRound.m+ork_baseMessage";

            if (prmSource == bm.PrmSource.Default)
            {
                dictionary.Add(m.baseMessage.Flag, new Attribute {
                    Value = false, Changed = false
                });
                dictionary.Add(m.baseMessage.Message, new Attribute {
                    Value = new DistributedAlgorithms.Algorithms.Base.Base.BaseMessage(), Changed = false
                });
                return(dictionary);
            }

            dictionary.Add(m.baseMessage.Flag, new Attribute {
                Value = flag, Changed = false
            });
            dictionary.Add(m.baseMessage.Message, new Attribute {
                Value = message, Changed = false
            });
            return(dictionary);
        }
Ejemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public BaseMessage(BaseNetwork network, BaseMessage sourceMessage) : base(sourceMessage)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///      See explanation about constructors in NetworkElement
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 27/06/2017
        ///
        /// \param network        (BaseNetwork) - The network.
        /// \param sourceMessage  (BaseMessage) - Message describing the source.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public BaseMessage(BaseNetwork network, BaseMessage sourceMessage) : base(sourceMessage)
        {
            this.network = network;
        }