Browse Source

Replaced pragmas for warning 1591 with either <inheritdoc/> or proper documentation.

pull/660/head
gumme 10 years ago
parent
commit
096ecc18e1
  1. 11
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/TemplateHelper.cs
  2. 20
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObjectServiceProvider.cs
  3. 3
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DummyValueInsteadOfNullTypeDescriptionProvider.cs
  4. 3
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/SelectionExtensionServer.cs
  5. 30
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/UIExtensions/UIHelpers.cs

11
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/TemplateHelper.cs

@ -31,9 +31,17 @@ using System.Xml.XPath; @@ -31,9 +31,17 @@ using System.Xml.XPath;
namespace ICSharpCode.WpfDesign.XamlDom
{
#pragma warning disable 1591 // Primary internal use, disable Warning CS1591: Missing XML comment for publicly visible type or member
/// <summary>
/// Contains template related helper methods.
/// </summary>
public static class TemplateHelper
{
/// <summary>
/// Gets a <see cref="FrameworkTemplate"/> based on the specified parameters.
/// </summary>
/// <param name="xmlElement">The xml element to get template xaml from.</param>
/// <param name="parentObject">The <see cref="XamlObject"/> to use as source for resources and contextual information.</param>
/// <returns>A <see cref="FrameworkTemplate"/> based on the specified parameters.</returns>
public static FrameworkTemplate GetFrameworkTemplate(XmlElement xmlElement, XamlObject parentObject)
{
@ -136,5 +144,4 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -136,5 +144,4 @@ namespace ICSharpCode.WpfDesign.XamlDom
return stream;
}
}
#pragma warning restore 1591
}

20
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObjectServiceProvider.cs

@ -125,10 +125,9 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -125,10 +125,9 @@ namespace ICSharpCode.WpfDesign.XamlDom
#endregion
#pragma warning disable 1591 // Implemented interfaces, disable Warning CS1591: Missing XML comment for publicly visible type or member
#region IUriContext implementation
/// <inheritdoc/>
public virtual Uri BaseUri {
get {
return new Uri("pack://application:,,,/");
@ -153,6 +152,7 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -153,6 +152,7 @@ namespace ICSharpCode.WpfDesign.XamlDom
// }
//}
/// <inheritdoc/>
public XamlSchemaContext SchemaContext
{
get
@ -165,16 +165,19 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -165,16 +165,19 @@ namespace ICSharpCode.WpfDesign.XamlDom
#region IAmbientProvider Members
/// <inheritdoc/>
public AmbientPropertyValue GetFirstAmbientValue(IEnumerable<XamlType> ceilingTypes, params XamlMember[] properties)
{
return GetAllAmbientValues(ceilingTypes, properties).FirstOrDefault();
}
/// <inheritdoc/>
public object GetFirstAmbientValue(params XamlType[] types)
{
return null;
}
/// <inheritdoc/>
public IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, params XamlMember[] properties)
{
var obj = this.XamlObject.ParentObject;
@ -196,11 +199,13 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -196,11 +199,13 @@ namespace ICSharpCode.WpfDesign.XamlDom
}
}
/// <inheritdoc/>
public IEnumerable<object> GetAllAmbientValues(params XamlType[] types)
{
return new List<object>();
}
/// <inheritdoc/>
public IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, bool searchLiveStackOnly, IEnumerable<XamlType> types, params XamlMember[] properties)
{
return new List<AmbientPropertyValue>();
@ -210,6 +215,7 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -210,6 +215,7 @@ namespace ICSharpCode.WpfDesign.XamlDom
#region IXamlNameResolver
/// <inheritdoc/>
public object Resolve(string name)
{
INameScope ns = null;
@ -230,6 +236,7 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -230,6 +236,7 @@ namespace ICSharpCode.WpfDesign.XamlDom
return null;
}
/// <inheritdoc/>
public object Resolve(string name, out bool isFullyInitialized)
{
var ret = Resolve(name);
@ -237,32 +244,35 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -237,32 +244,35 @@ namespace ICSharpCode.WpfDesign.XamlDom
return ret;
}
/// <inheritdoc/>
public object GetFixupToken(IEnumerable<string> names)
{
return null;
}
/// <inheritdoc/>
public object GetFixupToken(IEnumerable<string> names, bool canAssignDirectly)
{
return null;
}
/// <inheritdoc/>
public IEnumerable<KeyValuePair<string, object>> GetAllNamesAndValuesInScope()
{
return null;
}
/// <inheritdoc/>
public bool IsFixupTokenAvailable
{
get { return false; }
}
#pragma warning disable 0067 // Required by interface implementation, disable Warning CS0067: The event is never used
/// <inheritdoc/>
public event EventHandler OnNameScopeInitializationComplete;
#pragma warning restore 0067
#endregion
#pragma warning restore 1591
}
}

