IContentManager中的groupId参数是什么?果园的建筑展示方法?

时间:2022-07-24 05:01:08

The method IContentManager.BuildDisplay used to call to the drivers of a ContentItem has an optional groupId argument. I have navigated through the source code but I did not understand exactly what is its use case. It seems to be able to filter shapes, but I'm not sure I understand how.

IContentManager方法。用于调用contrightem驱动程序的BuildDisplay有一个可选的groupId参数。我已经通过了源代码,但是我不知道它的用例到底是什么。它似乎可以过滤形状,但我不确定我能理解。

Could you clarify this for me? Thanks in advance.

你能帮我澄清一下吗?提前谢谢。

1 个解决方案

#1


6  

Yes, this parameter is used for filtering shapes. You can provide an optional parameter via .OnGroup() method of ContentShape object returned from Display/Editor method of a driver.

是的,这个参数用于过滤形状。可以通过驱动程序的Display/Editor方法返回的. ongroup()方法提供可选参数。

By default it's an empty string. If you provide a groupId parameter in BuildDisplay - only the shapes with that group id specified would be taken into account when building the final output.

默认情况下,它是一个空字符串。如果在BuildDisplay中提供一个groupId参数——在构建最终输出时,只考虑指定了具有该组id的形状。

I found it particularly useful when needed to render the same part differently in different scenarios - returning a Combined result with ContentShape objects (each with different group specified) in it from the driver's Display method.

当需要在不同的场景中以不同的方式呈现相同的部分时,我发现它特别有用——从驱动程序的显示方法中返回一个与ContentShape对象(每个对象具有指定的不同组)组合的结果。

Remember that if you explicitly specify a group in BuildDisplay method - only the shapes with that group set will be used.

请记住,如果在BuildDisplay方法中显式地指定一个组,则只使用具有该组集的形状。

#1


6  

Yes, this parameter is used for filtering shapes. You can provide an optional parameter via .OnGroup() method of ContentShape object returned from Display/Editor method of a driver.

是的,这个参数用于过滤形状。可以通过驱动程序的Display/Editor方法返回的. ongroup()方法提供可选参数。

By default it's an empty string. If you provide a groupId parameter in BuildDisplay - only the shapes with that group id specified would be taken into account when building the final output.

默认情况下,它是一个空字符串。如果在BuildDisplay中提供一个groupId参数——在构建最终输出时,只考虑指定了具有该组id的形状。

I found it particularly useful when needed to render the same part differently in different scenarios - returning a Combined result with ContentShape objects (each with different group specified) in it from the driver's Display method.

当需要在不同的场景中以不同的方式呈现相同的部分时,我发现它特别有用——从驱动程序的显示方法中返回一个与ContentShape对象(每个对象具有指定的不同组)组合的结果。

Remember that if you explicitly specify a group in BuildDisplay method - only the shapes with that group set will be used.

请记住,如果在BuildDisplay方法中显式地指定一个组,则只使用具有该组集的形状。