Beispiel #1
0
 public void AddRoutingInstance(RoutingInstance routingInstance)
 {
     if (this.RoutingInstances.Contains(routingInstance))
     {
         throw new SigmaDomainException($"Routing instance '{routingInstance.Name}' already exists for device '{this.Name}'.");
     }
     this._routingInstances.Add(routingInstance);
 }
Beispiel #2
0
 public Uni(Device device, List <Port> ports, RoutingInstance routingInstance = null, int?tenantId = null)
 {
     this.Name            = Guid.NewGuid().ToString("N");
     this._device         = device ?? throw new ArgumentNullException(nameof(device));
     this._ports          = ports ?? throw new ArgumentNullException(nameof(ports));
     this.RoutingInstance = routingInstance;
     this._tenantId       = tenantId;
 }
Beispiel #3
0
        protected Device()
        {
            _ports            = new List <Port>();
            _routingInstances = new List <RoutingInstance>();

            var defaultRoutingInstance = new RoutingInstance(this, RoutingInstanceType.Default, "Default");

            this.AddRoutingInstance(defaultRoutingInstance);
        }