public static void SetUpAnnotatedItem(AnnotatedItem item, DefaultSettingsOfCodeEntity defaultSettings, Dictionary <object, object> context)
        {
            if (defaultSettings == null)
            {
                return;
            }

            if (item.WhereSection.IsNullOrEmpty() && !defaultSettings.WhereSection.IsNullOrEmpty())
            {
                item.WhereSection = defaultSettings.WhereSection.Select(p => p.CloneValue(context)).ToList();
            }

            if (item.Holder == null && defaultSettings.Holder != null)
            {
                item.Holder = defaultSettings.Holder.Clone(context);
            }
        }
Esempio n. 2
0
        public void RemoveCurrentDefaultSetings()
        {
            if (!_defaultSettingsOfCodeEntity.Any())
            {
                return;
            }

            _defaultSettingsOfCodeEntity.Pop();

            if (_defaultSettingsOfCodeEntity.Any())
            {
                _currentDefaultSetings = _defaultSettingsOfCodeEntity.Peek();
            }
            else
            {
                _currentDefaultSetings = null;
            }
        }
 protected void SetCurrentDefaultSetings(DefaultSettingsOfCodeEntity defaultSettings)
 {
     _context.SetCurrentDefaultSetings(defaultSettings);
 }
        private DefaultSettingsOfCodeEntity CreateDefaultSettingsOfCodeEntity()
        {
            var result = new DefaultSettingsOfCodeEntity();

            return(result);
        }
        public static void SetUpAnnotatedItem(AnnotatedItem item, DefaultSettingsOfCodeEntity defaultSettings)
        {
            var context = new Dictionary <object, object>();

            SetUpAnnotatedItem(item, defaultSettings, context);
        }
        public static void SetUpNamedFunction(NamedFunction namedFunction, DefaultSettingsOfCodeEntity defaultSettings)
        {
            var context = new Dictionary <object, object>();

            SetUpAnnotatedItem(namedFunction, defaultSettings, context);
        }
        public static void SetUpLinguisticVariable(LinguisticVariable linguisticVariable, DefaultSettingsOfCodeEntity defaultSettings)
        {
            var context = new Dictionary <object, object>();

            SetUpAnnotatedItem(linguisticVariable, defaultSettings, context);
        }
        public static void SetUpInlineTrigger(InlineTrigger inlineTrigger, DefaultSettingsOfCodeEntity defaultSettings)
        {
            var context = new Dictionary <object, object>();

            SetUpAnnotatedItem(inlineTrigger, defaultSettings, context);
        }