Beispiel #1
0
        internal StepHeaderSectionSyntax GetHeaderSyntax()
        {
            var macros = new List <StepHeaderMacroSyntax>()
            {
                new StepHeaderMacroSyntax(
                    FileDescriptionText,
                    new StepSyntaxList(
                        new StepSyntaxList(StepWriter.SplitStringIntoParts(Description).Select(s => new StepStringSyntax(s))),
                        new StepStringSyntax(ImplementationLevel))),
                new StepHeaderMacroSyntax(
                    FileNameText,
                    new StepSyntaxList(
                        new StepStringSyntax(Name),
                        new StepStringSyntax(Timestamp.ToString("O")),
                        new StepSyntaxList(StepWriter.SplitStringIntoParts(Author).Select(s => new StepStringSyntax(s))),
                        new StepSyntaxList(StepWriter.SplitStringIntoParts(Organization).Select(s => new StepStringSyntax(s))),
                        new StepStringSyntax(PreprocessorVersion),
                        new StepStringSyntax(OriginatingSystem),
                        new StepStringSyntax(Authorization))),
                new StepHeaderMacroSyntax(
                    FileSchemaText,
                    new StepSyntaxList(
                        new StepSyntaxList(
                            Schemas
                            .Select(s => s.ToSchemaName())
                            .Concat(UnsupportedSchemas)
                            .Select(s => new StepStringSyntax(s)))))
            };

            return(new StepHeaderSectionSyntax(-1, -1, macros));
        }
Beispiel #2
0
        public string GetContentsAsString(bool inlineReferences = false)
        {
            var writer = new StepWriter(this, inlineReferences);

            return(writer.GetContents());
        }