상속: BaseActionDefinition
예제 #1
0
        public Guid AddOrUpdateExchange(SocialExchangeDTO dto)
        {
            var idx = m_SocialExchanges.FindIndex(x => x.Id == dto.Id);

            System.Guid actualID = new Guid();
            if (idx < 0)
            {
                var se = new SocialExchange(dto);
                m_SocialExchanges.Add(se);
                actualID = se.Id;
            }
            else
            {
                m_SocialExchanges[idx].StartingConditions = new ConditionSet(dto.StartingConditions);

                m_SocialExchanges[idx].Description    = dto.Description;
                m_SocialExchanges[idx].Target         = dto.Target;
                m_SocialExchanges[idx].Name           = dto.Name;
                m_SocialExchanges[idx].Steps          = dto.Steps;
                m_SocialExchanges[idx].InfluenceRules = dto.InfluenceRules.Select(x => new InfluenceRule(x)).ToList();
                actualID = m_SocialExchanges[idx].Id;
            }

            return(actualID);
        }
 public SocialExchange(SocialExchange other)
     : base(other)
 {
     Intent = other.Intent;
     Instantiation = other.Instantiation;
 }