Exemple #1
0
        public string WriteObjectConstructor()
        {
            var           fields     = string.Join(",", Fields.Select(field => field.WriteConstructor()));
            List <string> parameters = new List <string>()
            {
                Name.WrapInQuotes(),
                          Unique.ToBoolString(),
                $"IdfObjectFormat.{Format}",
                          Obsolete.ToBoolString(),
                          MinNumberOfFields == null ? "null" : MinNumberOfFields.Value.ToString(),
                          Required.ToBoolString(),
                $"new List<IdfField> {{{fields}}}",
                          Extensible.ToBoolString(),
                          TotalNumberOfDefinedFields.ToString()
            };

            return($"new IdfObject({string.Join(",", parameters)} )");
        }