Esempio n. 1
0
        public ValidationData Fail(params AppResult[] results)
        {
            Details.AddRange(results);

            IsValid = false;

            return(this);
        }
Esempio n. 2
0
 public BrokerTransactionJson(BrokerTransaction brokerTransaction)
 {
     Id          = brokerTransaction.Id;
     Rev         = brokerTransaction.Rev;
     Symbol      = brokerTransaction.Symbol;
     CreatedDate = brokerTransaction.CreatedDate;
     UpdatedDate = brokerTransaction.UpdatedDate;
     UpdatedBy   = brokerTransaction.UpdatedBy;
     CreatedBy   = brokerTransaction.CreatedBy;
     Details.Clear();
     Details.AddRange(brokerTransaction.Details);
 }
        public void AddDetails(IChainNode node)
        {
            switch (node.Type)
            {
            case ChainType.Conflict when node is Conflict conflict:
                Details.AddRange(conflict.Details);
                break;

            case ChainType.Detail when node is LaboriousDetail detail:
                Details.Add(detail.Number, detail);
                break;

            default: throw new InvalidOperationException();
            }
        }
Esempio n. 4
0
        public WeProductBase(string[] categoryIds, WeProductProperty[] propertys, string name, SkuInfo[] skuInfos,
                             string mainImg, string[] imgs, WeProductDetail[] details)
            : this(name, mainImg)
        {
            TkDebug.AssertArgumentNull(categoryIds, "categoryIds", null);
            TkDebug.AssertArgumentNull(propertys, "propertys", null);
            TkDebug.AssertArgumentNull(skuInfos, "propertys", null);
            TkDebug.AssertArgumentNull(imgs, "img", null);
            TkDebug.AssertArgumentNull(details, "details", null);

            CategoryIds.AddRange(categoryIds);
            Properties.AddRange(propertys);
            SkuInfos.AddRange(skuInfos);
            Imgs.AddRange(imgs);
            Details.AddRange(details);
        }
Esempio n. 5
0
 public void Apply(OrderDetailsAdded added) =>
 Details.AddRange(added.OrderDetails);
Esempio n. 6
0
 public OnlineConflict(IEnumerable <KeyValuePair <int, Detail> > details)
 {
     Details.AddRange(details);
 }
Esempio n. 7
0
 public OnlineConflict(Dictionary <int, Detail> details)
 {
     Details.AddRange(details);
 }