Esempio n. 1
0
        public Com.DigitalAsset.Ledger.Api.V1.Variant ToProtoVariant()
        {
            var variant = new Com.DigitalAsset.Ledger.Api.V1.Variant {
                Constructor = Constructor, Value = Value.ToProto()
            };

            VariantId.IfPresent(identifier => variant.VariantId = identifier.ToProto());
            return(variant);
        }
Esempio n. 2
0
        public static Variant FromProto(Com.DigitalAsset.Ledger.Api.V1.Variant variant)
        {
            Value value = Value.FromProto(variant.Value);

            return(variant.VariantId != null ? new Variant(Identifier.FromProto(variant.VariantId), variant.Constructor, value) : new Variant(variant.Constructor, value));
        }