protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state) { Func <Int32, List <SalesOrderDetail> > asyncWork = orderId => RetrieveOrderDetail(orderId); context.UserState = asyncWork; return(asyncWork.BeginInvoke(SalesOrderId.Get(context), callback, state)); }
protected override void Execute(CodeActivityContext context) { String operation = "record new sale"; Console.WriteLine("Order Id {0}: Notifying external system to {1}", SalesOrderId.Get(context), operation); foreach (SalesOrderDetail detail in OrderDetail.Get(context)) { Console.WriteLine("Product {0}: {1}", detail.ProductID, operation); } }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (SalesOrderId == default(int) ? 0 : SalesOrderId.GetHashCode()); hash = hash * 23 + (SalesReasonId == default(int) ? 0 : SalesReasonId.GetHashCode()); return(hash); } }
public bool Equals(SalesOrderId other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.Value == Value); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (CarrierTrackingNumber == null ? 0 : CarrierTrackingNumber.GetHashCode()); hash = hash * 23 + (LineTotal == default(decimal) ? 0 : LineTotal.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (OrderQty == default(short) ? 0 : OrderQty.GetHashCode()); hash = hash * 23 + (ProductId == default(int) ? 0 : ProductId.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); hash = hash * 23 + (SalesOrderId == default(int) ? 0 : SalesOrderId.GetHashCode()); hash = hash * 23 + (SpecialOfferId == default(int) ? 0 : SpecialOfferId.GetHashCode()); hash = hash * 23 + (UnitPrice == default(decimal) ? 0 : UnitPrice.GetHashCode()); hash = hash * 23 + (UnitPriceDiscount == default(decimal) ? 0 : UnitPriceDiscount.GetHashCode()); return(hash); } }
public MultipleCurrenciesNotSupported(SalesOrderId salesOrder, Currency unsupportedCurrency) { SalesOrder = salesOrder; UnsupportedCurrency = unsupportedCurrency; }
public SalesOrderCreated(SalesOrderId id) { Id = id; }
public SalesOrderWarehouseChanged(SalesOrderId salesOrder) { }
public bool Equals(SalesOrderId other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.Value == Value; }