예제 #1
0
        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);
        }
예제 #2
0
        private void ConvertThroughProto(FiltersByParty source)
        {
            Com.Daml.Ledger.Api.V1.TransactionFilter protoValue = source.ToProto();
            var target = FiltersByParty.FromProto(protoValue);

            Assert.True(source == target);
        }
예제 #3
0
 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)));
 }
예제 #4
0
 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));
 }