CreateViewOptions.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Copyright 2016-present MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using MongoDB.Bson.Serialization;
  16. namespace MongoDB.Driver
  17. {
  18. /// <summary>
  19. /// Options for creating a view.
  20. /// </summary>
  21. /// <typeparam name="TDocument">The type of the documents.</typeparam>
  22. public class CreateViewOptions<TDocument>
  23. {
  24. // fields
  25. private Collation _collation;
  26. private IBsonSerializer<TDocument> _documentSerializer;
  27. private IBsonSerializerRegistry _serializerRegistry;
  28. // properties
  29. /// <summary>
  30. /// Gets or sets the collation.
  31. /// </summary>
  32. /// <value>
  33. /// The collation.
  34. /// </value>
  35. public Collation Collation
  36. {
  37. get { return _collation; }
  38. set { _collation = value; }
  39. }
  40. /// <summary>
  41. /// Gets or sets the document serializer.
  42. /// </summary>
  43. /// <value>
  44. /// The document serializer.
  45. /// </value>
  46. public IBsonSerializer<TDocument> DocumentSerializer
  47. {
  48. get { return _documentSerializer; }
  49. set { _documentSerializer = value; }
  50. }
  51. /// <summary>
  52. /// Gets or sets the serializer registry.
  53. /// </summary>
  54. /// <value>
  55. /// The serializer registry.
  56. /// </value>
  57. public IBsonSerializerRegistry SerializerRegistry
  58. {
  59. get { return _serializerRegistry; }
  60. set { _serializerRegistry = value; }
  61. }
  62. }
  63. }