/// <summary>
        ///   Creates and Instance of TIfcType and initializes the properties in accordance with the lambda expression
        ///   i.e. Person person = CreateInstance&gt;Person&lt;(p =&lt; { p.FamilyName = "Undefined"; p.GivenName = "Joe"; });
        /// </summary>
        /// <typeparam name = "TIfcType"></typeparam>
        /// <param name = "initPropertiesFunc"></param>
        /// <returns></returns>
        public TIfcType New <TIfcType>(InitProperties <TIfcType> initPropertiesFunc) where TIfcType : IPersistIfcEntity, new()
        {
            TIfcType instance = New <TIfcType>();

            initPropertiesFunc(instance);
            return(instance);
        }
Exemple #2
0
 public T New <T>(InitProperties <T> initPropertiesFunc) where T : IPersistIfcEntity, new()
 {
     return(_model.InstancesLocal.New <T>(initPropertiesFunc));
 }