Exemple #1
0
        //---------------------------------------------------------------------
        // VirtualNat

        /// <summary>
        /// Converts a <see cref="GrpcVirtualNat"/> tp a <see cref="VirtualNat"/>.
        /// </summary>
        /// <param name="grpcVirtualNat">The input.</param>
        /// <returns>The output.</returns>
        public static VirtualNat?ToLocal(this GrpcVirtualNat grpcVirtualNat)
        {
            if (grpcVirtualNat == null)
            {
                return(null);
            }

            return(new VirtualNat()
            {
                Name = grpcVirtualNat.Name,
                Subnet = grpcVirtualNat.Subnet
            });
        }
Exemple #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="nat">The NAT details.</param>
 public GrpcGetNatReply(GrpcVirtualNat nat)
 {
     this.Nat = nat;
 }