Corrected XML documentation errors

pull/10/head
David Hall 2018-04-03 18:35:18 -06:00
parent 6551700381
commit 0d8b96fe9b
32 changed files with 86 additions and 75 deletions

View File

@ -42,12 +42,12 @@ namespace Vanara.InteropServices
Item = null;
}
/// <summary>Performs an implicit conversion from <see cref="ComReleaser{T}"/> to <see cref="T"/>.</summary>
/// <summary>Performs an implicit conversion from <see cref="ComReleaser{T}"/> to <typeparamref name="T"/>.</summary>
/// <param name="co">The <see cref="ComReleaser{T}"/> instance.</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator T(ComReleaser<T> co) => co.Item;
/// <summary>Performs an implicit conversion from <see cref="T"/> to <see cref="ComReleaser{T}"/>.</summary>
/// <summary>Performs an implicit conversion from <typeparamref name="T"/> to <see cref="ComReleaser{T}"/>.</summary>
/// <param name="obj">The COM object.</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator ComReleaser<T>(T obj) => new ComReleaser<T>(obj);

View File

@ -97,7 +97,7 @@ namespace Vanara.InteropServices
public static IEnumerable<Type> GetCorrespondingTypes(object enumValue) => GetAttrForObj(enumValue).Select(a => a.TypeRef);
/// <summary>Gets the corresponding types for the supplied enumeration value.</summary>
/// <param name="enumValue">The enumeration value or class.</param>
/// <param name="type">The enumeration value or class.</param>
/// <returns>The types defined by the attribute.</returns>
public static IEnumerable<Type> GetCorrespondingTypes(Type type) => GetAttrForType(type).Select(a => a.TypeRef);

View File

@ -45,7 +45,7 @@ namespace Vanara.PInvoke
LVBKIF_SOURCE_MASK = 0X00000003,
/// <summary>The background image is displayed normally.</summary>
LVBKIF_STYLE_NORMAL = 0X00000000,
/// <summary>The background image will be tiled to fill the entire background of the control./summary>
/// <summary>The background image will be tiled to fill the entire background of the control.</summary>
LVBKIF_STYLE_TILE = 0X00000010,
/// <summary>You can use the LVBKIF_STYLE_MASK value to mask off all but the style flags.</summary>
LVBKIF_STYLE_MASK = 0X00000010,
@ -919,6 +919,7 @@ namespace Vanara.PInvoke
public uint dwReserved;
/// <summary>Initializes a new instance of the <see cref="LVINSERTMARK"/> struct.</summary>
/// <param name="insertAtItem">Index at which to insert the item.</param>
/// <param name="insertAfter">if set to <c>true</c> the insertion point appears after the item specified.</param>
public LVINSERTMARK(int insertAtItem, bool insertAfter = false) : this()
{

View File

@ -725,7 +725,7 @@ namespace Vanara.PInvoke
}
}
/// <summary>Structure to get colorization information using the <see cref="PVanara.PInvokeDwmGetColorizationParameters"/> function.</summary>
/// <summary>Structure to get colorization information using the <see cref="DwmpGetColorizationParameters"/> function.</summary>
[StructLayout(LayoutKind.Sequential)]
[PInvokeData("dwmapi.h")]
public struct DWM_COLORIZATION_PARAMS

View File

@ -94,7 +94,7 @@ namespace Vanara.PInvoke
/// <returns>The result of the conversion.</returns>
public static implicit operator long(IN_ADDR a) => (long)a.S_addr;
/// <summary>Performs an implicit conversion from <see cref="IN_ADDR"/> to <see cref="System.Byte[]"/>.</summary>
/// <summary>Performs an implicit conversion from <see cref="IN_ADDR"/> to <see cref="T:byte[]"/>.</summary>
/// <param name="a">An IN_ADDR value.</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator byte[](IN_ADDR a) => BitConverter.GetBytes(a.S_addr);

View File

