コード例 #1
0
 private HeaderSection(FILE_SCHEMA fileSchema, FILE_DESCRIPTION fileDescription, FILE_NAME fileName)
 {
     _fileSchema      = fileSchema;
     _fileDescription = fileDescription;
     _fileName        = fileName;
     _headerSection   = new List <HeaderInstance>()
     {
         _fileDescription, _fileName, _fileSchema
     };
 }
コード例 #2
0
        private HeaderSection(
            string headerDescription, int implementationLevel, int mappingLevel,
            string filename, string author, string organization, string originatingSystem, string authorization,
            string schemaVersion)
        {
            Assembly        assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);

            _fileSchema = new FILE_SCHEMA()
            {
                SCHEMA_IDENTIFIERS = new List <SCHEMA_NAME> {
                    new SCHEMA_NAME {
                        Value = schemaVersion
                    }
                }
            };

            _fileDescription = new FILE_DESCRIPTION()
            {
                DESCRIPTION = new List <STRING>()
                {
                    headerDescription
                },
                IMPLEMTATION_LEVEL = string.Format("{0};{1}", implementationLevel, mappingLevel),
            };


            //var ts = new TIME_STAMP_TEXT { Value = DateTime.Now.ToString("s") };
            _fileName = new FILE_NAME
            {
                AUTHOR = new List <STRING>()
                {
                    author
                },
                AUTHORIZATION = authorization, //SystemService.SystemUser,
                NAME          = filename,
                ORGANIZATION  = new List <STRING>()
                {
                    organization
                },                                        // new List<STRING>() { fvi.CompanyName },
                ORIGINATING_SYSTEM   = originatingSystem, //assembly.GetName().Name,
                PREPROCESSOR_VERSION = string.Format(CultureInfo.InvariantCulture, "{0} {1}", fvi.ProductName, fvi.ProductVersion),
                //TIME_STAMP = ts
            };
            TimeStamp = DateTime.Now;

            _headerSection = new List <HeaderInstance>()
            {
                _fileDescription, _fileName, _fileSchema
            };
            //_headerSection.Clear();
            //_headerSection.Add(_fileSchema);
            //_headerSection.Add(_fileDescription);
            //_headerSection.Add(_fileName);
        }
コード例 #3
0
 public static void SetHeader(FILE_SCHEMA fileSchema, FILE_DESCRIPTION fileDescription, FILE_NAME fileName)
 {
     _instance = new HeaderSection(fileSchema, fileDescription, fileName);
 }
コード例 #4
0
ファイル: HeaderSection.cs プロジェクト: JackTing/ifctoolkit
 public static void SetHeader(FILE_SCHEMA fileSchema, FILE_DESCRIPTION fileDescription, FILE_NAME fileName)
 {
     _instance = new HeaderSection(fileSchema, fileDescription, fileName);
 }
コード例 #5
0
ファイル: HeaderSection.cs プロジェクト: JackTing/ifctoolkit
 private HeaderSection(FILE_SCHEMA fileSchema, FILE_DESCRIPTION fileDescription, FILE_NAME fileName)
 {
     _fileSchema = fileSchema;
     _fileDescription = fileDescription;
     _fileName = fileName;
     _headerSection = new List<HeaderInstance>() { _fileDescription, _fileName, _fileSchema };
 }
コード例 #6
0
ファイル: HeaderSection.cs プロジェクト: JackTing/ifctoolkit
        private HeaderSection(
            string headerDescription, int implementationLevel, int mappingLevel,
            string filename, string author, string organization, string originatingSystem, string authorization,
            string schemaVersion)
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);

            _fileSchema = new FILE_SCHEMA()
            {
                SCHEMA_IDENTIFIERS = new List<SCHEMA_NAME> { new SCHEMA_NAME { Value = schemaVersion } }
            };

            _fileDescription = new FILE_DESCRIPTION()
            {
                DESCRIPTION = new List<STRING>() { headerDescription },
                IMPLEMTATION_LEVEL = string.Format("{0};{1}", implementationLevel, mappingLevel),
            };

            //var ts = new TIME_STAMP_TEXT { Value = DateTime.Now.ToString("s") };
            _fileName = new FILE_NAME
            {
                AUTHOR = new List<STRING>() { author },
                AUTHORIZATION = authorization, //SystemService.SystemUser,
                NAME = filename,
                ORGANIZATION = new List<STRING>() { organization }, // new List<STRING>() { fvi.CompanyName },
                ORIGINATING_SYSTEM = originatingSystem, //assembly.GetName().Name,
                PREPROCESSOR_VERSION = string.Format(CultureInfo.InvariantCulture, "{0} {1}", fvi.ProductName, fvi.ProductVersion),
                //TIME_STAMP = ts
            };
            TimeStamp = DateTime.Now;

            _headerSection = new List<HeaderInstance>() { _fileDescription, _fileName, _fileSchema };
            //_headerSection.Clear();
            //_headerSection.Add(_fileSchema);
            //_headerSection.Add(_fileDescription);
            //_headerSection.Add(_fileName);
        }