3
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DummyValueInsteadOfNullTypeDescriptionProvider.cs

@ -46,12 +46,11 @@ namespace ICSharpCode.WpfDesign @@ -46,12 +46,11 @@ namespace ICSharpCode.WpfDesign
this._dummyValue = dummyValue;
}
#pragma warning disable 1591 // Override, disable Warning CS1591: Missing XML comment for publicly visible type or member
/// <inheritdoc/>
public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
{
return new ShadowTypeDescriptor(this, base.GetTypeDescriptor(objectType, instance));
}
#pragma warning restore 1591
sealed class ShadowTypeDescriptor : CustomTypeDescriptor
{

3
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/SelectionExtensionServer.cs

@ -121,12 +121,11 @@ namespace ICSharpCode.WpfDesign.Extensions @@ -121,12 +121,11 @@ namespace ICSharpCode.WpfDesign.Extensions
ReapplyExtensions(this.Services.Selection.SelectedItems);
}
#pragma warning disable 1591 // Override, disable Warning CS1591: Missing XML comment for publicly visible type or member
/// <inheritdoc/>
public override bool ShouldBeReApplied()
{
return true;
}
#pragma warning restore 1591
/// <summary>
/// Gets if the item is in the secondary selection.

30
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/UIExtensions/UIHelpers.cs

@ -30,8 +30,12 @@ namespace ICSharpCode.WpfDesign.UIExtensions @@ -30,8 +30,12 @@ namespace ICSharpCode.WpfDesign.UIExtensions
/// </summary>
public static class UIHelpers
{
#pragma warning disable 1591 // Primary internal use, disable Warning CS1591: Missing XML comment for publicly visible type or member
/// <summary>
/// Gets the parent. Which tree the parent is retrieved from depends on the parameters.
/// </summary>
/// <param name="child">The child to get parent for.</param>
/// <param name="searchCompleteVisualTree">If true the parent in the visual tree is returned, if false the parent may be retrieved from another tree depending on the child type.</param>
/// <returns>The parent element, and depending on the parameters its retrieved from either visual tree, logical tree or a tree not strictly speaking either the logical tree or the visual tree.</returns>
public static DependencyObject GetParentObject(this DependencyObject child, bool searchCompleteVisualTree)
{
if (child == null) return null;
@ -58,6 +62,15 @@ namespace ICSharpCode.WpfDesign.UIExtensions @@ -58,6 +62,15 @@ namespace ICSharpCode.WpfDesign.UIExtensions
return VisualTreeHelper.GetParent(child);
}
/// <summary>
/// Gets first parent element of the specified type. Which tree the parent is retrieved from depends on the parameters.
/// </summary>
/// <param name="child">The child to get parent for.</param>
/// <param name="searchCompleteVisualTree">If true the parent in the visual tree is returned, if false the parent may be retrieved from another tree depending on the child type.</param>
/// <returns>
/// The first parent element of the specified type, and depending on the parameters its retrieved from either visual tree, logical tree or a tree not strictly speaking either the logical tree or the visual tree.
/// null is returned if no parent of the specified type is found.
/// </returns>
public static T TryFindParent<T>(this DependencyObject child, bool searchCompleteVisualTree = false) where T : DependencyObject
{
DependencyObject parentObject = GetParentObject(child, searchCompleteVisualTree);
@ -73,6 +86,11 @@ namespace ICSharpCode.WpfDesign.UIExtensions @@ -73,6 +86,11 @@ namespace ICSharpCode.WpfDesign.UIExtensions
return TryFindParent<T>(parentObject);
}
/// <summary>
/// Returns the first child of the specified type found in the visual tree.
/// </summary>
/// <param name="parent">The parent element where the search is started.</param>
/// <returns>The first child of the specified type found in the visual tree, or null if no parent of the specified type is found.</returns>
public static T TryFindChild<T>(this DependencyObject parent) where T : DependencyObject
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
@ -92,6 +110,12 @@ namespace ICSharpCode.WpfDesign.UIExtensions @@ -92,6 +110,12 @@ namespace ICSharpCode.WpfDesign.UIExtensions
return null;
}
/// <summary>
/// Returns the first child of the specified type and with the specified name found in the visual tree.
/// </summary>
/// <param name="parent">The parent element where the search is started.</param>
/// <param name="childName">The name of the child element to find, or an empty string or null to only look at the type.</param>
/// <returns>The first child that matches the specified type and child name, or null if no match is found.</returns>
public static T TryFindChild<T>(this DependencyObject parent, string childName) where T : DependencyObject
{
if (parent == null) return null;
@ -124,7 +148,5 @@ namespace ICSharpCode.WpfDesign.UIExtensions @@ -124,7 +148,5 @@ namespace ICSharpCode.WpfDesign.UIExtensions
}
return foundChild;
}
#pragma warning restore 1591
}
}

Loading…
Cancel
Save