-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
https://raw.githubusercontent.com/gtk-rs/gir-files/master/Gtk-3.0.gir <class name="EntryIconAccessible"> element is a good example CType isn't set.
bf3bce5
to
2073ac1
Compare
|
||
public static (string both, string names) BuildParameters(List<Parameter> parameters) | ||
{ | ||
var typeAndName = new Dictionary<string, string>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not preserve order!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would an OrderedDictionary fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure but we don't really need a dictionary structure here, a list is sufficient since we don't care for fast lookups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Therzok already fixed this in master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
sb.AppendFormat("{0} {1}, ", pair.Key, pair.Value); | ||
} | ||
string parameterString = sb.ToString(); | ||
parameterString = parameterString.Substring(0, parameterString.Length - 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail with no elements. I'm also not sure why to cut off everything but the last two characters. Did you wanted to cut off the trailing ", "?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do want to cut the trailing ", " because that isn't valid c#.
ie, if I have 1 parameter string value
it'll set parameterString to string value,
. This is just trimming off that closing ,
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I misread that statement but anyway it fails when there are no parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, but this has also been rewritten in master :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry for not making a PR. Thought I was on a branch and pushed to master :(
I'm somewhat guess at what we want here. Hopefully there is some useful stuff in here.