<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:00 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-169] Deserialize Arrays to Properties without Setter</title>
                <link>https://jira.mongodb.org/browse/CSHARP-169</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Provide support for De-serializing Arrays to read only properties&lt;/p&gt;

&lt;p&gt;Like so:&lt;br/&gt;
 private List&amp;lt;contact&amp;gt; _contacts;&lt;/p&gt;

&lt;p&gt; public IEnumerable&amp;lt;contact&amp;gt; Contacts&lt;br/&gt;
 {&lt;br/&gt;
     get&lt;/p&gt;
     {
         if (_contacts == null)
             _contacts = new List&amp;lt;contact&amp;gt;();
         return _contacts;
     }
&lt;p&gt; }&lt;/p&gt;</description>
                <environment></environment>
        <key id="14731">CSHARP-169</key>
            <summary>Deserialize Arrays to Properties without Setter</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="middletommy">Thomas Tucker</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Feb 2011 21:31:03 +0000</created>
                <updated>Wed, 8 Feb 2023 13:09:59 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 16:47:54 +0000</resolved>
                                    <version>0.11</version>
                                                    <component>Feature Request</component>
                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1734003" author="JIRAUSER1256534" created="Fri, 24 Nov 2017 08:29:55 +0000"  >&lt;p&gt;Potential duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1999&quot; title=&quot;Support for readonly properties/fields that contain instances&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1999&quot;&gt;&lt;del&gt;CSHARP-1999&lt;/del&gt;&lt;/a&gt; which I already created a pull request for.&lt;/p&gt;</comment>
                            <comment id="391304" author="david@funnelfire.com" created="Mon, 29 Jul 2013 21:03:26 +0000"  >&lt;p&gt;I really need to be able to reuse my existing, constructor instantiated, instances.&lt;/p&gt;</comment>
                            <comment id="110369" author="optimiz3" created="Mon, 16 Apr 2012 19:17:37 +0000"  >&lt;p&gt;IMO a better way to implement this would be to have a private setter and support a PrivateMemberFinderConvention. Such an approach would be cleaner and wouldn&apos;t require decompilation with semantic inference.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;private List&amp;lt;contact&amp;gt; _contacts;&lt;/p&gt;

&lt;p&gt;public IEnumerable&amp;lt;contact&amp;gt; Contacts&lt;/p&gt;
{
get
{ if (_contacts == null) _contacts = new List&amp;lt;contact&amp;gt;(); return _contacts; }
&lt;p&gt;}&lt;br/&gt;
private set&lt;br/&gt;
{&lt;br/&gt;
  _contacts = value;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;var conventionProfile = ConventionProfile.GetDefault()&lt;br/&gt;
    .SetMemberFinderConvention(&lt;br/&gt;
    new PrivateMemberFinderConvention());&lt;/p&gt;

&lt;p&gt;    BsonClassMap.RegisterConventions(&lt;br/&gt;
        conventionProfile,&lt;br/&gt;
        type =&amp;gt; type == typeof(MyType));&lt;/p&gt;

&lt;p&gt;BTW, we&apos;ve already got this implemented in our private fork, wouldn&apos;t be hard to push this out.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="393283">CSHARP-1999</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="82881">CSHARP-782</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs0ten:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>129205</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>