Esempio n. 1
0
        protected string buildTag(string fieldname, string Format)
        {
            StringTheory theory = new StringTheory(Format);

            theory.Replace("*", fieldname);
            return(theory.ToString());
        }
Esempio n. 2
0
        public void StripRange(int start, int count)
        {
            StringTheory theory = new StringTheory(base.Cut(start, count));

            theory.Replace(" ", "");
            theory.Replace("\t", "");
            base.Paste(base.Start(), theory.ToString());
        }
Esempio n. 3
0
 public XmlDocument Describe()
 {
     XmlDocument document = new XmlDocument();
     StringTheory theory = new StringTheory("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
     ArrayList list = new ArrayList();
     theory.Append("<streams>\n");
     this.ListStreams(list);
     foreach (Hashtable hashtable in list)
     {
         theory.Append(this.DescribeStream(hashtable["TABLE_NAME"].ToString()));
     }
     theory.Append("</streams>\n");
     document.LoadXml(theory.ToString());
     return document;
 }
Esempio n. 4
0
 public bool Contains(StringTheory phrase)
 {
     return this.Contains(phrase.ToString());
 }
Esempio n. 5
0
 public bool BeginsWith(StringTheory phrase)
 {
     return this.BeginsWith(phrase.ToString());
 }
Esempio n. 6
0
File: Item.cs Progetto: built/BoxBoy
 public string getXml()
 {
     StringTheory theory = new StringTheory("<%islandName%>%body%</%islandName%>\n");
     StringTheory val = new StringTheory();
     StringTheory theory3 = new StringTheory();
     foreach (string str in this.getFieldNames())
     {
         val.Renew("    <%fieldName%>%fieldValue%</%fieldName%>\n");
         val.Replace("%fieldName%", str.ToLower());
         val.Replace("%fieldValue%", ((Field)this[str]).getValue());
         theory3.Append(val);
     }
     theory.Replace("%islandName%", this.StreamName.ToLower());
     theory.Replace("%body%", theory3);
     return theory.ToString();
 }
Esempio n. 7
0
 protected string buildTag(string fieldname, string Format)
 {
     StringTheory theory = new StringTheory(Format);
     theory.Replace("*", fieldname);
     return theory.ToString();
 }
Esempio n. 8
0
 public void StripRange(int start, int count)
 {
     StringTheory theory = new StringTheory(base.Cut(start, count));
     theory.Replace(" ", "");
     theory.Replace("\t", "");
     base.Paste(base.Start(), theory.ToString());
 }
Esempio n. 9
0
 public bool Contains(StringTheory phrase)
 {
     return(this.Contains(phrase.ToString()));
 }
Esempio n. 10
0
 public void Prepend(StringTheory str)
 {
     this.Paste(0, str.ToString());
 }
Esempio n. 11
0
 public void Append(StringTheory val)
 {
     this.Append(val.ToString());
 }
Esempio n. 12
0
 public string toSql()
 {
     StringTheory theory = new StringTheory(this);
     string phrase = "'";
     theory.Replace(phrase, phrase + phrase);
     theory.SingleQuote();
     return theory.ToString();
 }
Esempio n. 13
0
 public string DescribeStream(string stream)
 {
     StringTheory theory = new StringTheory("<stream name=\"%stream%\">\n%fields%</stream>\n");
     StringTheory theory2 = new StringTheory();
     ArrayList list = new ArrayList();
     this.ListColumns(stream, list);
     theory.Replace("%stream%", stream);
     foreach (Hashtable hashtable in list)
     {
         theory2.Append("<field name=\"%COLUMN_NAME%\" type=\"%DATA_TYPE%\" identity=\"%IDENTITY%\"/>\n");
         theory2.Populate(hashtable, "%*%");
         theory2.Replace("%IDENTITY%", this.IsIdentity(hashtable));
     }
     theory.Replace("%fields%", theory2);
     return theory.ToString();
 }
Esempio n. 14
0
 public void Prepend(StringTheory str)
 {
     this.Paste(0, str.ToString());
 }
Esempio n. 15
0
 public bool BeginsWith(StringTheory phrase)
 {
     return(this.BeginsWith(phrase.ToString()));
 }
Esempio n. 16
0
 public void Append(StringTheory val)
 {
     this.Append(val.ToString());
 }
Esempio n. 17
0
 protected bool IsIdentity(Hashtable fieldInfo)
 {
     bool flag = false;
     StringTheory theory = new StringTheory("SELECT COLUMNPROPERTY( OBJECT_ID('%TABLE_NAME%'),'%COLUMN_NAME%','IsIdentity') AS IS_IDENTITY");
     theory.Populate(fieldInfo, "%*%");
     ArrayList results = new ArrayList();
     this.process(theory.ToString(), results);
     if (results.Count > 0)
     {
         flag = ((Hashtable)results[0])["IS_IDENTITY"].ToString() == "1";
     }
     return flag;
 }