public void WriteXml(XmlWriter writer) { //Write start of main elemenst writer.WriteStartElement("portalAlias"); //write out properties writer.WriteElementString("portalID", PortalID.ToString()); writer.WriteElementString("portalAliasID", PortalAliasID.ToString()); writer.WriteElementString("HTTPAlias", HTTPAlias); writer.WriteElementString("skin", Skin); writer.WriteElementString("cultureCode", CultureCode); writer.WriteElementString("browserType", BrowserType.ToString().ToLowerInvariant()); writer.WriteElementString("primary", IsPrimary.ToString().ToLowerInvariant()); //Write end of main element writer.WriteEndElement(); }
private string LoadJson() { StringBuilder sb = new StringBuilder(); sb.Append("\"IsPrimary\":" + IsPrimary.ToString().ToLower() + ""); sb.Append(",\"IsAssociation\":" + IsAssociation.ToString().ToLower() + ""); Type eType = DataType.GetEntityType(); sb.Append(",\"Association\":{" + ((IsAssociation && eType != null) ? ( "\"FullName\":\"" + eType.FullName + "\"" + ",\"Type\":\"" + eType.Name + "\"" + ",\"Namespace\":\"" + eType.Namespace + "\"" ) : string.Empty) + "}"); sb.Append(",\"IsRequired\":" + IsRequired.ToString().ToLower() + ""); sb.Append(",\"IsSortable\":" + IsSortable.ToString().ToLower() + ""); sb.Append("," + base.Json); return(sb.ToString()); }
/// <summary> /// Gets the string that represents the instance of this <see cref="DbField"/> object. /// </summary> /// <returns>The string that represents the instance of this <see cref="DbField"/> object.</returns> public override string ToString() { return(string.Concat(Name, ", ", IsPrimary.ToString(), " (", m_hashCode, ")")); }
/// <summary> /// Gets the string that represents the instance of this <see cref="DbField"/> object. /// </summary> /// <returns>The string that represents the instance of this <see cref="DbField"/> object.</returns> public override string ToString() => string.Concat(Name, ", ", IsPrimary.ToString(), " (", hashCode, ")");