Esempio n. 1
0
        public AttributeDictionary MessageDataFor_Wave(bm.PrmSource prmSource,
                                                       AttributeDictionary dictionary = null,
                                                       System.Int32 parent            = 0)
        {
            if (prmSource == bm.PrmSource.MainPrm)
            {
                return(dictionary);
            }
            dictionary = new AttributeDictionary();

            if (prmSource == bm.PrmSource.Default)
            {
                dictionary.Add(m.wave.Parent, new Attribute {
                    Value = 0
                });
                return(dictionary);
            }

            dictionary.Add(m.wave.Parent, new Attribute {
                Value = parent
            });
            return(dictionary);
        }
        public AttributeDictionary MessageDataFor_Marker(bm.PrmSource prmSource         = bm.PrmSource.Default,
                                                         AttributeDictionary dictionary = null,
                                                         System.Double weight           = 0)
        {
            if (prmSource == bm.PrmSource.MainPrm)
            {
                return(dictionary);
            }
            dictionary = new AttributeDictionary();

            if (prmSource == bm.PrmSource.Default)
            {
                dictionary.Add(m.marker.Weight, new Attribute {
                    Value = 0, Changed = false
                });
                return(dictionary);
            }

            dictionary.Add(m.marker.Weight, new Attribute {
                Value = weight, Changed = false
            });
            return(dictionary);
        }
        public AttributeDictionary MessageDataFor_Report(bm.PrmSource prmSource         = bm.PrmSource.Default,
                                                         AttributeDictionary dictionary = null,
                                                         System.Double id       = 0,
                                                         System.String snapshot = "",
                                                         System.Double weight   = 0)
        {
            if (prmSource == bm.PrmSource.MainPrm)
            {
                return(dictionary);
            }
            dictionary = new AttributeDictionary();

            if (prmSource == bm.PrmSource.Default)
            {
                dictionary.Add(m.report.Id, new Attribute {
                    Value = 0, Changed = false
                });
                dictionary.Add(m.report.Snapshot, new Attribute {
                    Value = "", Changed = false
                });
                dictionary.Add(m.report.Weight, new Attribute {
                    Value = 0, Changed = false
                });
                return(dictionary);
            }

            dictionary.Add(m.report.Id, new Attribute {
                Value = id, Changed = false
            });
            dictionary.Add(m.report.Snapshot, new Attribute {
                Value = snapshot, Changed = false
            });
            dictionary.Add(m.report.Weight, new Attribute {
                Value = weight, Changed = false
            });
            return(dictionary);
        }
        public AttributeDictionary MessageDataFor_Presnp(bm.PrmSource prmSource         = bm.PrmSource.Default,
                                                         AttributeDictionary dictionary = null,
                                                         System.Double numMsg           = 0)
        {
            if (prmSource == bm.PrmSource.MainPrm)
            {
                return(dictionary);
            }
            dictionary = new AttributeDictionary();
            dictionary.selfEnumName = "DistributedAlgorithms.Algorithms.Snapshots.LaiYoung_OneRound.m+ork_presnp";

            if (prmSource == bm.PrmSource.Default)
            {
                dictionary.Add(m.presnp.NumMsg, new Attribute {
                    Value = 0, Changed = false
                });
                return(dictionary);
            }

            dictionary.Add(m.presnp.NumMsg, new Attribute {
                Value = numMsg, Changed = false
            });
            return(dictionary);
        }