Inheritance: System.Item
Ejemplo n.º 1
0
 public ComponentTypeObject(ComponentType type)
 {
    this.Id = type.Id;
    this.IsActive = type.IsActive;
    this.Name = type.Name;
    this.ConnectorsCount = type.ConnectorsCount;
    this.Project = type.Project;
 }
Ejemplo n.º 2
0
 private Domain.Entity.Construction.Component CreateComponent(ComponentType componentType)
 {
     var component = new Domain.Entity.Construction.Component
     {
         ConstructionStatus = PartConstructionStatus.Pending,
         InspectionStatus = PartInspectionStatus.Pending,
         Certificate = RndString(12),
         Length = rnd.Next(1000),
         Number = RndString(14),
         Type = componentType,
         IsAvailableToJoint = true,
         ToExport = true,
         IsActive = true
     };
     for(int j = 0; j < componentType.ConnectorsCount; j++)
     {
         var con = new Connector
         {
             Component = component,
             Diameter = rnd.Next(1217, 1221),
             WallThickness = rnd.Next(40, 50),
             IsActive = true
         };
         component.Connectors.Add(con);
     }
     return component;
 }