예제 #1
0
 public override bool Equals(TreeEvent obj) => this.Compare(obj, rhs => _hashCode == rhs._hashCode &&
                                                            EventId == rhs.EventId &&
                                                            TemplateId == rhs.TemplateId &&
                                                            ContractId == rhs.ContractId &&
                                                            Arguments == rhs.Arguments &&
                                                            AgreementText == rhs.AgreementText &&
                                                            ContractKey == rhs.ContractKey &&
                                                            !WitnessParties.Except(rhs.WitnessParties).Any() &&
                                                            !Signatories.Except(rhs.Signatories).Any() &&
                                                            !Observers.Except(rhs.Observers).Any());
예제 #2
0
 public override bool Equals(TreeEvent obj) => this.Compare(obj, rhs => _hashCode == rhs._hashCode &&
                                                            Consuming == rhs.Consuming &&
                                                            EventId == rhs.EventId &&
                                                            TemplateId == rhs.TemplateId &&
                                                            ContractId == rhs.ContractId &&
                                                            Choice == rhs.Choice &&
                                                            ChoiceArgument == rhs.ChoiceArgument &&
                                                            ExerciseResult == rhs.ExerciseResult &&
                                                            !WitnessParties.Except(rhs.WitnessParties).Any() &&
                                                            !ActingParties.Except(rhs.ActingParties).Any());
예제 #3
0
        public static TransactionTree FromProto(Com.DigitalAsset.Ledger.Api.V1.TransactionTree tree)
        {
            var eventsById = tree.EventsById.Values.Select(e => (e.Created?.EventId ?? e.Exercised?.EventId, TreeEvent.FromProtoTreeEvent(e))).ToDictionary(p => p.Item1, p => p.Item2);

            return(new TransactionTree(tree.TransactionId, tree.CommandId, tree.WorkflowId, tree.EffectiveAt.ToDateTimeOffset(), eventsById, tree.RootEventIds.ToList(), tree.Offset));
        }