@ -316,7 +316,7 @@ namespace Vanara.PInvoke
/// </summary>
public IntPtr hModule;
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.ACTCTX"/> struct.</summary>
/// <summary>Initializes a new instance of the <see cref="ACTCTX"/> struct.</summary>
/// <param name="source">The source.</param>
public ACTCTX(string source) : this()
{
@ -333,10 +333,10 @@ namespace Vanara.PInvoke
[PInvokeData("Winbase.h")]
public class ActCtxSafeHandle : GenericSafeHandle
{
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.ActCtxSafeHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="ActCtxSafeHandle"/> class.</summary>
public ActCtxSafeHandle() : base(ReleaseHandle) { }
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.ActCtxSafeHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="ActCtxSafeHandle"/> class.</summary>
/// <param name="hActCtx">The h act CTX.</param>
/// <param name="ownsHandle">if set to <c>true</c> [owns handle].</param>
public ActCtxSafeHandle(IntPtr hActCtx, bool ownsHandle) : base(hActCtx, ReleaseHandle, ownsHandle) { }

View File

@ -102,7 +102,7 @@ namespace Vanara.PInvoke
/// </para>
/// </returns>
/// <remarks>
/// An application can determine whether a volume is compressed by calling <see cref="GetVolumeInformation(string,System.Text.StringBuilder,int,ref int,ref int,ref FileSystemFlags,System.Text.StringBuilder,int)"/>,
/// An application can determine whether a volume is compressed by calling <see cref="GetVolumeInformation(string, out string, out uint, out uint, out FileSystemFlags, out string)"/>,
/// then checking the status of the FS_VOL_IS_COMPRESSED flag in the DWORD value pointed to by that function's lpFileSystemFlags parameter.
/// <para>
/// If the file is not located on a volume that supports compression or sparse files, or if the file is not compressed or a sparse file, the value

View File

@ -5,7 +5,7 @@ namespace Vanara.PInvoke
public static partial class Kernel32
{
/// <summary>
/// Flags that may be passed to the <see cref="GetVolumeInformation(string,System.Text.StringBuilder,int,ref int,ref int,ref FileSystemFlags,System.Text.StringBuilder,int)"/> function.
/// Flags that may be passed to the <see cref="GetVolumeInformation(string, out string, out uint, out uint, out FileSystemFlags, out string)"/> function.
/// </summary>
[Flags]
[PInvokeData("winnt.h")]

View File

@ -348,7 +348,7 @@ namespace Vanara.PInvoke
}
/// <summary>
/// A <see cref="SafeHandle"/> for the results from <see cref="Vanara.DsCrackNames(SafeDsHandle,DS_NAME_FLAGS,DS_NAME_FORMAT,DS_NAME_FORMAT,uint,string[],out SafeDsNameResult)"/>.
/// A <see cref="SafeHandle"/> for the results from <see cref="DsCrackNames(SafeDsHandle,DS_NAME_FLAGS,DS_NAME_FORMAT,DS_NAME_FORMAT,uint,string[],out SafeDsNameResult)"/>.
/// </summary>
/// <seealso cref="GenericSafeHandle"/>
[PInvokeData("Ntdsapi.h")]

View File

@ -133,7 +133,7 @@ namespace Vanara.PInvoke
DS_DNS_FOREST_FLAG = 0x80000000,
}
/// <summary>Flags supporting behavior of <see cref="PInvoke.DsGetDcName"/>.</summary>
/// <summary>Flags supporting behavior of <see cref="DsGetDcName"/>.</summary>
[Flags]
[PInvokeData("DsGetDC.h", MSDNShortId = "ms675983")]
public enum DsGetDcNameFlags : uint

View File

@ -197,7 +197,7 @@ namespace Vanara.PInvoke
/// <summary>Specifies the sector size of the storage object. The default is 512 bytes.</summary>
public uint ulSectorSize;
/// <summary>Specifies the name of a file whose Encrypted File System (EFS) metadata will be transferred to a newly created Structured Storage file. This member is valid only when STGFMT_DOCFILE is used with StgCreateStorageEx.
/// <para>In Windows XP and later: The pwcsTemplateFile member is only valid if version 2 or later is specified in the usVersion member.</summary>
/// <para>In Windows XP and later: The pwcsTemplateFile member is only valid if version 2 or later is specified in the usVersion member.</para></summary>
public string pwcsTemplateFile;
}
}

View File

@ -317,7 +317,7 @@ namespace Vanara.PInvoke
/// <returns>The result of the conversion.</returns>
public static implicit operator SNB(IntPtr p) => new SNB(p);
/// <summary>Performs an implicit conversion from <see cref="IEnumerable{string}"/> to <see cref="SNB"/>.</summary>
/// <summary>Performs an implicit conversion from <see cref="IEnumerable{T}"/> to <see cref="SNB"/>.</summary>
/// <param name="names">The names.</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator SNB(string[] names) => new SNB(names);

View File

