public override Com.Daml.Ledger.Api.V1.TransactionFilter ToProto() { var filter = new Com.Daml.Ledger.Api.V1.TransactionFilter(); filter.FiltersByParty.Add(PartyToFilters.Select(p => (p.Key, p.Value.ToProto())).ToDictionary(p => p.Item1, p => p.Item2)); return(filter); }
private void ConvertThroughProto(FiltersByParty source) { Com.Daml.Ledger.Api.V1.TransactionFilter protoValue = source.ToProto(); var target = FiltersByParty.FromProto(protoValue); Assert.True(source == target); }
public new static FiltersByParty FromProto(Com.Daml.Ledger.Api.V1.TransactionFilter transactionFilter) { return(new FiltersByParty(transactionFilter.FiltersByParty.Select(p => (p.Key, Filter.FromProto(p.Value))).ToDictionary(p => p.Item1, p => p.Item2))); }
public static TransactionFilter FromProto(Com.Daml.Ledger.Api.V1.TransactionFilter transactionFilter) { // at the moment, the only transaction filter supported is FiltersByParty return(FiltersByParty.FromProto(transactionFilter)); }