protected string buildTag(string fieldname, string Format) { StringTheory theory = new StringTheory(Format); theory.Replace("*", fieldname); return(theory.ToString()); }
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()); }
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; }
public bool Contains(StringTheory phrase) { return this.Contains(phrase.ToString()); }
public bool BeginsWith(StringTheory phrase) { return this.BeginsWith(phrase.ToString()); }
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(); }
protected string buildTag(string fieldname, string Format) { StringTheory theory = new StringTheory(Format); theory.Replace("*", fieldname); return theory.ToString(); }
public bool Contains(StringTheory phrase) { return(this.Contains(phrase.ToString())); }
public void Prepend(StringTheory str) { this.Paste(0, str.ToString()); }
public void Append(StringTheory val) { this.Append(val.ToString()); }
public string toSql() { StringTheory theory = new StringTheory(this); string phrase = "'"; theory.Replace(phrase, phrase + phrase); theory.SingleQuote(); return theory.ToString(); }
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(); }
public bool BeginsWith(StringTheory phrase) { return(this.BeginsWith(phrase.ToString())); }
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; }