コード例 #1
0
ファイル: DirectoryPath.cs プロジェクト: klod68/kpsf
        /// <summary>
        /// Save CRUD stored procedures in a script.
        /// </summary>
        /// <param name="sprocs"></param>
        /// <param name="path"></param>
        /// <param name="filename"></param>
        public void SaveSProcsToFile(StoreProcedureStream[] sprocs,string path,string filename)
        {
            StringBuilder temp = new StringBuilder();
            foreach (StoreProcedureStream _stream in sprocs)
            {
                temp.Append(_stream.Text);
            }

            SaveToFile(path, filename, temp.ToString());
        }
コード例 #2
0
ファイル: DirectoryPath.cs プロジェクト: klod68/kpsf
 /// <summary>
 /// Save mapping O/R data in a XML file.
 /// </summary>
 /// <param name="sprocs"></param>
 /// <param name="path"></param>
 /// <param name="filename"></param>
 public void SaveMappingsToFile(StoreProcedureStream[] sprocs,string path,string filename)
 {
     //TODO: set header and footer xml doc
     StringBuilder temp = new StringBuilder();
     foreach (StoreProcedureStream _stream in sprocs)
     {
         temp.Append(_stream.Mappings.Text);
     }
     XmlDocumentString mappingsXML = new XmlDocumentString("mappings", temp.ToString());
     SaveToFile(path, filename, mappingsXML.Text);
 }
コード例 #3
0
ファイル: MappingsXMLStream.cs プロジェクト: klod68/kpsf
 /// <summary>
 /// Implementation of the mapping stream using the stored procedures stream.
 /// Use a template method for generate the code by derivated classes.
 /// </summary>
 /// <param name="sprocs"></param>
 public void SetStreamFromProcedures(StoreProcedureStream sprocs)
 {
     _sprocs=sprocs;
         //template method
        GenerateMappingsStream();
 }