public void FillCollections(ref IActionCollection actionCollection, ref IConsiderationCollection considerationCollection) { foreach (var keyvalue in m_loaders) { var key = keyvalue.Key; var loader = keyvalue.Value; var dicoActions = loader.Actions; foreach (var keyvalueAction in dicoActions) { var keyAction = keyvalueAction.Key; var deleg = keyvalueAction.Value; var id = new InfoId() { NamespaceId = key, NameId = keyAction }; var newAction = new DynamicAction(id, deleg); //actionCollection.Add(newAction); } var dicoConsiderations = loader.Considerations; foreach (var keyvalueConsideration in dicoConsiderations) { var keyConsideration = keyvalueConsideration.Key; var deleg = keyvalueConsideration.Value; var id = new InfoId() { NamespaceId = key, NameId = keyConsideration }; var newConsideration = new DynamicConsideration(id, deleg); //considerationCollection.Add(newConsideration); } } }
public DynamicConsideration(InfoId id, ConsiderationToGet callback) { m_utility = new Utility(0f, 1f); m_id = id; m_callback = callback; }
public IConsideration GetConsideration(string nameContext, string nameConsideration) { var deleg = m_loaders[nameContext].Considerations[nameConsideration]; var id = new InfoId() { NamespaceId = nameContext, NameId = nameConsideration }; return(new DynamicConsideration(id, deleg)); }
public DynamicAction(DynamicAction actionToCopy) { this.m_refActionToExecute = actionToCopy.m_refActionToExecute; this.m_info = actionToCopy.m_info; this.m_id = actionToCopy.m_id; }
public DynamicAction(InfoId id, ActionToExecute action) { m_id = id; m_refActionToExecute = action; }