Ejemplo n.º 1
0
 /// <summary>
 ///   Creates an Ifc schema compliant OwnerHistory, Creation Date default to Now, changeAction to ADDED
 /// </summary>
 public IfcOwnerHistory()
 {
     _creationDate = IfcTimeStamp.ToTimeStamp(DateTime.UtcNow);
 }
Ejemplo n.º 2
0
        public static DateTime ToDateTime(IfcTimeStamp timeStamp)
        {
            DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); //from 1970/1/1 00:00:00

            return(dt.AddSeconds(timeStamp));
        }
Ejemplo n.º 3
0
 public virtual void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _owningUser = (IfcPersonAndOrganization) value.EntityVal;
             break;
         case 1:
             _owningApplication = (IfcApplication) value.EntityVal;
             break;
         case 2:
             _state = (IfcStateEnum?) Enum.Parse(typeof (IfcStateEnum), value.EnumVal, true);
             break;
         case 3:
             _changeAction = (IfcChangeActionEnum) Enum.Parse(typeof (IfcChangeActionEnum), value.EnumVal, true);
             break;
         case 4:
             _lastModifiedDate = value.IntegerVal;
             break;
         case 5:
             _lastModifyingUser = (IfcPersonAndOrganization) value.EntityVal;
             break;
         case 6:
             _lastModifyingApplication = (IfcApplication) value.EntityVal;
             break;
         case 7:
             _creationDate = value.IntegerVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Ejemplo n.º 4
0
 public static DateTime ToDateTime(IfcTimeStamp timeStamp)
 {
     DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); //from 1970/1/1 00:00:00
     return (dt.AddSeconds(timeStamp));
 }