@ -147,6 +147,8 @@ namespace Vanara.PInvoke
AncestorName = ancestorName;
}
/// <summary>Returns a <see cref="System.String" /> that represents this instance.</summary>
/// <returns>A <see cref="System.String" /> that represents this instance.</returns>
public override string ToString() => $"{AncestorName} : 0x{GenerationGap:X}";
/// <summary>ACE is explicit.</summary>
@ -213,14 +215,14 @@ namespace Vanara.PInvoke
/// </summary>
public IntPtr ptstrName;
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.TRUSTEE"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="TRUSTEE"/> class.</summary>
/// <param name="sid">The sid.</param>
public TRUSTEE(PSID sid = null)
{
if (sid != null) Sid = sid;
}
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.TRUSTEE"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="TRUSTEE"/> class.</summary>
/// <param name="name">The name of the trustee in one of the following formats:
/// <list type="bullet">
/// <listItem>A fully qualified name, such as "g:\remotedir\abc".</listItem>

View File

@ -147,7 +147,7 @@ namespace Vanara.PInvoke
public static extern Win32Error SetNamedSecurityInfo(string pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID ppsidOwner,
PSID ppsidGroup, IntPtr ppDacl, IntPtr ppSacl);
/// <summary>A <see cref="SafeHandle"/> to hold the array of <see cref="INHERITED_FROM"/> instances returned from <see cref="Vanara.GetInheritanceSource"/>.</summary>
/// <summary>A <see cref="SafeHandle"/> to hold the array of <see cref="INHERITED_FROM"/> instances returned from <see cref="GetInheritanceSource"/>.</summary>
public class SafeInheritedFromArray : SafeHGlobalHandle
{
/// <summary>Initializes a new instance of the <see cref="SafeInheritedFromArray"/> class.</summary>

View File

@ -33,9 +33,9 @@ namespace Vanara.PInvoke
public IntPtr SecurityQualityOfService;
/// <summary>
/// Returns a completely empty reference. This value should be used when calling <see cref="PInvoke.LsaOpenPolicy(string,ref LSA_OBJECT_ATTRIBUTES,Vanara.PInvoke.LsaPolicyRights,out Vanara.PInvoke.SafeLsaPolicyHandle)"/>.
/// Returns a completely empty reference. This value should be used when calling <see cref="LsaOpenPolicy(string, ref LSA_OBJECT_ATTRIBUTES, LsaPolicyRights, out SafeLsaPolicyHandle)"/>.
/// </summary>
/// <value>An <see cref="Vanara.PInvoke.LSA_OBJECT_ATTRIBUTES"/> instance with all members set to <c>NULL</c> or zero.</value>
/// <value>An <see cref="LSA_OBJECT_ATTRIBUTES"/> instance with all members set to <c>NULL</c> or zero.</value>
public static LSA_OBJECT_ATTRIBUTES Empty { get; } = new LSA_OBJECT_ATTRIBUTES();
}

View File

