private static string DumpObject(SpObject obj, int tab) { string str = ""; if (obj != null) { if (obj.IsTable()) { str = GetTab(tab) + "<table>\n"; foreach (KeyValuePair <object, SpObject> entry in obj.AsTable()) { str += GetTab(tab + 1) + "<key : " + entry.Key + ">\n"; str += DumpObject(entry.Value, tab + 1); } } else if (obj.Value == null) { str = GetTab(tab) + "<null>\n"; } else { str = GetTab(tab) + obj.Value.ToString() + "\n"; } } return(str); }
private bool IsTypeMatch(SpField f, SpObject o) { if (f == null || f.Type == null || o == null) { return(false); } if (f.IsTable && o.IsTable()) { return(true); } else if (f.Type == mTypeManager.String) { if (o.IsString()) { return(true); } } else if (f.Type == mTypeManager.Boolean) { if (o.IsBoolean()) { return(true); } } else if (f.Type == mTypeManager.Integer) { if (o.IsInt() || o.IsLong()) { return(true); } } else if (o.IsTable()) { return(true); } return(false); }
private static string DumpObject (SpObject obj, int tab) { string str = ""; if (obj != null) { if (obj.IsTable ()) { str = GetTab (tab) + "<table>\n"; foreach (KeyValuePair<object, SpObject> entry in obj.AsTable ()) { str += GetTab (tab + 1) + "<key : " + entry.Key + ">\n"; str += DumpObject (entry.Value, tab + 1); } } else if (obj.Value == null) { str = GetTab (tab) + "<null>\n"; } else { str = GetTab (tab) + obj.Value.ToString () + "\n"; } } return str; }
private bool IsTypeMatch (SpField f, SpObject o) { if (f == null || f.Type == null || o == null) return false; if (f.IsTable && o.IsTable ()) { return true; } else if (f.Type == mTypeManager.String) { if (o.IsString ()) return true; } else if (f.Type == mTypeManager.Boolean) { if (o.IsBoolean ()) return true; } else if (f.Type == mTypeManager.Integer) { if (o.IsInt () || o.IsLong ()) return true; } else if (o.IsTable ()) { return true; } return false; }