Class MongoGridFSSettings
Represents setting for GridFS.
[Serializable]
public class MongoGridFSSettings : IEquatable<MongoGridFSSettings>
- Inheritance
-
MongoGridFSSettings
- Implements
- Inherited Members
- Extension Methods
Constructors
MongoGridFSSettings()
Initializes a new instance of the MongoGridFSSettings class.
public MongoGridFSSettings()
MongoGridFSSettings(MongoDatabase)
Initializes a new instance of the MongoGridFSSettings class.
[Obsolete("Use new MongoGridFSSettings() instead.")]
public MongoGridFSSettings(MongoDatabase database)
Parameters
database
MongoDatabaseThe database from which to inherit some of the settings.
MongoGridFSSettings(int, string, WriteConcern)
Initializes a new instance of the MongoGridFSSettings class.
[Obsolete("Use new MongoGridFSSettings() instead.")]
public MongoGridFSSettings(int chunkSize, string root, WriteConcern writeConcern)
Parameters
chunkSize
intThe chunk size.
root
stringThe root collection name.
writeConcern
WriteConcernThe write concern.
Properties
ChunkSize
Gets or sets the chunk size.
public int ChunkSize { get; set; }
Property Value
ChunksCollectionName
Gets the chunks collection name.
[Obsolete("Use Root instead.")]
public string ChunksCollectionName { get; }
Property Value
Defaults
Gets or sets the default GridFS settings.
public static MongoGridFSSettings Defaults { get; set; }
Property Value
FilesCollectionName
Gets the files collection name.
[Obsolete("Use Root instead.")]
public string FilesCollectionName { get; }
Property Value
GuidRepresentation
Gets or sets the GuidRepresentation.
[Obsolete("Configure serializers instead.")]
public GuidRepresentation GuidRepresentation { get; set; }
Property Value
IsFrozen
Gets a value indicating whether the settings are frozen.
public bool IsFrozen { get; }
Property Value
ReadEncoding
Gets or sets the read encoding.
public UTF8Encoding ReadEncoding { get; set; }
Property Value
ReadPreference
Gets or sets the ReadPreference.
public ReadPreference ReadPreference { get; set; }
Property Value
Root
Gets or sets the root collection name (the files and chunks collection names are derived from the root).
public string Root { get; set; }
Property Value
UpdateMD5
Gets or sets a value indicating whether to udpate the MD5 hash on the server when a file is uploaded or modified.
public bool UpdateMD5 { get; set; }
Property Value
VerifyMD5
Gets or sets a value indicating whether to verify the MD5 hash when a file is uploaded or downloaded.
public bool VerifyMD5 { get; set; }
Property Value
WriteConcern
Gets or sets the WriteConcern.
public WriteConcern WriteConcern { get; set; }
Property Value
WriteEncoding
Gets or sets the write encoding.
public UTF8Encoding WriteEncoding { get; set; }
Property Value
Methods
Clone()
Creates a clone of the settings.
public MongoGridFSSettings Clone()
Returns
- MongoGridFSSettings
A clone of the settings.
Equals(MongoGridFSSettings)
Compares this MongoGridFSSettings to another one.
public bool Equals(MongoGridFSSettings rhs)
Parameters
rhs
MongoGridFSSettingsThe other MongoGridFSSettings.
Returns
- bool
True if the two settings are equal.
Equals(object)
Compares this MongoGridFSSettings to another object.
public override bool Equals(object obj)
Parameters
obj
objectThe other object.
Returns
- bool
True if the other objects is a MongoGridFSSettings and is equal to this one.
Freeze()
Freezes the settings.
public MongoGridFSSettings Freeze()
Returns
- MongoGridFSSettings
The frozen settings.
FrozenCopy()
Returns a frozen copy of the settings.
public MongoGridFSSettings FrozenCopy()
Returns
- MongoGridFSSettings
A frozen copy of the settings.
GetHashCode()
Gets the hash code.
public override int GetHashCode()
Returns
- int
The hash code.
Operators
operator ==(MongoGridFSSettings, MongoGridFSSettings)
Compares two MongoGridFSSettings.
public static bool operator ==(MongoGridFSSettings lhs, MongoGridFSSettings rhs)
Parameters
lhs
MongoGridFSSettingsThe first MongoGridFSSettings.
rhs
MongoGridFSSettingsThe other MongoGridFSSettings.
Returns
- bool
True if the two MongoGridFSSettings are equal (or both null).
operator !=(MongoGridFSSettings, MongoGridFSSettings)
Compares two MongoGridFSSettings.
public static bool operator !=(MongoGridFSSettings lhs, MongoGridFSSettings rhs)
Parameters
lhs
MongoGridFSSettingsThe first MongoGridFSSettings.
rhs
MongoGridFSSettingsThe other MongoGridFSSettings.
Returns
- bool
True if the two MongoGridFSSettings are not equal (or one is null and the other is not).