@ -417,7 +417,7 @@ namespace Vanara.PInvoke
private static extern uint LsaFreeMemory(IntPtr Buffer);
/// <summary>The LsaFreeReturnBuffer function frees the memory used by a buffer previously allocated by the LSA.</summary>
/// <param name="Buffer"Pointer to the buffer to be freed.</param>
/// <param name="Buffer">Pointer to the buffer to be freed.</param>
/// <returns>If the function succeeds, the return value is STATUS_SUCCESS. If the function fails, the return value is an NTSTATUS code.</returns>
[DllImport(Lib.Secur32, ExactSpelling = true)]
private static extern uint LsaFreeReturnBuffer(IntPtr Buffer);
@ -458,12 +458,12 @@ namespace Vanara.PInvoke
/// <summary>A <see cref="SafeHandle"/> for values that must be freed using the <see cref="LsaFreeMemory(IntPtr)"/> function.</summary>
public sealed class SafeLsaMemoryHandle : GenericSafeHandle
{
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeLsaMemoryHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaMemoryHandle"/> class.</summary>
public SafeLsaMemoryHandle() : this(IntPtr.Zero)
{
}
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeLsaMemoryHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaMemoryHandle"/> class.</summary>
/// <param name="ptr">The pointer to the memory allocated by an Lsa function.</param>
/// <param name="own">if set to <c>true</c> release the memory when out of scope.</param>
public SafeLsaMemoryHandle(IntPtr ptr, bool own = true) : base(ptr, Free, own)
@ -477,10 +477,10 @@ namespace Vanara.PInvoke
/// <seealso cref="GenericSafeHandle"/>
public sealed class SafeLsaPolicyHandle : GenericSafeHandle
{
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeLsaPolicyHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaPolicyHandle"/> class.</summary>
public SafeLsaPolicyHandle() : base(Release) { }
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeLsaPolicyHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaPolicyHandle"/> class.</summary>
/// <param name="ptr">The PTR.</param>
/// <param name="own">if set to <c>true</c> [own].</param>
public SafeLsaPolicyHandle(IntPtr ptr, bool own = true) : base(ptr, Release, own) { }
@ -494,10 +494,10 @@ namespace Vanara.PInvoke
/// <summary>A <see cref="SafeHandle"/> for values that must be freed using the <see cref="LsaFreeReturnBuffer(IntPtr)"/> function.</summary>
public sealed class SafeLsaReturnBufferHandle : GenericSafeHandle
{
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeLsaReturnBufferHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaReturnBufferHandle"/> class.</summary>
public SafeLsaReturnBufferHandle() : this(IntPtr.Zero) { }
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeLsaReturnBufferHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaReturnBufferHandle"/> class.</summary>
/// <param name="ptr">The pointer to the memory allocated by an Lsa function.</param>
/// <param name="own">if set to <c>true</c> release the memory when out of scope.</param>
public SafeLsaReturnBufferHandle(IntPtr ptr, bool own = true) : base(ptr, Free, own) { }

View File

@ -869,14 +869,14 @@ namespace Vanara.PInvoke
/// </remarks>
public static readonly SafeTokenHandle CurrentThreadToken = new SafeTokenHandle((IntPtr)5, false);
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeTokenHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeTokenHandle"/> class.</summary>
/// <param name="hToken">The h token.</param>
/// <param name="own">if set to <c>true</c> [own].</param>
public SafeTokenHandle(IntPtr hToken, bool own = true) : base(hToken, CloseHandle, own)
{
}
/// <summary>Initializes a new instance of the <see cref="Vanara.PInvoke.SafeTokenHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeTokenHandle"/> class.</summary>
internal SafeTokenHandle() : base(CloseHandle) { }
/// <summary>Gets an instance that is equivalent to NULL HTOKEN.</summary>

View File

@ -32,7 +32,7 @@ namespace Vanara.PInvoke
/// <summary>Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.</summary>
public static readonly SafeRegistryHandle HKEY_USERS = new SafeRegistryHandle(new IntPtr(unchecked((int)0x80000003)), false);
/// <summary>Flags used in the <see cref="Vanara.InitiateShutdown"/> function.</summary>
/// <summary>Flags used in the <see cref="InitiateShutdown"/> function.</summary>
[Flags]
public enum ShutdownFlags
{

View File

@ -6,7 +6,7 @@ namespace Vanara.PInvoke
{
public static partial class AdvApi32
{
/// <summary>Used by the <see cref="Vanara.ChangeServiceConfig2"/> method.</summary>
/// <summary>Used by the <see cref="ChangeServiceConfig2"/> method.</summary>
public enum ServiceConfigOption : uint
{
/// <summary>

View File

@ -19,12 +19,13 @@ namespace Vanara.InteropServices
/// <summary>Initializes a new instance of the <see cref="SafeElementArray{TElem, TPrefix, TMem}"/> class.</summary>
protected SafeElementArray() : this(0) { }
/// <summary>Initializes a new instance of the <see cref="SafeElementArray"/> class and allocates <paramref name="byteCount"/> bytes.</summary>
/// <param name="byteCount">The TElem count to allocate.</param>
/// <summary>Initializes a new instance of the <see cref="SafeElementArray{TElem, TPrefix, TMem}"/> class and allocates <paramref name="elementCount"/> bytes.</summary>
/// <param name="elementCount">The TElem count to allocate.</param>
protected SafeElementArray(TPrefix elementCount) : this(Convert.ToInt32(elementCount)) { }
/// <summary>Initializes a new instance of the <see cref="SafeElementArray"/> class from a copy of a managed TElem array.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeElementArray{TElem, TPrefix, TMem}"/> class from a copy of a managed TElem array.</summary>
/// <param name="array">The array of bytes to copy.</param>
/// <param name="getElemSize">Size of the get elem.</param>
protected SafeElementArray(TElem[] array, Func<TElem, int> getElemSize = null) : base(IntPtr.Zero, 0, true) { GetElemSize = getElemSize; Elements = array; }
/// <summary>Initializes a new instance of the <see cref="SafeElementArray{TElem, TPrefix, TMem}"/> class.</summary>
@ -59,6 +60,8 @@ namespace Vanara.InteropServices
}
}
/// <summary>Gets or sets the size of the element.</summary>
/// <value>The size of the element.</value>
protected Func<TElem, int> GetElemSize { get; set; }
private int IntCount

View File

@ -137,7 +137,7 @@ namespace Vanara.PInvoke
FO_RENAME = 0x0004
}
/// <summary>The flags that specify the file information to retrieve from <see cref="Vanara.SHGetFileInfo(string,System.IO.FileAttributes,ref SHFILEINFO,int,Vanara.PInvoke.SHGFI)"/>.</summary>
/// <summary>The flags that specify the file information to retrieve from <see cref="SHGetFileInfo(string, FileAttributes, ref SHFILEINFO, int, SHGFI)"/>.</summary>
[PInvokeData("Shellapi.h", MSDNShortId = "bb762179")]
[Flags]
public enum SHGFI
@ -417,7 +417,7 @@ namespace Vanara.PInvoke
public IntPtr hProcess;
/// <summary>
/// Initializes a new instance of the <see cref="Vanara.PInvoke.SHELLEXECUTEINFO"/> struct.
/// Initializes a new instance of the <see cref="SHELLEXECUTEINFO"/> struct.
/// </summary>
/// <param name="fileName">Name of the file.</param>
/// <param name="parameters">The parameters.</param>
@ -472,7 +472,7 @@ namespace Vanara.PInvoke
/// <summary><note type="note">This string must be double-null terminated.</note>
/// <para>A pointer to one or more source file names.These names should be fully qualified paths to prevent unexpected results.</para>
/// <para>Standard MS-DOS wildcard characters, such as "*", are permitted only in the file-name position.Using a wildcard character elsewhere in the string will lead to unpredictable results.</para>
/// <para>Although this member is declared as a single null-terminated string, it is actually a buffer that can hold multiple null-delimited file names.Each file name is terminated by a single NULL character. The last file name is terminated with a double NULL character ("\0\0") to indicate the end of the buffer.</summary></para></summary>
/// <para>Although this member is declared as a single null-terminated string, it is actually a buffer that can hold multiple null-delimited file names.Each file name is terminated by a single NULL character. The last file name is terminated with a double NULL character ("\0\0") to indicate the end of the buffer.</para></summary>
[MarshalAs(UnmanagedType.LPTStr)]
public string pFrom;
/// <summary><note type="note">This string must be double-null terminated.</note>

View File

@ -14,7 +14,7 @@ namespace Vanara.PInvoke
{
public static partial class Shell32
{
/// <summary>Flags used by <see cref="IExtractIcon.GetFieldInfo"/>.</summary>
/// <summary>Flags used by <see cref="IExtractIcon.GetIconLocation(GetIconLocationFlags, StringBuilder, int, out int, out GetIconLocationResultFlags)"/>.</summary>
[Flags]
public enum GetIconLocationFlags : uint
{
@ -32,7 +32,7 @@ namespace Vanara.PInvoke
GIL_CHECKSHIELD = 0x0200
}
/// <summary>Flags returned by <see cref="IExtractIcon.GetFieldInfo"/>.</summary>
/// <summary>Flags returned by <see cref="IExtractIcon.GetIconLocation(GetIconLocationFlags, StringBuilder, int, out int, out GetIconLocationResultFlags)"/>.</summary>
[Flags]
public enum GetIconLocationResultFlags : uint
{

View File

@ -157,8 +157,8 @@ namespace Vanara.PInvoke
/// <summary>On the screen background or on a dividing line between windows.</summary>
HTNOWHERE = 0,
/// <summary>Not implemented.</summary>
/* HTOBJECT = 19, */
/* /// <summary>Not implemented.</summary>
HTOBJECT = 19, */
/// <summary>In a Minimize button.</summary>
HTREDUCE = HTMINBUTTON,

View File

@ -27,13 +27,13 @@ namespace Vanara.Windows.Forms
base.FlatStyle = FlatStyle.System;
}
/// <summary>
/*/// <summary>
/// Gets or sets the flat style.
/// </summary>
/// <value>
/// The flat style.
/// </value>
/*[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(typeof(FlatStyle), "System")]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(typeof(FlatStyle), "System")]
public new FlatStyle FlatStyle
{
get { return base.FlatStyle; }

View File

@ -13,6 +13,7 @@ using Vanara.Extensions;
namespace Vanara.Windows.Forms.Design
{
/// <summary>Methods to assist when using designer code.</summary>
public static class ComponentDesignerExtension
{
/// <summary>Launches the design-time editor for the property of the component behind a designer.</summary>
@ -37,7 +38,7 @@ namespace Vanara.Windows.Forms.Design
/// <summary>Sets a property on the component behind a designer.</summary>
/// <typeparam name="T">The type of the property value.</typeparam>
/// <param name="designer">The designer for a component.</param>
/// <param name="d">The designer for a component.</param>
/// <param name="propName">The name of the property to set. If this value is null, the default property for the object is used. This method will not set the property if the property type does not match <typeparamref name="T"/>, if the property is read-only, or if the property is not browsable.</param>
/// <param name="value">The value to assign to the property.</param>
public static void SetComponentProperty<T>(this ComponentDesigner d, string propName, T value)

View File

@ -122,7 +122,7 @@ namespace Vanara.Windows.Shell
public string FormatForDisplay(object obj, PROPDESC_FORMAT_FLAGS pdfFlags = PROPDESC_FORMAT_FLAGS.PDFF_DEFAULT) => iDesc?.FormatForDisplay(new PROPVARIANT(obj), pdfFlags) ?? obj?.ToString();
/// <summary>Gets a formatted string representation of a property value.</summary>
/// <param name="obj">A object that contains the type and value of the property.</param>
/// <param name="pv">A object that contains the type and value of the property.</param>
/// <param name="pdfFlags">One or more of the PROPDESC_FORMAT_FLAGS flags, which are either bitwise or multiple values, that indicate the property string format.</param>
/// <returns>The formatted value.</returns>
internal string FormatForDisplay(PROPVARIANT pv, PROPDESC_FORMAT_FLAGS pdfFlags = PROPDESC_FORMAT_FLAGS.PDFF_DEFAULT) => iDesc?.FormatForDisplay(pv, pdfFlags) ?? pv?.ToString();
@ -163,7 +163,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Exposes methods that extract information from a collection of property descriptions presented as a list.</summary>
/// <seealso cref="System.Collections.Generic.IReadOnlyList{Vanara.Windows.Shell.PropertyDescription}"/>
/// <seealso cref="System.Collections.Generic.IReadOnlyList{T}"/>
/// <seealso cref="System.IDisposable"/>
public class PropertyDescriptionList : IReadOnlyList<PropertyDescription>, IDisposable
{
@ -188,10 +188,10 @@ namespace Vanara.Windows.Shell
public virtual PropertyDescription this[int index] =>
new PropertyDescription(iList?.GetAt((uint)index, typeof(IPropertyDescription).GUID));
/// <summary>Gets the <see cref="PropertyDescription"/> for the specified key.</summary>
/// <value>The <see cref="PropertyDescription"/>.</value>
/// <param name="index">The PROPERTYKEY.</param>
/// <returns>The <see cref="PropertyDescription"/> for the specified key.</returns>
/// <summary>Gets the <see cref="PropertyDescription" /> for the specified key.</summary>
/// <value>The <see cref="PropertyDescription" />.</value>
/// <param name="propkey">The PROPERTYKEY.</param>
/// <returns>The <see cref="PropertyDescription" /> for the specified key.</returns>
public virtual PropertyDescription this[PROPERTYKEY propkey] => new PropertyDescription(propkey);
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
@ -291,7 +291,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Exposes methods that enumerate the possible values for a property.</summary>
/// <seealso cref="System.Collections.Generic.IReadOnlyList{Vanara.Windows.Shell.PropertyType}"/>
/// <seealso cref="System.Collections.Generic.IReadOnlyList{T}"/>
/// <seealso cref="System.IDisposable"/>
public class PropertyTypeList : IReadOnlyList<PropertyType>, IDisposable
{

View File

@ -73,7 +73,7 @@ namespace Vanara.Windows.Shell
/// <summary>Gets or sets the value of the property with the specified PROPERTYKEY.</summary>
/// <value>The value.</value>
/// <param name="knownKey">The PROPERTYKEY of the property.</param>
/// <param name="key">The PROPERTYKEY of the property.</param>
/// <returns>The value of the property.</returns>
public object this[PROPERTYKEY key]
{

View File

@ -371,7 +371,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Copies a set of items to a specified destination using the Shell to provide progress and error dialogs.</summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances that represent the group of items to be copied.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances that represent the group of items to be copied.</param>
/// <param name="dest">A <see cref="ShellFolder"/> that specifies the destination folder to contain the copy of the items.</param>
/// <param name="options">Options that control file operations.</param>
public static void Copy(IEnumerable<ShellItem> sourceItems, ShellFolder dest, OperationFlags options = defaultOptions)
@ -397,7 +397,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Deletes a single item using the Shell to provide progress and error dialogs.</summary>
/// <param name="item">&gt;A <see cref="ShellItem"/> that specifies the item to be deleted.</param>
/// <param name="source">A <see cref="ShellItem"/> that specifies the item to be deleted.</param>
/// <param name="options">Options that control file operations.</param>
public static void Delete(ShellItem source, OperationFlags options = defaultOptions)
{
@ -422,7 +422,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Deletes a set of items using the Shell to provide progress and error dialogs.</summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be deleted.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be deleted.</param>
/// <param name="options">Options that control file operations.</param>
public static void Delete(IEnumerable<ShellItem> sourceItems, OperationFlags options = defaultOptions)
{
@ -477,7 +477,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Moves a set of items to a specified destination using the Shell to provide progress and error dialogs.</summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be moved.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be moved.</param>
/// <param name="dest">A <see cref="ShellFolder"/> that specifies the destination folder to contain the moved items.</param>
/// <param name="options">Options that control file operations.</param>
public static void Move(IEnumerable<ShellItem> sourceItems, ShellFolder dest, OperationFlags options = defaultOptions)
@ -571,7 +571,7 @@ namespace Vanara.Windows.Shell
/// <summary>
/// Renames a set of items that are to be given a new display name using the Shell to provide progress and error dialogs. All items are given the same name.
/// </summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be renamed.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be renamed.</param>
/// <param name="newName">The new display name of the items.</param>
/// <param name="options">Options that control file operations.</param>
public static void Rename(IEnumerable<ShellItem> sourceItems, string newName, OperationFlags options = defaultOptions)
@ -655,7 +655,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Declares a set of items that are to be copied to a specified destination.</summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances that represent the group of items to be copied.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances that represent the group of items to be copied.</param>
/// <param name="dest">A <see cref="ShellFolder"/> that specifies the destination folder to contain the copy of the items.</param>
public void QueueCopyOperation(IEnumerable<ShellItem> sourceItems, ShellFolder dest)
{
@ -693,7 +693,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Declares a set of items that are to be moved to a specified destination.</summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be moved.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be moved.</param>
/// <param name="dest">A <see cref="ShellFolder"/> that specifies the destination folder to contain the moved items.</param>
public void QueueMoveOperation(IEnumerable<ShellItem> sourceItems, ShellFolder dest)
{
@ -734,7 +734,7 @@ namespace Vanara.Windows.Shell
}
/// <summary>Declares a set of items that are to be given a new display name. All items are given the same name.</summary>
/// <param name="items">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be renamed.</param>
/// <param name="sourceItems">An <see cref="IEnumerable{T}"/> of <see cref="ShellItem"/> instances which represents the group of items to be renamed.</param>
/// <param name="newName">The new display name of the items.</param>
public void QueueRenameOperation(IEnumerable<ShellItem> sourceItems, string newName)
{
@ -874,7 +874,7 @@ namespace Vanara.Windows.Shell
/// <see cref="ShellFileOperations.QueueApplyPropertiesOperation(ShellItem, ShellItemPropertyUpdates)"/> method. This class wraps the
/// <see cref="IPropertyChangeArray"/> COM interface.
/// </summary>
/// <seealso cref="System.Collections.Generic.IDictionary{PROPERTYKEY, object}"/>
/// <seealso cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>
/// <seealso cref="IDisposable"/>
public class ShellItemPropertyUpdates : IDictionary<PROPERTYKEY, object>, IDisposable
{
@ -886,14 +886,14 @@ namespace Vanara.Windows.Shell
PSCreatePropertyChangeArray(null, null, null, 0, typeof(IPropertyChangeArray).GUID, out changes).ThrowIfFailed();
}
/// <summary>Gets the number of elements contained in the <see cref="System.Collections.Generic.ICollection`1"/>.</summary>
/// <summary>Gets the number of elements contained in the <see cref="System.Collections.Generic.ICollection{T}"/>.</summary>
public int Count => (int)changes.GetCount();
/// <summary>Gets the COM interface for <see cref="IPropertyChangeArray"/>.</summary>
/// <value>The <see cref="IPropertyChangeArray"/> value.</value>
public IPropertyChangeArray IPropertyChangeArray => changes;
/// <summary>Gets an <see cref="System.Collections.Generic.ICollection{T}"/> containing the keys of the <see cref="System.Collections.Generic.IDictionary{T}"/>.</summary>
/// <summary>Gets an <see cref="System.Collections.Generic.ICollection{T}"/> containing the keys of the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>.</summary>
public ICollection<PROPERTYKEY> Keys
{
get
@ -908,7 +908,7 @@ namespace Vanara.Windows.Shell
}
}
/// <summary>Gets an <see cref="System.Collections.Generic.ICollection{T}"/> containing the values in the <see cref="System.Collections.Generic.IDictionary{T}"/>.</summary>
/// <summary>Gets an <see cref="System.Collections.Generic.ICollection{T}"/> containing the values in the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>.</summary>
public ICollection<object> Values
{
get
@ -945,7 +945,7 @@ namespace Vanara.Windows.Shell
}
}
}
/// <summary>Adds an element with the provided key and value to the <see cref="System.Collections.Generic.IDictionary{T}"/>.</summary>
/// <summary>Adds an element with the provided key and value to the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>.</summary>
/// <param name="key">The object to use as the key of the element to add.</param>
/// <param name="value">The object to use as the value of the element to add.</param>
public void Add(PROPERTYKEY key, object value)
@ -960,9 +960,9 @@ namespace Vanara.Windows.Shell
changes.RemoveAt(i);
}
/// <summary>Determines whether the <see cref="System.Collections.Generic.IDictionary{T}"/> contains an element with the specified key.</summary>
/// <param name="key">The key to locate in the <see cref="System.Collections.Generic.IDictionary{T}"/>.</param>
/// <returns>true if the <see cref="System.Collections.Generic.IDictionary{T}"/> contains an element with the key; otherwise, false.</returns>
/// <summary>Determines whether the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/> contains an element with the specified key.</summary>
/// <param name="key">The key to locate in the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>.</param>
/// <returns>true if the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/> contains an element with the key; otherwise, false.</returns>
public bool ContainsKey(PROPERTYKEY key) => changes.IsKeyInArray(ref key).Succeeded;
/// <summary>Returns an enumerator that iterates through the collection.</summary>
@ -970,10 +970,10 @@ namespace Vanara.Windows.Shell
public IEnumerator<KeyValuePair<PROPERTYKEY, object>> GetEnumerator() =>
new IEnumFromIndexer<KeyValuePair<PROPERTYKEY, object>>(changes.GetCount, i => this[(int)i]).GetEnumerator();
/// <summary>Removes the element with the specified key from the <see cref="System.Collections.Generic.IDictionary{T}"/>.</summary>
/// <summary>Removes the element with the specified key from the <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>.</summary>
/// <param name="key">The key of the element to remove.</param>
/// <returns>
/// true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key"/> was not found in the original <see cref="System.Collections.Generic.IDictionary{T}"/>.
/// true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key"/> was not found in the original <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/>.
/// </returns>
public bool Remove(PROPERTYKEY key)
{
@ -989,7 +989,7 @@ namespace Vanara.Windows.Shell
/// <paramref name="value"/> parameter. This parameter is passed uninitialized.
/// </param>
/// <returns>
/// true if the object that implements <see cref="System.Collections.Generic.IDictionary{T}"/> contains an element with the specified key; otherwise, false.
/// true if the object that implements <see cref="System.Collections.Generic.IDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, false.
/// </returns>
public bool TryGetValue(PROPERTYKEY key, out object value)
{

View File

@ -150,8 +150,11 @@ namespace Vanara.Windows.Shell
base.Dispose();
}
/// <summary>Enumerates all children of this item. If this item is not a folder/container, this method will return an empty enumeration.</summary>
/// <summary>
/// Enumerates all children of this item. If this item is not a folder/container, this method will return an empty enumeration.
/// </summary>
/// <param name="filter">A filter for the types of children to enumerate.</param>
/// <param name="parentWindow">The parent window.</param>
/// <returns>An enumerated list of children matching the filter.</returns>
public IEnumerable<ShellItem> EnumerateChildren(FolderItemFilter filter = FolderItemFilter.Folders | FolderItemFilter.IncludeHidden | FolderItemFilter.NonFolders | FolderItemFilter.IncludeSuperHidden, System.Windows.Forms.IWin32Window parentWindow = null)
{

View File

@ -222,7 +222,7 @@ namespace Vanara.Windows.Shell
SecondaryFileSystemPath = 0x20000000
}
/// <summary>Requests the form of an item's display name to retrieve through <see cref="ShellItem.GetDisplayName"/>.</summary>
/// <summary>Requests the form of an item's display name to retrieve through <see cref="ShellItem.GetDisplayName(ShellItemDisplayString)"/>.</summary>
public enum ShellItemDisplayString : uint
{
/// <summary>

View File

@ -12,8 +12,8 @@ namespace Vanara.Windows.Shell
{
private IShellItemArray array;
/// <summary>Initializes a new instance of the <see cref="ShellItem"/> class.</summary>
/// <param name="path">The file system path of the item.</param>
/// <summary>Initializes a new instance of the <see cref="ShellItem" /> class.</summary>
/// <param name="shellItems">The shell items.</param>
public ShellItemArray(IShellItemArray shellItems)
{
array = shellItems;

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Vanara.Extensions;