We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggested implementation:
public unsafe partial class ID2D1SvgElement : IEnumerable<ID2D1SvgElement> { public IEnumerator<ID2D1SvgElement> GetEnumerator() { ID2D1SvgElement? child = GetFirstChild(); while (child != null) { yield return child; child = child.GetNextChild(child); } } IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); public IEnumerable<ID2D1SvgElement> DescendantsAndSelf() { yield return this; foreach (ID2D1SvgElement child in this) { foreach (ID2D1SvgElement descendant in child.DescendantsAndSelf()) { yield return descendant; } } } public IEnumerable<ID2D1SvgElement> Descendants() { foreach (ID2D1SvgElement child in this) { yield return child; foreach (ID2D1SvgElement grandchild in child.Descendants()) { yield return grandchild; } } } public IEnumerable<string> AttributeNames { get { int count = GetSpecifiedAttributeCount(); for (int i = 0; i < count; i++) { GetSpecifiedAttributeNameLength(i, out int nameLength, out _); IntPtr namePtr = Marshal.AllocHGlobal(nameLength); try { bool success = GetSpecifiedAttributeName(i, namePtr, nameLength); if (!success) continue; string attributeName = Marshal.PtrToStringUni(namePtr, nameLength)!; yield return attributeName; } finally { Marshal.FreeHGlobal(namePtr); } } } } public string TagName {get;} // from GetTagName/GetTagNameLength public string TextValue {get;} // from GetTextValue/GetTextValueLength }
I wants to do PR, however for reason unknown code doesn't compile in my local machine, please try help.
The text was updated successfully, but these errors were encountered:
Some improvements landed here:
fc1540a
Sorry, something went wrong.
No branches or pull requests
Suggested implementation:
I wants to do PR, however for reason unknown code doesn't compile in my local machine, please try help.
The text was updated successfully, but these errors were encountered: