In the Resharper API, JetBrains.Resharper.Psi.Csharp.Tree.AddAttributeBefore takes an IAttribute param, and an IAttribute anchor. How are these arguments different, and how can they be constructed?

有帮助吗?

解决方案

Have a peek at the working with XML document inside it shows use of the AddAttributeBefore call the first is the attribute you wish to insert. The second one is a attribute that already exists that you wish to insert before. If the second attribute is NULL the new attribute is inserted after the last attribute.

其他提示

basically, the param is what you want to add, and anchor is the element before which you want to add something. Keep in mind that you can, in most cases, have anchor == null, which would cause the element to be added last.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top