Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-163

Missing Character in CSharp Driver Serialization Tutorial Code Sample

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual
    • # Replies:
      1
    • Last comment by Customer:
      false

      Description

      http://www.mongodb.org/display/DOCS/CSharp+Driver+Serialization+Tutorial#CSharpDriverSerializationTutorial-SelectinganIdGeneratortouseforanIdfieldorproperty

      In the section "Selecting an IdGenerator to use for an Id field or property" there is a code sample that is missing a character. Without it, the code does not compile. Here is the original code:

      BsonSerializer.RegisterIdGenerator(
      typeof(Guid),
      ComGuidGenerator.Instance
      );

      Here is the corrected code:

      BsonSerializer.RegisterIdGenerator(
      typeof(Guid),
      CombGuidGenerator.Instance
      );

      Notice on the 3rd line, the "b" in "Comb" is missing: Com[b]GuidGenerator.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                7 years, 31 weeks, 5 days ago
                Date of 1st Reply: