Note that there are some explanatory texts on larger screens.

plurals
  1. USJames King
    primarykey
    data
    text
    plurals
    1. CODidn't think to do a List first, that's a good idea. I'll be curious to see which performs better, a generic List that is converted to an array or working with the array directly. If I work with the array directly I still have to call Resize() when I'm done adding items (I don't know up front how many items I will have) so both approaches end up copying all the elements to an array at the end... the List may even be faster. It surprises me that there isn't a better way to work with a ListViewItemCollection.
      singulars
    2. COIf the ComponentManager is necessary to manage components, okay, but there's no reason for it to intercede between the Component and ResourceManager. Not having the CM know about the RM solves your circular dependency issue. I'm not clear at all on what the ComponentAccessor is giving you. It seems like an unnecessary wrapper, storing exactly one component, and wrapping one function without adding any value; you might as well just expose Component.GetMaxResource. If you're not happy with my suggestion, I'd still encourage you to think some more, come up with another approach
      singulars
    3. COI'm a little confused, because we switched from a ContainerManager and Container to a ComponentManager and Component... going to assume they're the same thing. There are a lot of details missing in the code you've given... the best I can say is that the ComponentManager seems to be unnecessary, or at least isn't involved in the Component/ResourceManager relationship. A component knows about its ResourceManager... okay so far, that makes sense. The ResourceManager knows about Components, since it works with those. Still okay. (more)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload