public EthereumTransaction Clone() { var resTx = new EthereumTransaction() { Currency = this.Currency, Id = this.Id, Type = this.Type, State = this.State, CreationTime = this.CreationTime, From = this.From, To = this.To, Input = this.Input, Amount = this.Amount, Nonce = this.Nonce, GasPrice = this.GasPrice, GasLimit = this.GasLimit, GasUsed = this.GasUsed, ReceiptStatus = this.ReceiptStatus, IsInternal = this.IsInternal, InternalIndex = this.InternalIndex, InternalTxs = new List <EthereumTransaction>(), BlockInfo = (BlockInfo)(this.BlockInfo?.Clone() ?? null) }; if (this.InternalTxs != null) { foreach (var intTx in this.InternalTxs) { resTx.InternalTxs.Add(intTx.Clone()); } } return(resTx); }
public EthereumTransaction Clone() { var resTx = new EthereumTransaction() { Currency = Currency, Id = Id, Type = Type, State = State, CreationTime = CreationTime, From = From, To = To, Input = Input, Amount = Amount, Nonce = Nonce, GasPrice = GasPrice, GasLimit = GasLimit, GasUsed = GasUsed, ReceiptStatus = ReceiptStatus, IsInternal = IsInternal, InternalIndex = InternalIndex, InternalTxs = new List <EthereumTransaction>(), BlockInfo = (BlockInfo)(BlockInfo?.Clone() ?? null) }; if (InternalTxs != null) { foreach (var intTx in InternalTxs) { resTx.InternalTxs.Add(intTx.Clone()); } } return(resTx); }