Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><p>not at current, no; the type exposed <em>must</em> have (at a minimum) an <code>Add</code> method. While I have no objection to <em>investigating</em> the possibility of an <code>Add</code> outside the object itself, this is complicated since you are then looking at a different "primary" object (the sequence vs the container). However; if your <strong>parent</strong> object implemented <code>IEnumerable&lt;T&gt;</code> (returning <code>_itemsSet.GetEnumerator()</code> etc), then it would find the <code>Add</code> automatically</p></li> <li><p>I can't see the context here; however, I suspect that without the <code>Add</code> it still isn't happy to consider it a list <em>in the first place</em>. I see the way you are going with that, though, and it is perhaps a way it could reason "I can use a <code>List&lt;T&gt;</code> here)</p></li> <li><p>It isn't something I've investigated, to be honest; so: no</p></li> <li><p>The type exposed in the property must, as a minimum: implement <code>IEnumerable</code> (although <code>IEnumerable&lt;T&gt;</code> would be preferred), and expose an <code>Add(T)</code> method. It doesn't have to be <code>Collection&lt;T&gt;</code> / <code>List&lt;T&gt;</code> / etc - simply: it must (at present) have <em>some</em> mechanism to add. <code>IList&lt;T&gt;</code> would be a a pragmatic option, but I gather that isn't quite what you want.</p></li> </ol> <p>Jonathan is right that a surrogate <strong>for the outer-class</strong> (the thing which <em>has</em> <code>_itemsSet</code>, <code>TSet</code> and <code>AddT</code>) might also be an option.</p> <p>If the outer-class <em>only</em> exists to have the collection and the add method, then just adding <code>: IEnumerable&lt;T&gt;</code> and renaming <code>AddT</code> to <code>Add</code> would probably make it work.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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