コード例 #1
0
ファイル: LocalSettings.cs プロジェクト: marius00/iagd
        public void AddGrimDawnLocation(string location)
        {
            if (_grimDawnLocation == null)
            {
                _grimDawnLocation = new List <string>(1);
            }

            if (!_grimDawnLocation.Contains(location))
            {
                _grimDawnLocation.Add(location);
            }

            OnMutate?.Invoke(null, null);
        }
コード例 #2
0
        public void AddShownFeature(FeatureRecommendation feature)
        {
            if (_shownFeatureRecommendations == null)
            {
                _shownFeatureRecommendations = new List <FeatureRecommendation>();
            }

            if (!_shownFeatureRecommendations.Contains(feature))
            {
                _shownFeatureRecommendations.Add(feature);
            }

            OnMutate?.Invoke(null, null);
        }
コード例 #3
0
        public void AddPrefix(string prefix)
        {
            if (_prefixes == null)
            {
                _prefixes = new List <string>();
            }

            if (!_prefixes.Contains(prefix))
            {
                _prefixes.Add(prefix);
            }

            OnMutate?.Invoke(null, null);
        }
コード例 #4
0
        public void RemovePrefix(string prefix)
        {
            _prefixes?.Remove(prefix);

            OnMutate?.Invoke(null, null);
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: pdnminh99/dotnet_exercises
 private void OnMutateEmitted() => OnMutate?.Invoke(this, new MutationEventPayload());