Esempio n. 1
0
        private void AssociateMetadataAndLink(FuzzyMetadata metadata, TypeLink link)
        {
            link.RegDebuggableParent(metadata);

            var links = new List<TypeLink>(metadata.Links);
            links.Add(link);
            metadata.Links = links.AsReadOnly();

            metadata.SomeMoreStuffInferred += (o, e) => Engine.ScheduleSync(this, (FuzzyMetadata)o);
            metadata.ContradictionReported += (o, e) => ReportContradiction(String.Format(
                "'{0}' reports: '{1}'", o, e.WhatHappened));
        }
Esempio n. 2
0
 public void UnregisterLink(TypeLink link)
 {
     _links.Remove(link);
     link.DisposeDebuggableObject();
 }
Esempio n. 3
0
 public Sync(TypeLink link, FuzzyMetadata sender)
 {
     Link = link;
     Sender = sender;
 }
Esempio n. 4
0
 public void RegisterLink(TypeLink link)
 {
     link.ContradictionReported += (o, e) => ProcessContradiction(o, e.WhatHappened);
     _links.Add(link);
 }
Esempio n. 5
0
 public void ScheduleSync(TypeLink link, FuzzyMetadata sender)
 {
     if (_syncsAllowed)
     {
         _queue.Enqueue(new Sync(link, sender));
     }
 }