Browse Source

Added comments where missing on public types.

pull/671/head
gumme 10 years ago
parent
commit
786f60ae9b
  1. 17
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/DesignInstanceExtension.cs
  2. 36
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlXmlWriter.cs

17
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/DesignInstanceExtension.cs

@ -7,21 +7,36 @@ using System.Windows.Markup; @@ -7,21 +7,36 @@ using System.Windows.Markup;
namespace ICSharpCode.WpfDesign.XamlDom
{
/// <summary>
/// A class wich Implementes the DesignInstanceExtension normaly defined in the Blend Namespace
/// A class which implements the DesignInstanceExtension normally defined in the Blend Namespace.
/// </summary>
public class DesignInstanceExtension : MarkupExtension
{
/// <summary>
/// Initializes a new instance of the <see cref="DesignInstanceExtension"/> class.
/// </summary>
/// <param name="type">The type to create.</param>
public DesignInstanceExtension(Type type)
{
this.Type = type;
}
/// <summary>
/// Gets or sets the type to create.
/// Use <see cref="IsDesignTimeCreatable"/> to specify whether an instance of your type or a designer-generated substitute type is created.
/// </summary>
public Type Type { get; set; }
/// <summary>
/// Gets or sets if the design instance is created from your type (true) or of a designer-generated substitute type (false).
/// </summary>
public bool IsDesignTimeCreatable { get; set; }
/// <summary>
/// Gets or sets if the design instance is a list of the specified type.
/// </summary>
public bool CreateList { get; set; }
/// <inheritdoc/>
public override object ProvideValue(IServiceProvider serviceProvider)
{
return null;

36
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlXmlWriter.cs

@ -12,12 +12,19 @@ using System.Xml; @@ -12,12 +12,19 @@ using System.Xml;
namespace ICSharpCode.WpfDesign.XamlDom
{
/// <summary>
/// A special XamlXmlWriter wich fixes &amp; and &quot; in MarkupExtensions where not correctly handeled!
/// A special XamlXmlWriter wich fixes &amp; and &quot; in MarkupExtensions where not correctly handled.
/// </summary>
public class XamlXmlWriter : XmlWriter
{
protected XmlWriter xmlWriter;
/// <summary>
/// The <see cref="XmlWriter"/> instance used internally.
/// </summary>
protected readonly XmlWriter xmlWriter;
/// <summary>
/// Initializes a new instance of the <see cref="XamlXmlWriter"/> class.
/// </summary>
/// <param name="stringBuilder">The <see cref="System.Text.StringBuilder"/> to which to write to.</param>
public XamlXmlWriter(System.Text.StringBuilder stringBuilder)
{
this.xmlWriter = XmlWriter.Create(stringBuilder);
@ -25,126 +32,151 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -25,126 +32,151 @@ namespace ICSharpCode.WpfDesign.XamlDom
#region implemented abstract members of XmlWriter
/// <inheritdoc/>
public override void WriteStartDocument()
{
xmlWriter.WriteStartDocument();
}
/// <inheritdoc/>
public override void WriteStartDocument(bool standalone)
{
xmlWriter.WriteStartDocument(standalone);
}
/// <inheritdoc/>
public override void WriteEndDocument()
{
xmlWriter.WriteEndDocument();
}
/// <inheritdoc/>
public override void WriteDocType(string name, string pubid, string sysid, string subset)
{
xmlWriter.WriteDocType(name, pubid, sysid, subset);
}
/// <inheritdoc/>
public override void WriteStartElement(string prefix, string localName, string ns)
{
xmlWriter.WriteStartElement(prefix, localName, ns);
}
/// <inheritdoc/>
public override void WriteEndElement()
{
xmlWriter.WriteEndElement();
}
/// <inheritdoc/>
public override void WriteFullEndElement()
{
xmlWriter.WriteFullEndElement();
}
/// <inheritdoc/>
public override void WriteStartAttribute(string prefix, string localName, string ns)
{
xmlWriter.WriteStartAttribute(prefix, localName, ns);
}
/// <inheritdoc/>
public override void WriteEndAttribute()
{
xmlWriter.WriteEndAttribute();
}
/// <inheritdoc/>
public override void WriteCData(string text)
{
xmlWriter.WriteCData(text);
}
/// <inheritdoc/>
public override void WriteComment(string text)
{
xmlWriter.WriteComment(text);
}
/// <inheritdoc/>
public override void WriteProcessingInstruction(string name, string text)
{
xmlWriter.WriteProcessingInstruction(name, text);
}
/// <inheritdoc/>
public override void WriteEntityRef(string name)
{
xmlWriter.WriteEntityRef(name);
}
/// <inheritdoc/>
public override void WriteCharEntity(char ch)
{
xmlWriter.WriteCharEntity(ch);
}
/// <inheritdoc/>
public override void WriteWhitespace(string ws)
{
xmlWriter.WriteWhitespace(ws);
}
/// <inheritdoc/>
public override void WriteString(string text)
{
xmlWriter.WriteString(text.Replace("&","&amp;").Replace("\"","&quot;"));
}
/// <inheritdoc/>
public override void WriteSurrogateCharEntity(char lowChar, char highChar)
{
xmlWriter.WriteSurrogateCharEntity(lowChar, highChar);
}
/// <inheritdoc/>
public override void WriteChars(char[] buffer, int index, int count)
{
xmlWriter.WriteChars(buffer, index, count);
}
/// <inheritdoc/>
public override void WriteRaw(char[] buffer, int index, int count)
{
xmlWriter.WriteRaw(buffer, index, count);
}
/// <inheritdoc/>
public override void WriteRaw(string data)
{
xmlWriter.WriteRaw(data);
}
/// <inheritdoc/>
public override void WriteBase64(byte[] buffer, int index, int count)
{
xmlWriter.WriteBase64(buffer, index, count);
}
/// <inheritdoc/>
public override void Close()
{
xmlWriter.Close();
}
/// <inheritdoc/>
public override void Flush()
{
xmlWriter.Flush();
}
/// <inheritdoc/>
public override string LookupPrefix(string ns)
{
return xmlWriter.LookupPrefix(ns);
}
/// <inheritdoc/>
public override WriteState WriteState {
get {
return xmlWriter.WriteState;

Loading…
Cancel
Save