protected override void Render(HtmlTextWriter output) { ParseParameters(this.Source); var appDomain = AppDomain.CurrentDomain; var basePath = appDomain.BaseDirectory; var path = Path.Combine(basePath, ASSETS_FOLDER_NAME, "template.html"); var html = System.IO.File.ReadAllText(path) .Replace("{CONTROL_ID}", ID) .Replace("{FROM}", From.ToString()) .Replace("{TO}", To.ToString()) .Replace("{VALUE}", Value) .Replace("{IS_DEBUG}", IsDebug.ToString().ToLower()); output.Write(html); }
/// <include file='doc\FileVersionInfo.uex' path='docs/doc[@for="FileVersionInfo.ToString"]/*' /> /// <devdoc> /// <para>Returns a partial list of properties in System.Windows.Forms.FileVersionInfo /// and their values.</para> /// </devdoc> public override string ToString() { StringBuilder sb = new StringBuilder(128); String nl = "\r\n"; sb.Append("File: "); sb.Append(FileName); sb.Append(nl); sb.Append("InternalName: "); sb.Append(InternalName); sb.Append(nl); sb.Append("OriginalFilename: "); sb.Append(OriginalFilename); sb.Append(nl); sb.Append("FileVersion: "); sb.Append(FileVersion); sb.Append(nl); sb.Append("FileDescription: "); sb.Append(FileDescription); sb.Append(nl); sb.Append("Product: "); sb.Append(ProductName); sb.Append(nl); sb.Append("ProductVersion: "); sb.Append(ProductVersion); sb.Append(nl); sb.Append("Debug: "); sb.Append(IsDebug.ToString()); sb.Append(nl); sb.Append("Patched: "); sb.Append(IsPatched.ToString()); sb.Append(nl); sb.Append("PreRelease: "); sb.Append(IsPreRelease.ToString()); sb.Append(nl); sb.Append("PrivateBuild: "); sb.Append(IsPrivateBuild.ToString()); sb.Append(nl); sb.Append("SpecialBuild: "); sb.Append(IsSpecialBuild.ToString()); sb.Append(nl); sb.Append("Language "); sb.Append(Language); sb.Append(nl); return(sb.ToString()); }
/// <summary> /// Returns a partial list of properties in <see cref="FileVersionInfo" /> /// and their values. /// </summary> public override string ToString() { // An initial capacity of 512 was chosen because it is large enough to cover // the size of the static strings with enough capacity left over to cover // average length property values. var sb = new StringBuilder(512); sb.Append("File: ").AppendLine(FileName); sb.Append("InternalName: ").AppendLine(InternalName); sb.Append("OriginalFilename: ").AppendLine(OriginalFilename); sb.Append("FileVersion: ").AppendLine(FileVersion); sb.Append("FileDescription: ").AppendLine(FileDescription); sb.Append("Product: ").AppendLine(ProductName); sb.Append("ProductVersion: ").AppendLine(ProductVersion); sb.Append("Debug: ").AppendLine(IsDebug.ToString()); sb.Append("Patched: ").AppendLine(IsPatched.ToString()); sb.Append("PreRelease: ").AppendLine(IsPreRelease.ToString()); sb.Append("PrivateBuild: ").AppendLine(IsPrivateBuild.ToString()); sb.Append("SpecialBuild: ").AppendLine(IsSpecialBuild.ToString()); sb.Append("Language: ").AppendLine(Language); return(sb.ToString()); }