Device.getReactions C# (CSharp) 메소드

getReactions() 공개 메소드

public getReactions ( ) : LinkedList
리턴 LinkedList
    public LinkedList<IReaction> getReactions() {
        Logger.Log ("Device::getReactions(); device="+this, Logger.Level.TRACE);
		
        LinkedList<IReaction> reactions = new LinkedList<IReaction>();	
        LinkedList<PromoterProperties> props = new LinkedList<PromoterProperties>(getPromoterReactions());
        foreach (PromoterProperties promoterProps in props) {
            Logger.Log("Device::getReactions() adding prop "+promoterProps, Logger.Level.TRACE);
            reactions.AddLast(PromoterReaction.buildPromoterFromProps(promoterProps));
        }
		
        Logger.Log("Device::getReactions() with device="+this+" returns "+Logger.ToString<IReaction>(reactions), Logger.Level.INFO);
        return reactions;
    }

Usage Example

예제 #1
0
    //TODO
    private void removeFromReactionEngine(Device device)
    {
        Logger.Log("Equipment::removeFromReactionEngine reactions from device " + device, Logger.Level.INFO);

        LinkedList <IReaction> reactions = device.getReactions();

        //Logger.Log("Equipment::removeFromReactionEngine device implies reactions="+Logger.ToString<IReaction>(reactions), Logger.Level.TRACE);

        //LinkedList<Medium> mediums = _reactionEngine.getMediumList();
        //Medium celliaMedium = ReactionEngine.getMediumFromId(_celliaMediumID, mediums);

        //LinkedList<IReaction> celliaReactions = celliaMedium.getReactions();
        //Logger.Log("Equipment::removeFromReactionEngine initialCelliaReactions="+Logger.ToString<IReaction>(celliaReactions)
        //  , Logger.Level.TRACE);

        foreach (IReaction reaction in reactions)
        {
            //Logger.Log("Equipment::removeFromReactionEngine removing reaction="+reaction, Logger.Level.TRACE);
            _reactionEngine.removeReaction(_celliaMediumID, reaction, false);
        }

        //celliaReactions = celliaMedium.getReactions();
        //Logger.Log("Equipment::removeFromReactionEngine finalCelliaReactions="+Logger.ToString<IReaction>(celliaReactions)
        //  , Logger.Level.TRACE);
    }
All Usage Examples Of Device::getReactions