示例#1
0
        public void AddContextFeatures(IContextFeature contextFeatureToAdd)
        {
            if (ContextFeatures.Contains(contextFeatureToAdd))
            {
                //TODO: Show some warning (not an error)
                return;
            }

            ContextFeatures.Add(contextFeatureToAdd);

            OnAddedFeaturesToSocialContext?.Invoke(new List <IContextFeature>()
            {
                contextFeatureToAdd
            });
            OnSocialContextChanged?.Invoke();
        }
示例#2
0
        public void RemoveContextFeatures(IContextFeature contextFeatureToRemove)
        {
            if (!ContextFeatures.Contains(contextFeatureToRemove))
            {
                //TODO: Show some warning (not an error)
                return;
            }

            ContextFeatures.Remove(contextFeatureToRemove);

            OnRemovedFeaturesFromSocialContext?.Invoke(new List <IContextFeature>()
            {
                contextFeatureToRemove
            });
            OnSocialContextChanged?.Invoke();
        }
 public SocialContextEventsTest()
 {
     _socialContext  = new SocialContext();
     _contextFeature = new ValueContextFeature <string>("", "");
 }
示例#4
0
 public void AddSalienceFeature(IContextFeature newFeature)
 {
 }