Class BsonJavaScriptWithScope
Represents a BSON JavaScript value with a scope.
[Serializable]
public class BsonJavaScriptWithScope : BsonJavaScript, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonJavaScript>, IEquatable<BsonJavaScript>, IComparable<BsonJavaScriptWithScope>, IEquatable<BsonJavaScriptWithScope>
- Inheritance
-
BsonJavaScriptWithScope
- Implements
- Inherited Members
- Extension Methods
Constructors
BsonJavaScriptWithScope(string, BsonDocument)
Initializes a new instance of the BsonJavaScriptWithScope class.
public BsonJavaScriptWithScope(string code, BsonDocument scope)
Parameters
codestringThe JavaScript code.
scopeBsonDocumentA scope (a set of variables with values).
Properties
BsonType
Gets the BsonType of this BsonValue.
public override BsonType BsonType { get; }
Property Value
Scope
Gets the scope (a set of variables with values).
public BsonDocument Scope { get; }
Property Value
Methods
Clone()
Creates a shallow clone of the BsonJavaScriptWithScope (see also DeepClone).
public override BsonValue Clone()
Returns
- BsonValue
A shallow clone of the BsonJavaScriptWithScope.
CompareTo(BsonJavaScriptWithScope)
Compares this BsonJavaScriptWithScope to another BsonJavaScriptWithScope.
public int CompareTo(BsonJavaScriptWithScope other)
Parameters
otherBsonJavaScriptWithScopeThe other BsonJavaScriptWithScope.
Returns
- int
A 32-bit signed integer that indicates whether this BsonJavaScriptWithScope is less than, equal to, or greather than the other.
CompareTo(BsonValue)
Compares the BsonJavaScriptWithScope to another BsonValue.
public override int CompareTo(BsonValue other)
Parameters
otherBsonValueThe other BsonValue.
Returns
- int
A 32-bit signed integer that indicates whether this BsonJavaScriptWithScope is less than, equal to, or greather than the other BsonValue.
Create(object)
Creates a new BsonJavaScriptWithScope.
public static BsonJavaScriptWithScope Create(object value)
Parameters
valueobjectAn object to be mapped to a BsonJavaScriptWithScope.
Returns
- BsonJavaScriptWithScope
A BsonJavaScriptWithScope or null.
DeepClone()
Creates a deep clone of the BsonJavaScriptWithScope (see also Clone).
public override BsonValue DeepClone()
Returns
- BsonValue
A deep clone of the BsonJavaScriptWithScope.
Equals(BsonJavaScriptWithScope)
Compares this BsonJavaScriptWithScope to another BsonJavaScriptWithScope.
public bool Equals(BsonJavaScriptWithScope rhs)
Parameters
rhsBsonJavaScriptWithScopeThe other BsonJavaScriptWithScope.
Returns
- bool
True if the two BsonJavaScriptWithScope values are equal.
Equals(object)
Compares this BsonJavaScriptWithScope to another object.
public override bool Equals(object obj)
Parameters
objobjectThe other object.
Returns
- bool
True if the other object is a BsonJavaScriptWithScope and equal to this one.
GetHashCode()
Gets the hash code.
public override int GetHashCode()
Returns
- int
The hash code.
ToString()
Returns a string representation of the value.
public override string ToString()
Returns
- string
A string representation of the value.
Operators
operator ==(BsonJavaScriptWithScope, BsonJavaScriptWithScope)
Compares two BsonJavaScriptWithScope values.
public static bool operator ==(BsonJavaScriptWithScope lhs, BsonJavaScriptWithScope rhs)
Parameters
lhsBsonJavaScriptWithScopeThe first BsonJavaScriptWithScope.
rhsBsonJavaScriptWithScopeThe other BsonJavaScriptWithScope.
Returns
- bool
True if the two BsonJavaScriptWithScope values are equal according to ==.
operator !=(BsonJavaScriptWithScope, BsonJavaScriptWithScope)
Compares two BsonJavaScriptWithScope values.
public static bool operator !=(BsonJavaScriptWithScope lhs, BsonJavaScriptWithScope rhs)
Parameters
lhsBsonJavaScriptWithScopeThe first BsonJavaScriptWithScope.
rhsBsonJavaScriptWithScopeThe other BsonJavaScriptWithScope.
Returns
- bool
True if the two BsonJavaScriptWithScope values are not equal according to ==.