Ejemplo n.º 1
0
 public S7Connection(
     S7.S7Connection s7Connection,
     List <Base.Srv.Dto.KeyValuePair <int, string> > automationTypeId,
     List <Base.Srv.Dto.KeyValuePair <int, string> > connectionTypeId,
     List <Base.Srv.Dto.KeyValuePair <int, string> > cpuTypeId
     )
 {
     S7ConnectionDto  = s7Connection;
     AutomationTypeId = new ListKeyValuePair <int, string>(automationTypeId);
     ConnectionTypeId = new ListKeyValuePair <int, string>(connectionTypeId);
     CpuTypeId        = new ListKeyValuePair <int, string>(cpuTypeId);
 }
Ejemplo n.º 2
0
        //public Connection(
        //    //ILogger<Connection> logger,
        //    Guid id,
        //    int automationTypeId,
        //    string name,
        //    string ip,
        //    bool enable,
        //    bool writeEnable
        //)
        ////:base(logger)
        //{
        //    Id = id;
        //    AutomationTypeId = automationTypeId;
        //    Name = name;
        //    Ip = ip;
        //    Enable = enable;
        //    WriteEnable = writeEnable;
        //}

        public Connection(
            //ILogger logger,
            Guid connectionId,
            int automationTypeId,
            string name,
            string ip,
            bool enable,
            bool writeEnable,
            S7.S7Connection connection
            )
        //: base(LogManager.GetCurrentClassLogger())
        {
            Id = connectionId;
            AutomationTypeId = automationTypeId;
            Name             = name;
            Ip          = ip;
            Enable      = enable;
            WriteEnable = writeEnable;
            //S7Connection = connection;
        }