yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.
Here's an idea of how it could be used in your repository readme.markdown or wiki.
View the RAW source to see how images are made.
private static String FormatXml(string xml) | |
{ | |
String Result = ""; | |
MemoryStream mStream = new MemoryStream(); | |
XmlTextWriter writer = new XmlTextWriter(mStream, Encoding.Unicode); | |
XmlDocument document = new XmlDocument(); | |
try | |
{ |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.Serialization.Json; | |
using System.ServiceModel; | |
using System.ServiceModel.Channels; | |
using System.ServiceModel.Description; | |
using System.ServiceModel.Dispatcher; | |
using System.Text; | |
using System.Threading; |
yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.
Here's an idea of how it could be used in your repository readme.markdown or wiki.
View the RAW source to see how images are made.
using System.Collections.Generic; | |
// ReSharper disable once CheckNamespace | |
namespace System.Diagnostics | |
{ | |
/// <summary> A color console trace listener. </summary> | |
/// <seealso cref="T:System.Diagnostics.ConsoleTraceListener"/> | |
/// <remarks> | |
/// | |
/// |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Linq; | |
using System.Reflection; | |
using FastDeepCloner; | |
namespace CHR.API.Provisioning.ATT.Web.Tests | |
{ | |
[SuppressMessage("ReSharper", "UnusedMember.Global")] |
using System.ComponentModel.DataAnnotations; | |
using System.Xml; | |
namespace CHR.API.Provisioning.ATT.BusinessLogic.DataValidation | |
{ | |
/// <inheritdoc /> | |
/// <summary> | |
/// Data annotation attribute to verify that string is a valid XML | |
/// </summary> | |
public class ValidXml : ValidationAttribute |
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] | |
public class RequiredIfEmptyAttribute : ValidationAttribute, IClientValidatable | |
{ | |
private readonly string[] _dependentProperties; | |
public RequiredIfEmptyAttribute(params string[] dependentPropertieses) | |
{ | |
_dependentProperties = dependentPropertieses; | |
} |
// Usage: | |
// [AttributeUsage("Option1", "Option2", "Option3")] | |
// public string MyTestAttribute { get; set; } | |
// | |
// In view: | |
// @Html.DropDownListFor(x => x.MyTestAttribute) | |
// | |
// Result: | |
// Dropdown list with 3 options. |
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] | |
public class DateComparerAttribute : ValidationAttribute, IClientValidatable | |
{ | |
/// <summary> | |
/// If set will use DateTime.AddDays to specify the Min Valid Date | |
/// </summary> | |
public double MinDateAddDaysFromNow | |
{ | |
get { return _minDateAddDaysFromNow; } | |
set |
/// ASP.NET MVC 3 Credit Card Validator Attribute | |
/// by Ben Cull - 4 November 2010 | |
/// | |
/// With special thanks to: | |
/// Thomas @ Orb of Knowledge - http://orb-of-knowledge.blogspot.com/2009/08/extremely-fast-luhn-function-for-c.html | |
/// For the Extremely fast Luhn algorithm implementation | |
/// | |
/// And Paul Ingles - http://www.codeproject.com/KB/validation/creditcardvalidator.aspx | |
/// For a timeless blog post on credit card validation |