コード例 #1
0
        /* ----------------------------------------------------------------- */
        ///
        /// Copy
        ///
        /// <summary>
        /// Copies resources from the specified directory.
        /// </summary>
        ///
        /// <param name="src">Port monitor object.</param>
        /// <param name="from">Resource directory.</param>
        /// <param name="io">I/O handler.</param>
        ///
        /* ----------------------------------------------------------------- */
        public static void Copy(this PortMonitor src, string from, IO io)
        {
            var to = src.TargetDirectory;

            io.Copy(src.FileName, from, to);
            io.Copy(src.Config, from, to);
        }
コード例 #2
0
ファイル: Installer.cs プロジェクト: hisa-lab/Cube.Pdf
 /* ----------------------------------------------------------------- */
 ///
 /// ResolveDependencies
 ///
 /// <summary>
 /// Resolves dependencies of the specified configuration.
 /// </summary>
 ///
 /* ----------------------------------------------------------------- */
 private void ResolveDependencies(DeviceConfig dest) =>
 new DeviceConfigResolver(
     dest,
     Printer.GetElements(),
     PrinterDriver.GetElements(),
     PortMonitor.GetElements()
     ).Invoke();
コード例 #3
0
 /* ----------------------------------------------------------------- */
 ///
 /// Convert
 ///
 /// <summary>
 /// Creates a collection of port monitors from the specified
 /// configuration.
 /// </summary>
 ///
 /// <param name="src">Port monitor configuration.</param>
 ///
 /// <returns>Collection of port monitors.</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static IEnumerable <PortMonitor> Convert(this IEnumerable <PortMonitorConfig> src) =>
 src.Convert(PortMonitor.GetElements());