- [DataContract]
- public class OrderSyncData : ISync
- {
- public OrderSyncData(Order o)
- {
- this.CurrentOrderStatus = o.DriverStatus;
- this.StatusDescription = o.StatusDescription;
- SyncTimestamp = o.SyncTimestamp; ????
- }
- [DataMember]
- public string CurrentOrderStatus { get; set; }
- [DataMember]
- public string StatusDescription { get; set; }
- [DataMember]// I don't think I need these any more
- public bool IsCanceled { get; set; }
- [DataMember]
- public bool IsResolved { get; set; }
- [DataMember]
- public bool IsPendingResponse { get; set; }
- DateTime ISync.SyncTimestamp { get; set; }
- }
如何设置ISync.SyncTimestamp的值?我试着施放“这个”.但它不起作用
解决方法
这应该工作:
- ((ISync)this).SyncTimestamp = o.SyncTimestamp;
注意额外的括号(ISync).