public T AttachActionAbility <T>() where T : ActionAbility { var action = AttachAbility <T>(null); TypeActions.Add(typeof(T), action); return(action); }
public void SetOp(SetOperator setOperator) { TypeActions ta = null; if (typeActionLookup.TryGetValue(variable.GetType(), out ta)) { ta.SetFunc(this, setOperator); } }
public string GetDataDescription() { TypeActions ta = null; if (typeActionLookup.TryGetValue(variable.GetType(), out ta)) { return(ta.DescFunc(this)); } return("Null"); }
public void AddNewPairTypeAvailableActions(string type, ICollection <string> availableActions) { TypeActions newTypeActions = new TypeActions { Type = type, AvailableActions = availableActions }; _context.db.GetCollection <TypeActions>(_typesActionsCollName).InsertOne(newTypeActions); }
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(); } }
/// <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(); } }