Exemplo n.º 1
0
        public T AttachActionAbility <T>() where T : ActionAbility
        {
            var action = AttachAbility <T>(null);

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

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

            if (typeActionLookup.TryGetValue(variable.GetType(), out ta))
            {
                return(ta.DescFunc(this));
            }
            return("Null");
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
        /// <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();
            }
        }
Exemplo n.º 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();
            }
        }