コード例 #1
0
 public void RemoveDetail(SalesOrderDetail detailToRemove)
 {
     if (Details.Contains(detailToRemove))
     {
         Details.Remove(detailToRemove);
     }
 }
コード例 #2
0
 public void RemoveDetails(IEnumerable <SalesOrderDetail> detailsToRemove)
 {
     foreach (SalesOrderDetail salesOrderDetail in detailsToRemove)
     {
         if (Details.Contains(salesOrderDetail))
         {
             Details.Remove(salesOrderDetail);
         }
     }
 }
コード例 #3
0
 public void RemoveDetails([ContributedAction] IEnumerable <SalesOrderDetail> details)
 {
     foreach (SalesOrderDetail detail in details)
     {
         if (Details.Contains(detail))
         {
             Details.Remove(detail);
         }
     }
 }
コード例 #4
0
        public void AddGraph(SingleCompromiseGraphData graphData)
        {
            if (!ImpactedGraph.ContainsKey(graphData.Name))
            {
                var detail = new CompromiseGraphRuleDetail();
                detail.Details = new List <string>();
                ImpactedGraph.Add(graphData.Name, detail);
            }
            string ruleDetail = String.Format("{1} ({0})", graphData.Name, graphData.Description);

            if (!Details.Contains(ruleDetail))
            {
                Details.Add(ruleDetail);
            }
        }
コード例 #5
0
        public void addDetail(Detail param)
        {
            if (Details.Contains(param))
            {
                throw new Exception("Media.addDetail: Detail bereits in Media enthalten.");
            }

            if (param.isRepeat && hasRepeat)
            {
                throw new Exception("Media.addDetail: Media enthält bereits ein Wiederholungs-Detail.");
            }

            hasRepeat = param.isRepeat;
            Details.Add(param);
            Details.Sort();
        }