Table of Contents

Class CollectionNamespace

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Core.dll

Represents a collection namespace.

public sealed class CollectionNamespace : IEquatable<CollectionNamespace>
Inheritance
CollectionNamespace
Implements
Inherited Members

Constructors

CollectionNamespace(DatabaseNamespace, string)

Initializes a new instance of the CollectionNamespace class.

public CollectionNamespace(DatabaseNamespace databaseNamespace, string collectionName)

Parameters

databaseNamespace DatabaseNamespace

The database namespace.

collectionName string

The name of the collection.

CollectionNamespace(string, string)

Initializes a new instance of the CollectionNamespace class.

public CollectionNamespace(string databaseName, string collectionName)

Parameters

databaseName string

The name of the database.

collectionName string

The name of the collection.

Properties

CollectionName

Gets the name of the collection.

public string CollectionName { get; }

Property Value

string

The name of the collection.

DatabaseNamespace

Gets the database namespace.

public DatabaseNamespace DatabaseNamespace { get; }

Property Value

DatabaseNamespace

The database namespace.

FullName

Gets the collection full name.

public string FullName { get; }

Property Value

string

The collection full name.

Methods

Equals(CollectionNamespace)

public bool Equals(CollectionNamespace other)

Parameters

other CollectionNamespace

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

FromFullName(string)

Creates a new instance of the CollectionNamespace class from a collection full name.

public static CollectionNamespace FromFullName(string fullName)

Parameters

fullName string

The collection full name.

Returns

CollectionNamespace

A CollectionNamespace.

GetHashCode()

public override int GetHashCode()

Returns

int

IsValid(string)

Determines whether the specified collection name is valid.

public static bool IsValid(string collectionName)

Parameters

collectionName string

The name of the collection.

Returns

bool

Whether the specified collection name is valid.

ToString()

public override string ToString()

Returns

string