public T AttachActionAbility <T>() where T : ActionAbility
        {
            var action = AttachAbility <T>(null);

            TypeActions.Add(typeof(T), action);
            return(action);
        }
Exemple #2
0
        public void SetOp(SetOperator setOperator)
        {
            TypeActions ta = null;

            if (typeActionLookup.TryGetValue(variable.GetType(), out ta))
            {
                ta.SetFunc(this, setOperator);
            }
        }
Exemple #3
0
        public string GetDataDescription()
        {
            TypeActions ta = null;

            if (typeActionLookup.TryGetValue(variable.GetType(), out ta))
            {
                return(ta.DescFunc(this));
            }
            return("Null");
        }
Exemple #4
0
        public void AddNewPairTypeAvailableActions(string type, ICollection <string> availableActions)
        {
            TypeActions newTypeActions = new TypeActions
            {
                Type             = type,
                AvailableActions = availableActions
            };

            _context.db.GetCollection <TypeActions>(_typesActionsCollName).InsertOne(newTypeActions);
        }
Exemple #5
0
        public bool Compare(CompareOperator compareOperator, ref bool compareResult)
        {
            TypeActions ta = null;

            if (typeActionLookup.TryGetValue(variable.GetType(), out ta))
            {
                compareResult = ta.CompareFunc(this, compareOperator);
                return(true);
            }
            return(false);
        }
        /// <summary>
        /// Clears the specified caches.
        /// </summary>
        /// <param name="cache">The caches to clear.</param>
        public void ClearCache(Caches cache)
        {
            if (cache.HasFlag(Caches.TypeConverterOptions))
            {
                TypeConverterOptionsCache.Clear();
            }

            if (cache.HasFlag(Caches.WriteRecord))
            {
                TypeActions.Clear();
            }
        }
Exemple #7
0
        /// <summary>
        /// Clears the specified caches.
        /// </summary>
        /// <param name="cache">The caches to clear.</param>
        public void ClearCache(Caches cache)
        {
            if ((cache & Caches.TypeConverterOptions) == Caches.TypeConverterOptions)
            {
                TypeConverterOptionsCache.Clear();
            }

            if ((cache & Caches.WriteRecord) == Caches.WriteRecord)
            {
                TypeActions.Clear();
            }
        }