Пример #1
0
//		public void Save() {
//			if (this.HasChanges) {
//
//				metadata_.SaveState_toFile(
//					filename_
//				);
//
//				haschanges_ = false;
//			}
//		}
        #endregion
        #region public void Build(...);
        public void Build(OGen.Libraries.Generator.Build notifyBase_in)
        {
            string _outputDir = Path.GetDirectoryName(this.filename_);

            if (notifyBase_in != null)
            {
                notifyBase_in("generating...", true);
            }

            MetaFile[] _metafiles = new MetaFile[1];
            _metafiles[0] = new MetaFile(
                this.filename_,
                XS__diagram.DIAGRAM
                );
            new OGenGenerator(
                                #if !NET_1_1
                System.Configuration.ConfigurationManager.AppSettings
                                #else
                System.Configuration.ConfigurationSettings.AppSettings
                                #endif
                ["Templates"],
                _outputDir,
                _metafiles
                ).Build(
                notifyBase_in,
                this.diagram_
                );
            if (notifyBase_in != null)
            {
                notifyBase_in("...finished", true);
            }
        }
Пример #2
0
        //#endregion
//		#region public void Build(...);
        public void Build(
            OGen.Libraries.Generator.Build notifyBase_in,
            params string[] templateTypes_in
            )
        {
            this.Build(
                notifyBase_in,
                null,
                templateTypes_in
                );
        }
Пример #3
0
        public void Build(
            OGen.Libraries.Generator.Build notifyBase_in,
            Statistics statistics_in,
            params string[] templateTypes_in
            )
        {
            #region string _outputDir = ...;
            string _outputDir = this.ParentDirectoryname;
            #endregion
            if (notifyBase_in != null)
            {
                notifyBase_in("generating...", true);
            }

// ToDos: now! need to save MetadataDB to xml file

            MetaFile[] _metafiles = new MetaFile[this.metadata_.MetadataFiles.MetadataFiles.Count];
            for (int i = 0; i < this.metadata_.MetadataFiles.MetadataFiles.Count; i++)
            {
                _metafiles[i] = new MetaFile(
                    Path.Combine(
                        this.Directoryname,
                        this.metadata_.MetadataFiles.MetadataFiles[i].XMLFileName
                        ),
                    this.metadata_.MetadataFiles.MetadataFiles[i].XMLFileType
                    );
            }

            new OGenGenerator(
                                #if !NET_1_1
                System.Configuration.ConfigurationManager.AppSettings
                                #else
                System.Configuration.ConfigurationSettings.AppSettings
                                #endif
                ["Templates"],
                this.metadata_dbconnectionstrings(),
                _outputDir,
                _metafiles
                ).Build(
                notifyBase_in,
                this.metadata_,
                statistics_in,
                templateTypes_in
                );
            if (notifyBase_in != null)
            {
                notifyBase_in("...finished", true);
            }
        }
Пример #4
0
//		#region public void Save(...);
//		public void Save() {
//			if (this.HasChanges) {
//
//				rootmetadata_.ExtendedMetadata.SaveState_toFile(
//					filenameextendedmetadata_
//				);
//				for (int i = 0; i < rootmetadata_.SchemaCollection.Count; i++) {
//					rootmetadata_.SchemaCollection[i].SaveState_toFile(
//						Path.Combine(
//							Path.GetDirectoryName(filenameextendedmetadata_),
//							rootmetadata_.ExtendedMetadata.MetadataIndex[i].XMLFileName
//						)
//					);
//				}
//
//				haschanges_ = false;
//			}
//		}
//		#endregion
//		#region public void Build(...);
        public void Build(OGen.Libraries.Generator.Build notifyBase_in)
        {
            #region string _outputDir = ...;
            string _outputDir = System.IO.Directory.GetParent(
                Path.GetDirectoryName(this.filenameextendedmetadata_)
                ).FullName;
            #endregion
            if (notifyBase_in != null)
            {
                notifyBase_in("generating...", true);
            }

            MetaFile[] _metafiles = new MetaFile[1 + this.rootmetadata_.MetadataFiles.MetadataFiles.Count];
            _metafiles[0] = new MetaFile(
                this.filenameextendedmetadata_,
                XS__metadata.METADATA
                );
            for (int i = 0; i < this.rootmetadata_.MetadataFiles.MetadataFiles.Count; i++)
            {
                _metafiles[1 + i] = new MetaFile(
                    Path.Combine(
                        Path.GetDirectoryName(this.filenameextendedmetadata_),
                        this.rootmetadata_.MetadataFiles.MetadataFiles[i].XMLFileName
                        ),
                    XS__schema.SCHEMA
                    );
            }
            new OGenGenerator(
                                #if !NET_1_1
                System.Configuration.ConfigurationManager.AppSettings
                                #else
                System.Configuration.ConfigurationSettings.AppSettings
                                #endif
                ["Templates"],
                _outputDir,
                _metafiles
                ).Build(
                notifyBase_in,
                this.rootmetadata_
                );
            if (notifyBase_in != null)
            {
                notifyBase_in("...finished", true);
            }
        }