Add() public method

public Add ( Printer printer, bool verbose = false ) : void
printer Printer
verbose bool
return void
Exemplo n.º 1
0
        public void Add(PrintManagerBridge instance, bool verbose = false)
        {
            Log.Entry("Printer", "Adding: " + Name);
            if (IP != null)
            {
                Log.Debug(LogName, $"--> IP = {IP}");
            }
            if (Port != null)
            {
                Log.Debug(LogName, $"--> Port = {Port}");
            }
            if (File != null)
            {
                Log.Debug(LogName, $"--> File = {File}");
            }
            if (ConfigFile != null)
            {
                Log.Debug(LogName, $"--> Config = {ConfigFile}");
            }
            if (Model != null)
            {
                Log.Debug(LogName, $"--> Model = {Model}");
            }

            try
            {
                instance.Add(this, verbose);
            }
            catch (Exception ex)
            {
                Log.Error(LogName, "Could not add");
                Log.Error(LogName, ex);
            }
        }
Exemplo n.º 2
0
        public void Add(PrintManagerBridge instance, bool verbose = false)
        {
            Log.Entry("Printer", "Adding: " + Name);
            if (IP != null)
                Log.Entry(LogName, $"--> IP = {IP}");
            if (Port != null)
                Log.Entry(LogName, $"--> Port = {Port}");
            if (File != null)
                Log.Entry(LogName, $"--> File = {File}");
            if (ConfigFile != null)
                Log.Entry(LogName, $"--> Config = {ConfigFile}");
            if (Model != null)
                Log.Entry(LogName, $"--> Model = {Model}");

            try
            {
                instance.Add(this, verbose);
            }
            catch (Exception ex)
            {
                Log.Error(LogName, "Could not add");
                Log.Error(LogName, ex);
            }
        }