Exemple #1
0
        //---------------------------------------------------------------------
        // VirtualDrive

        /// <summary>
        /// Converts a <see cref="GrpcVirtualDrive"/> to a <see cref="VirtualDrive"/>.
        /// </summary>
        /// <param name="grpcVirtualDrive">The input.</param>
        /// <returns>The output.</returns>
        public static VirtualDrive?ToLocal(this GrpcVirtualDrive grpcVirtualDrive)
        {
            if (grpcVirtualDrive == null)
            {
                return(null);
            }

            return(new VirtualDrive()
            {
                Path = grpcVirtualDrive.Path,
                Size = grpcVirtualDrive.Size,
                IsDynamic = grpcVirtualDrive.IsDynamic
            });
        }
Exemple #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="machineName">Specifies the machine name.</param>
 /// <param name="drive">The new drive information.</param>
 public GrpcAddVmDriveRequest(string machineName, GrpcVirtualDrive drive)
 {
     this.MachineName = machineName;
     this.Drive       = drive;
 }