parent
e6712e5aa2
commit
25cc23a9c1
@ -1,16 +0,0 @@
|
||||
using System.Linq;
|
||||
using Services.PetaPoco;
|
||||
|
||||
namespace NzbDrone.Services.Service.Repository.Reporting
|
||||
{
|
||||
[TableName("Exceptions")]
|
||||
[PrimaryKey("Hash", autoIncrement = false)]
|
||||
public class ExceptionDetail
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public string Logger { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string String { get; set; }
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Services.PetaPoco;
|
||||
|
||||
namespace NzbDrone.Services.Service.Repository.Reporting
|
||||
{
|
||||
[TableName("ExceptionInstances")]
|
||||
public class ExceptionInstance
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string ExceptionHash { get; set; }
|
||||
public string LogMessage { get; set; }
|
||||
public DateTime Timestamp { get; set; }
|
||||
public bool IsProduction { get; set; }
|
||||
public Guid UGuid { get; set; }
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>AutoMapper</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:AutoMapper.MappingEngine.ConversionVisitor">
|
||||
<summary>
|
||||
This expression visitor will replace an input parameter by another one
|
||||
|
||||
see http://stackoverflow.com/questions/4601844/expression-tree-copy-or-convert
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
@ -1,671 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>AutoMapper</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:AutoMapper.MappingEngine.ConversionVisitor">
|
||||
<summary>
|
||||
This expression visitor will replace an input parameter by another one
|
||||
|
||||
see http://stackoverflow.com/questions/4601844/expression-tree-copy-or-convert
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TvdP.Collections.ConcurrentDictionaryKey`2">
|
||||
<summary>
|
||||
Search key structure for <see cref="T:TvdP.Collections.ConcurrentDictionary`2"/>
|
||||
</summary>
|
||||
<typeparam name="TKey">Type of the key.</typeparam>
|
||||
<typeparam name="TValue">Type of the value.</typeparam>
|
||||
</member>
|
||||
<member name="T:TvdP.Collections.ConcurrentDictionary`2">
|
||||
<summary>
|
||||
A Concurrent <see cref="T:System.Collections.Generic.IDictionary`2"/> implementation.
|
||||
</summary>
|
||||
<typeparam name="TKey">Type of the keys.</typeparam>
|
||||
<typeparam name="TValue">Type of the values.</typeparam>
|
||||
<remarks>
|
||||
This class is threadsafe and highly concurrent. This means that multiple threads can do lookup and insert operations
|
||||
on this dictionary simultaneously.
|
||||
It is not guaranteed that collisions will not occur. The dictionary is partitioned in segments. A segment contains
|
||||
a set of items based on a hash of those items. The more segments there are and the beter the hash, the fewer collisions will occur.
|
||||
This means that a nearly empty ConcurrentDictionary is not as concurrent as one containing many items.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:TvdP.Collections.ConcurrentHashtable`2">
|
||||
<summary>
|
||||
Base class for concurrent hashtable implementations
|
||||
</summary>
|
||||
<typeparam name="TStored">Type of the items stored in the hashtable.</typeparam>
|
||||
<typeparam name="TSearch">Type of the key to search with.</typeparam>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.#ctor">
|
||||
<summary>
|
||||
Constructor (protected)
|
||||
</summary>
|
||||
<remarks>Use Initialize method after construction.</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.Initialize">
|
||||
<summary>
|
||||
Initialize the newly created ConcurrentHashtable. Invoke in final (sealed) constructor
|
||||
or Create method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.CreateSegmentRange(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Create a segment range
|
||||
</summary>
|
||||
<param name="segmentCount">Number of segments in range.</param>
|
||||
<param name="initialSegmentSize">Number of slots allocated initialy in each segment.</param>
|
||||
<returns>The created <see cref="T:TvdP.Collections.Segmentrange`2"/> instance.</returns>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.ConcurrentHashtable`2._NewRange">
|
||||
<summary>
|
||||
While adjusting the segmentation, _NewRange will hold a reference to the new range of segments.
|
||||
when the adjustment is complete this reference will be copied to _CurrentRange.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.ConcurrentHashtable`2._CurrentRange">
|
||||
<summary>
|
||||
Will hold the most current reange of segments. When busy adjusting the segmentation, this
|
||||
field will hold a reference to the old range.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.ConcurrentHashtable`2._SwitchPoint">
|
||||
<summary>
|
||||
While adjusting the segmentation this field will hold a boundary.
|
||||
Clients accessing items with a key hash value below this boundary (unsigned compared)
|
||||
will access _NewRange. The others will access _CurrentRange
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetItemHashCode(`0@)">
|
||||
<summary>
|
||||
Get a hashcode for given storeable item.
|
||||
</summary>
|
||||
<param name="item">Reference to the item to get a hash value for.</param>
|
||||
<returns>The hash value as an <see cref="T:System.UInt32"/>.</returns>
|
||||
<remarks>
|
||||
The hash returned should be properly randomized hash. The standard GetItemHashCode methods are usually not good enough.
|
||||
A storeable item and a matching search key should return the same hash code.
|
||||
So the statement <code>ItemEqualsItem(storeableItem, searchKey) ? GetItemHashCode(storeableItem) == GetItemHashCode(searchKey) : true </code> should always be true;
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetKeyHashCode(`1@)">
|
||||
<summary>
|
||||
Get a hashcode for given search key.
|
||||
</summary>
|
||||
<param name="key">Reference to the key to get a hash value for.</param>
|
||||
<returns>The hash value as an <see cref="T:System.UInt32"/>.</returns>
|
||||
<remarks>
|
||||
The hash returned should be properly randomized hash. The standard GetItemHashCode methods are usually not good enough.
|
||||
A storeable item and a matching search key should return the same hash code.
|
||||
So the statement <code>ItemEqualsItem(storeableItem, searchKey) ? GetItemHashCode(storeableItem) == GetItemHashCode(searchKey) : true </code> should always be true;
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.ItemEqualsKey(`0@,`1@)">
|
||||
<summary>
|
||||
Compares a storeable item to a search key. Should return true if they match.
|
||||
</summary>
|
||||
<param name="item">Reference to the storeable item to compare.</param>
|
||||
<param name="key">Reference to the search key to compare.</param>
|
||||
<returns>True if the storeable item and search key match; false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.ItemEqualsItem(`0@,`0@)">
|
||||
<summary>
|
||||
Compares two storeable items for equality.
|
||||
</summary>
|
||||
<param name="item1">Reference to the first storeable item to compare.</param>
|
||||
<param name="item2">Reference to the second storeable item to compare.</param>
|
||||
<returns>True if the two soreable items should be regarded as equal.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.IsEmpty(`0@)">
|
||||
<summary>
|
||||
Indicates if a specific item reference contains a valid item.
|
||||
</summary>
|
||||
<param name="item">The storeable item reference to check.</param>
|
||||
<returns>True if the reference doesn't refer to a valid item; false otherwise.</returns>
|
||||
<remarks>The statement <code>IsEmpty(default(TStoredI))</code> should always be true.</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetKeyType(`0@)">
|
||||
<summary>
|
||||
Returns the type of the key value or object.
|
||||
</summary>
|
||||
<param name="item">The stored item to get the type of the key for.</param>
|
||||
<returns>The actual type of the key or null if it can not be determined.</returns>
|
||||
<remarks>
|
||||
Used for diagnostics purposes.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetSegment(System.UInt32)">
|
||||
<summary>
|
||||
Gets a segment out of either _NewRange or _CurrentRange based on the hash value.
|
||||
</summary>
|
||||
<param name="hash"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetSegmentLockedForWriting(System.UInt32)">
|
||||
<summary>
|
||||
Gets a LOCKED segment out of either _NewRange or _CurrentRange based on the hash value.
|
||||
Unlock needs to be called on this segment before it can be used by other clients.
|
||||
</summary>
|
||||
<param name="hash"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetSegmentLockedForReading(System.UInt32)">
|
||||
<summary>
|
||||
Gets a LOCKED segment out of either _NewRange or _CurrentRange based on the hash value.
|
||||
Unlock needs to be called on this segment before it can be used by other clients.
|
||||
</summary>
|
||||
<param name="hash"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.FindItem(`1@,`0@)">
|
||||
<summary>
|
||||
Finds an item in the table collection that maches the given searchKey
|
||||
</summary>
|
||||
<param name="searchKey">The key to the item.</param>
|
||||
<param name="item">Out reference to a field that will receive the found item.</param>
|
||||
<returns>A boolean that will be true if an item has been found and false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.GetOldestItem(`0@,`0@)">
|
||||
<summary>
|
||||
Looks for an existing item in the table contents using an alternative copy. If it can be found it will be returned.
|
||||
If not then the alternative copy will be added to the table contents and the alternative copy will be returned.
|
||||
</summary>
|
||||
<param name="searchKey">A copy to search an already existing instance with</param>
|
||||
<param name="item">Out reference to receive the found item or the alternative copy</param>
|
||||
<returns>A boolean that will be true if an existing copy was found and false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.ReplaceItem(`1@,`0@,`0@,System.Func{`0,System.Boolean})">
|
||||
<summary>
|
||||
Replaces and existing item
|
||||
</summary>
|
||||
<param name="newItem"></param>
|
||||
<param name="oldItem"></param>
|
||||
<param name="sanction"></param>
|
||||
<returns>true is the existing item was successfully replaced.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.InsertItem(`0@,`0@)">
|
||||
<summary>
|
||||
Inserts an item in the table contents possibly replacing an existing item.
|
||||
</summary>
|
||||
<param name="searchKey">The item to insert in the table</param>
|
||||
<param name="replacedItem">Out reference to a field that will receive any possibly replaced item.</param>
|
||||
<returns>A boolean that will be true if an existing copy was found and replaced and false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.RemoveItem(`1@,`0@)">
|
||||
<summary>
|
||||
Removes an item from the table contents.
|
||||
</summary>
|
||||
<param name="searchKey">The key to find the item with.</param>
|
||||
<param name="removedItem">Out reference to a field that will receive the found and removed item.</param>
|
||||
<returns>A boolean that will be rue if an item was found and removed and false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.EnumerateAmorphLockedSegments(System.Boolean)">
|
||||
<summary>
|
||||
Enumerates all segments in _CurrentRange and locking them before yielding them and resleasing the lock afterwards
|
||||
The order in which the segments are returned is undefined.
|
||||
Lock SyncRoot before using this enumerable.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.Clear">
|
||||
<summary>
|
||||
Removes all items from the collection.
|
||||
Aquires a lock on SyncRoot before it does it's thing.
|
||||
When this method returns and multiple threads have access to this table it
|
||||
is not guaranteed that the table is actually empty.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.SegmentationAdjustmentNeeded">
|
||||
<summary>
|
||||
Determines if a segmentation adjustment is needed.
|
||||
</summary>
|
||||
<returns>True</returns>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.ConcurrentHashtable`2._AssessSegmentationPending">
|
||||
<summary>
|
||||
Bool as int (for interlocked functions) that is true if a Segmentation assesment is pending.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.ConcurrentHashtable`2._AllocatedSpace">
|
||||
<summary>
|
||||
The total allocated number of item slots. Filled with nonempty items or not.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.EffectTotalAllocatedSpace(System.Int32)">
|
||||
<summary>
|
||||
When a segment resizes it uses this method to inform the hashtable of the change in allocated space.
|
||||
</summary>
|
||||
<param name="effect"></param>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.ScheduleMaintenance">
|
||||
<summary>
|
||||
Schedule a call to the AssessSegmentation() method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.AssessSegmentation(System.Object)">
|
||||
<summary>
|
||||
Checks if segmentation needs to be adjusted and if so performs the adjustment.
|
||||
</summary>
|
||||
<param name="dummy"></param>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.AssessSegmentation">
|
||||
<summary>
|
||||
This method is called when a re-segmentation is expected to be needed. It checks if it actually is needed and, if so, performs the re-segementation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentHashtable`2.SetSegmentation(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Adjusts the segmentation to the new segment count
|
||||
</summary>
|
||||
<param name="newSegmentCount">The new number of segments to use. This must be a power of 2.</param>
|
||||
<param name="segmentSize">The number of item slots to reserve in each segment.</param>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentHashtable`2.SyncRoot">
|
||||
<summary>
|
||||
Returns an object that serves as a lock for range operations
|
||||
</summary>
|
||||
<remarks>
|
||||
Clients use this primarily for enumerating over the Tables contents.
|
||||
Locking doesn't guarantee that the contents don't change, but prevents operations that would
|
||||
disrupt the enumeration process.
|
||||
Operations that use this lock:
|
||||
Count, Clear, DisposeGarbage and AssessSegmentation.
|
||||
Keeping this lock will prevent the table from re-segmenting.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentHashtable`2.Items">
|
||||
<summary>
|
||||
Gets an IEnumerable to iterate over all items in all segments.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
<remarks>
|
||||
A lock should be aquired and held on SyncRoot while this IEnumerable is being used.
|
||||
The order in which the items are returned is undetermined.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentHashtable`2.Count">
|
||||
<summary>
|
||||
Returns a count of all items in teh collection. This may not be
|
||||
aqurate when multiple threads are accessing this table.
|
||||
Aquires a lock on SyncRoot before it does it's thing.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentHashtable`2.MinSegments">
|
||||
<summary>
|
||||
Gives the minimum number of segments a hashtable can contain. This should be 1 or more and always a power of 2.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentHashtable`2.MinSegmentAllocatedSpace">
|
||||
<summary>
|
||||
Gives the minimum number of allocated item slots per segment. This should be 1 or more, always a power of 2
|
||||
and less than 1/2 of MeanSegmentAllocatedSpace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentHashtable`2.MeanSegmentAllocatedSpace">
|
||||
<summary>
|
||||
Gives the prefered number of allocated item slots per segment. This should be 4 or more and always a power of 2.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.#ctor">
|
||||
<summary>
|
||||
Constructs a <see cref="T:TvdP.Collections.ConcurrentDictionary`2"/> instance using the default <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> to compare keys.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.#ctor(System.Collections.Generic.IEqualityComparer{`0})">
|
||||
<summary>
|
||||
Constructs a <see cref="T:TvdP.Collections.ConcurrentDictionary`2"/> instance using the specified <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> to compare keys.
|
||||
</summary>
|
||||
<param name="comparer">The <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> tp compare keys with.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="comparer"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.GetItemHashCode(System.Nullable{System.Collections.Generic.KeyValuePair{`0,`1}}@)">
|
||||
<summary>
|
||||
Get a hashcode for given storeable item.
|
||||
</summary>
|
||||
<param name="item">Reference to the item to get a hash value for.</param>
|
||||
<returns>The hash value as an <see cref="T:System.UInt32"/>.</returns>
|
||||
<remarks>
|
||||
The hash returned should be properly randomized hash. The standard GetItemHashCode methods are usually not good enough.
|
||||
A storeable item and a matching search key should return the same hash code.
|
||||
So the statement <code>ItemEqualsItem(storeableItem, searchKey) ? GetItemHashCode(storeableItem) == GetItemHashCode(searchKey) : true </code> should always be true;
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.GetKeyHashCode(TvdP.Collections.ConcurrentDictionaryKey{`0,`1}@)">
|
||||
<summary>
|
||||
Get a hashcode for given search key.
|
||||
</summary>
|
||||
<param name="key">Reference to the key to get a hash value for.</param>
|
||||
<returns>The hash value as an <see cref="T:System.UInt32"/>.</returns>
|
||||
<remarks>
|
||||
The hash returned should be properly randomized hash. The standard GetItemHashCode methods are usually not good enough.
|
||||
A storeable item and a matching search key should return the same hash code.
|
||||
So the statement <code>ItemEqualsItem(storeableItem, searchKey) ? GetItemHashCode(storeableItem) == GetItemHashCode(searchKey) : true </code> should always be true;
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.ItemEqualsKey(System.Nullable{System.Collections.Generic.KeyValuePair{`0,`1}}@,TvdP.Collections.ConcurrentDictionaryKey{`0,`1}@)">
|
||||
<summary>
|
||||
Compares a storeable item to a search key. Should return true if they match.
|
||||
</summary>
|
||||
<param name="item">Reference to the storeable item to compare.</param>
|
||||
<param name="key">Reference to the search key to compare.</param>
|
||||
<returns>True if the storeable item and search key match; false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.ItemEqualsItem(System.Nullable{System.Collections.Generic.KeyValuePair{`0,`1}}@,System.Nullable{System.Collections.Generic.KeyValuePair{`0,`1}}@)">
|
||||
<summary>
|
||||
Compares two storeable items for equality.
|
||||
</summary>
|
||||
<param name="item1">Reference to the first storeable item to compare.</param>
|
||||
<param name="item2">Reference to the second storeable item to compare.</param>
|
||||
<returns>True if the two soreable items should be regarded as equal.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.IsEmpty(System.Nullable{System.Collections.Generic.KeyValuePair{`0,`1}}@)">
|
||||
<summary>
|
||||
Indicates if a specific item reference contains a valid item.
|
||||
</summary>
|
||||
<param name="item">The storeable item reference to check.</param>
|
||||
<returns>True if the reference doesn't refer to a valid item; false otherwise.</returns>
|
||||
<remarks>The statement <code>IsEmpty(default(TStoredI))</code> should always be true.</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#IDictionary{TKey@TValue}#Add(`0,`1)">
|
||||
<summary>
|
||||
Adds an element with the provided key and value to the dictionary.
|
||||
</summary>
|
||||
<param name="key">The object to use as the key of the element to add.</param>
|
||||
<param name="value">The object to use as the value of the element to add.</param>
|
||||
<exception cref="T:System.ArgumentException">An element with the same key already exists in the dictionary.</exception>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.ContainsKey(`0)">
|
||||
<summary>
|
||||
Determines whether the dictionary
|
||||
contains an element with the specified key.
|
||||
</summary>
|
||||
<param name="key">The key to locate in the dictionary.</param>
|
||||
<returns>true if the dictionary contains
|
||||
an element with the key; otherwise, false.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#IDictionary{TKey@TValue}#Remove(`0)">
|
||||
<summary>
|
||||
Removes the element with the specified key from the dictionary.
|
||||
</summary>
|
||||
<param name="key">The key of the element to remove.</param>
|
||||
<returns>true if the element is successfully removed; otherwise, false. This method
|
||||
also returns false if key was not found in the original dictionary.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.TryGetValue(`0,`1@)">
|
||||
<summary>
|
||||
Gets the value associated with the specified key.
|
||||
</summary>
|
||||
<param name="key">The key whose value to get.</param>
|
||||
<param name="value">
|
||||
When this method returns, the value associated with the specified key, if
|
||||
the key is found; otherwise, the default value for the type of the value
|
||||
parameter. This parameter is passed uninitialized.
|
||||
</param>
|
||||
<returns>
|
||||
true if the dictionary contains an element with the specified key; otherwise, false.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#ICollection{System#Collections#Generic#KeyValuePair{TKey@TValue}}#Add(System.Collections.Generic.KeyValuePair{`0,`1})">
|
||||
<summary>
|
||||
Adds an association to the dictionary.
|
||||
</summary>
|
||||
<param name="item">A <see cref="T:System.Collections.Generic.KeyValuePair`2"/> that represents the association to add.</param>
|
||||
<exception cref="T:System.ArgumentException">An association with an equal key already exists in the dicitonary.</exception>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.Clear">
|
||||
<summary>
|
||||
Removes all items from the dictionary.
|
||||
</summary>
|
||||
<remarks>WHen working with multiple threads, that each can add items to this dictionary, it is not guaranteed that the dictionary will be empty when this method returns.</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#ICollection{System#Collections#Generic#KeyValuePair{TKey@TValue}}#Contains(System.Collections.Generic.KeyValuePair{`0,`1})">
|
||||
<summary>
|
||||
Determines whether the specified association exists in the dictionary.
|
||||
</summary>
|
||||
<param name="item">The key-value association to search fo in the dicionary.</param>
|
||||
<returns>True if item is found in the dictionary; otherwise, false.</returns>
|
||||
<remarks>
|
||||
This method compares both key and value. It uses the default equality comparer to compare values.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#ICollection{System#Collections#Generic#KeyValuePair{TKey@TValue}}#CopyTo(System.Collections.Generic.KeyValuePair{`0,`1}[],System.Int32)">
|
||||
<summary>
|
||||
Copies all associations of the dictionary to an
|
||||
<see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
|
||||
</summary>
|
||||
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the associations
|
||||
copied from <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/>. The <see cref="T:System.Array"/> must
|
||||
have zero-based indexing.</param>
|
||||
<param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception>
|
||||
<exception cref="T:System.ArgumentException"><paramref name="arrayIndex"/> is equal to or greater than the length of <paramref name="array"/>.</exception>
|
||||
<exception cref="T:System.ArgumentException">The number of associations to be copied
|
||||
is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination
|
||||
<paramref name="array"/>.</exception>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#ICollection{System#Collections#Generic#KeyValuePair{TKey@TValue}}#Remove(System.Collections.Generic.KeyValuePair{`0,`1})">
|
||||
<summary>
|
||||
Removes the specified association from the <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/>, comparing both key and value.
|
||||
</summary>
|
||||
<param name="item">A <see cref="T:System.Collections.Generic.KeyValuePair`2"/> representing the association to remove.</param>
|
||||
<returns>true if the association was successfully removed from the <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/>;
|
||||
otherwise, false. This method also returns false if the association is not found in
|
||||
the original <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/>.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through all associations in the <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/> at the moment of invocation.
|
||||
</summary>
|
||||
<returns>A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the associations.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.ConcurrentDictionary`2.System#Collections#IEnumerable#GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through all associations in the <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/> at the moment of invocation.
|
||||
</summary>
|
||||
<returns>A <see cref="T:System.Collections.IEnumerator"/> that can be used to iterate through the associations.</returns>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentDictionary`2.Comparer">
|
||||
<summary>
|
||||
Gives the <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> of TKey that is used to compare keys.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentDictionary`2.Keys">
|
||||
<summary>
|
||||
Gets an <see cref="T:System.Collections.Generic.ICollection`1"/> containing the keys of
|
||||
the dictionary.
|
||||
</summary>
|
||||
<returns>An <see cref="T:System.Collections.Generic.ICollection`1"/> containing the keys of the dictionary.</returns>
|
||||
<remarks>This property takes a snapshot of the current keys collection of the dictionary at the moment of invocation.</remarks>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentDictionary`2.Values">
|
||||
<summary>
|
||||
Gets an <see cref="T:System.Collections.Generic.ICollection`1"/> containing the values in
|
||||
the dictionary.
|
||||
</summary>
|
||||
<returns>
|
||||
An <see cref="T:System.Collections.Generic.ICollection`1"/> containing the values in the dictionary.
|
||||
</returns>
|
||||
<remarks>This property takes a snapshot of the current keys collection of the dictionary at the moment of invocation.</remarks>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentDictionary`2.Item(`0)">
|
||||
<summary>
|
||||
Gets or sets the value associated with the specified key.
|
||||
</summary>
|
||||
<param name="key">The key of the value to get or set.</param>
|
||||
<returns>The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new element with the specified key.</returns>
|
||||
<remarks>
|
||||
When working with multiple threads, that can each potentialy remove the searched for item, a <see cref="T:System.Collections.Generic.KeyNotFoundException"/> can always be expected.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentDictionary`2.Count">
|
||||
<summary>
|
||||
Gets the number of elements contained in the <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.ConcurrentDictionary`2.System#Collections#Generic#ICollection{System#Collections#Generic#KeyValuePair{TKey@TValue}}#IsReadOnly">
|
||||
<summary>
|
||||
Gets a value indicating whether the <see cref="T:TvdP.Collections.ConcurrentDictionaryKey`2"/> is read-only, which is always false.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TvdP.Collections.Segment`2">
|
||||
<summary>
|
||||
A 'single writer - multi reader' threaded segment in a hashtable.
|
||||
</summary>
|
||||
<typeparam name="TStored"></typeparam>
|
||||
<typeparam name="TSearch"></typeparam>
|
||||
<remarks>
|
||||
Though each segment can be accessed by 1 writer thread simultaneously, the hashtable becomes concurrent
|
||||
for writing by containing many segments so that collisions are rare. The table will be fully concurrent
|
||||
for read operations as far as they are not colliding with write operations.
|
||||
Each segment is itself a small hashtable that can grow and shrink individualy. This prevents blocking of
|
||||
the entire hashtable when growing or shrinking is needed. Because each segment is relatively small (depending on
|
||||
the quality of the hash) resizing of the individual segments should not take much time.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.Initialize(System.Int32)">
|
||||
<summary>
|
||||
Initialize the segment.
|
||||
</summary>
|
||||
<param name="initialSize"></param>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.Welcome(TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
When segment gets introduced into hashtable then its allocated space should be added to the
|
||||
total allocated space.
|
||||
Single threaded access or locking is needed
|
||||
</summary>
|
||||
<param name="traits"></param>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.Bye(TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
When segment gets removed from hashtable then its allocated space should be subtracted to the
|
||||
total allocated space.
|
||||
Single threaded access or locking is needed
|
||||
</summary>
|
||||
<param name="traits"></param>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.Segment`2._List">
|
||||
<summary>
|
||||
Array with 'slots'. Each slot can be filled or empty.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.InsertItemAtIndex(System.UInt32,System.UInt32,`0,TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Inserts an item into a *not empty* spot given by position i. It moves items forward until an empty spot is found.
|
||||
</summary>
|
||||
<param name="mask"></param>
|
||||
<param name="i"></param>
|
||||
<param name="itemCopy"></param>
|
||||
<param name="traits"></param>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.FindItem(`1@,`0@,TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Find item in segment.
|
||||
</summary>
|
||||
<param name="key">Reference to the search key to use.</param>
|
||||
<param name="item">Out reference to store the found item in.</param>
|
||||
<param name="traits">Object that tells this segment how to treat items and keys.</param>
|
||||
<returns>True if an item could be found, otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.GetOldestItem(`0@,`0@,TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Find an existing item or, if it can't be found, insert a new item.
|
||||
</summary>
|
||||
<param name="key">Reference to the item that will be inserted if an existing item can't be found. It will also be used to search with.</param>
|
||||
<param name="item">Out reference to store the found item or, if it can not be found, the new inserted item.</param>
|
||||
<param name="traits">Object that tells this segment how to treat items and keys.</param>
|
||||
<returns>True if an existing item could be found, otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.InsertItem(`0@,`0@,TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Inserts an item in the segment, possibly replacing an equal existing item.
|
||||
</summary>
|
||||
<param name="key">A reference to the item to insert.</param>
|
||||
<param name="item">An out reference where any replaced item will be written to, if no item was replaced the new item will be written to this reference.</param>
|
||||
<param name="traits">Object that tells this segment how to treat items and keys.</param>
|
||||
<returns>True if an existing item could be found and is replaced, otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.RemoveItem(`1@,`0@,TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Removes an item from the segment.
|
||||
</summary>
|
||||
<param name="key">A reference to the key to search with.</param>
|
||||
<param name="item">An out reference where the removed item will be stored or default(<typeparamref name="TStored"/>) if no item to remove can be found.</param>
|
||||
<param name="traits">Object that tells this segment how to treat items and keys.</param>
|
||||
<returns>True if an item could be found and is removed, false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.GetNextItem(System.Int32,`0@,TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Iterate over items in the segment.
|
||||
</summary>
|
||||
<param name="beyond">Position beyond which the next filled slot will be found and the item in that slot returned. (Starting with -1)</param>
|
||||
<param name="item">Out reference where the next item will be stored or default if the end of the segment is reached.</param>
|
||||
<param name="traits">Object that tells this segment how to treat items and keys.</param>
|
||||
<returns>The index position the next item has been found or -1 otherwise.</returns>
|
||||
</member>
|
||||
<member name="F:TvdP.Collections.Segment`2._Count">
|
||||
<summary>
|
||||
Total numer of filled slots in _List.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Collections.Segment`2.Trim(TvdP.Collections.ConcurrentHashtable{`0,`1})">
|
||||
<summary>
|
||||
Remove any excess allocated space
|
||||
</summary>
|
||||
<param name="traits"></param>
|
||||
</member>
|
||||
<member name="P:TvdP.Collections.Segment`2.IsAlive">
|
||||
<summary>
|
||||
Boolean value indicating if this segment has not been trashed yet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TvdP.Threading.TinyReaderWriterLock">
|
||||
<summary>
|
||||
Tiny spin lock that allows multiple readers simultanously and 1 writer exclusively
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Threading.TinyReaderWriterLock.ReleaseForReading">
|
||||
<summary>
|
||||
Release a reader lock
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Threading.TinyReaderWriterLock.ReleaseForWriting">
|
||||
<summary>
|
||||
Release a writer lock
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Threading.TinyReaderWriterLock.LockForReading">
|
||||
<summary>
|
||||
Aquire a reader lock. Wait until lock is aquired.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Threading.TinyReaderWriterLock.LockForReading(System.Boolean)">
|
||||
<summary>
|
||||
Aquire a reader lock.
|
||||
</summary>
|
||||
<param name="wait">True if to wait until lock aquired, False to return immediately.</param>
|
||||
<returns>Boolean indicating if lock was successfuly aquired.</returns>
|
||||
</member>
|
||||
<member name="M:TvdP.Threading.TinyReaderWriterLock.LockForWriting">
|
||||
<summary>
|
||||
Aquire a writer lock. Wait until lock is aquired.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TvdP.Threading.TinyReaderWriterLock.LockForWriting(System.Boolean)">
|
||||
<summary>
|
||||
Aquire a writer lock.
|
||||
</summary>
|
||||
<param name="wait">True if to wait until lock aquired, False to return immediately.</param>
|
||||
<returns>Boolean indicating if lock was successfuly aquired.</returns>
|
||||
</member>
|
||||
<member name="T:System.SerializableAttribute">
|
||||
<summary>
|
||||
Attempts to replicate the Desktop CLR.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Binary file not shown.
@ -0,0 +1,237 @@
|
||||
C# Driver Version 1.4.1 Release Notes
|
||||
=====================================
|
||||
|
||||
This minor release fixes a few issues found by users of the LINQ support added
|
||||
in v1.4 of the C# driver and also adds support for a few new LINQ query
|
||||
operators and where clauses.
|
||||
|
||||
File by file change logs are available at:
|
||||
|
||||
https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Change%20Log%20v1.4.1-Bson.txt
|
||||
https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Change%20Log%20v1.4.1-Driver.txt
|
||||
|
||||
These release notes describe the changes at a higher level, and omit describing
|
||||
some of the minor changes.
|
||||
|
||||
Breaking changes
|
||||
----------------
|
||||
|
||||
There are no breaking changes in this release.
|
||||
|
||||
JIRA issues resolved
|
||||
--------------------
|
||||
|
||||
The full list of JIRA issues resolved in this release is available at:
|
||||
|
||||
https://jira.mongodb.org/secure/IssueNavigator.jspa?mode=hide&requestId=11397
|
||||
|
||||
LINQ query support
|
||||
==================
|
||||
|
||||
The main purpose of this minor release is to fix some issues found by users of
|
||||
the new LINQ support added in v1.4.
|
||||
|
||||
One bug that many have encountered is a NullReferenceException when writing a
|
||||
query against an inherited property.
|
||||
|
||||
https://jira.mongodb.org/browse/CSHARP-418
|
||||
|
||||
You would hit this error if you had any queries that were similar to this:
|
||||
|
||||
public class B
|
||||
{
|
||||
public ObjectId Id;
|
||||
}
|
||||
|
||||
public class C : B
|
||||
{
|
||||
public int X;
|
||||
}
|
||||
|
||||
var query =
|
||||
from c in collection.AsQueryable<C>()
|
||||
where c.Id = id // class C inherits Id from class B
|
||||
select c;
|
||||
|
||||
Another bug that a few users have encountered is an ArgumentOutOfRangeException
|
||||
when writing a LINQ query that consists of a bare AsQueryable and nothing else:
|
||||
|
||||
https://jira.mongodb.org/browse/CSHARP-419
|
||||
|
||||
as in this sample:
|
||||
|
||||
var query = collection.AsQueryable<C>(); // no where clause
|
||||
|
||||
Normally a query would contain something else besides the call to AsQueryable
|
||||
(like a where clause), but this is a legal query and is now supported.
|
||||
|
||||
BSON library changes
|
||||
====================
|
||||
|
||||
MaxSerializationDepth
|
||||
---------------------
|
||||
|
||||
The BSON serialization mechanism does not support circular references in your
|
||||
object graph. In earlier versions of the C# driver if you attempted to
|
||||
serialize an object with circular references you would get a
|
||||
StackOverflowExpection. The 1.4.1 version now tracks the serialization depth
|
||||
as it serializes an object and if it exceeds MaxSerializationDepth a
|
||||
BsonSerializationException is thrown. The problem with StackOverflowException
|
||||
was that it was fatal to your process, but the BsonSerializationException can
|
||||
be caught and your process can continue executing if you choose.
|
||||
|
||||
The default MaxSerializationDepth is 100.
|
||||
|
||||
Interpretation of C# null vs BsonNull.Value
|
||||
-------------------------------------------
|
||||
|
||||
When working with the BsonDocument object model a C# null is usually ignored,
|
||||
specially when creating BsonDocuments using functional construction. However,
|
||||
when mapping between .NET types and the BsonDocument object model a C# null
|
||||
will now be mapped to a BsonNull. For example:
|
||||
|
||||
var dictionary = new Dictionary<string, object> { { "x", null } };
|
||||
var document = new BsonDocument(dictionary);
|
||||
// document["x"] == BsonNull.Value
|
||||
|
||||
and when mapping in the reverse direction a BsonNull will map to a C# null:
|
||||
|
||||
var document = new BsonDocument { { "x", BsonNull.Value } };
|
||||
var dictionary = document.ToDictionary();
|
||||
// dictionary["x"] == null
|
||||
|
||||
Usually mapping between .NET types and the BsonDocument object model happens
|
||||
automatically as needed, but if you want to invoke the mapping yourself you
|
||||
can access the BsonTypeMapper directly:
|
||||
|
||||
var dictionary = new Dictionary<string, object> { { "x", null } };
|
||||
var document = BsonTypeMapper.MapToBsonValue(dictionary);
|
||||
// document["x"] == BsonNull.Value
|
||||
|
||||
or in the other direction:
|
||||
|
||||
var document = new BsonDocument { { "x", BsonNull.Value } };
|
||||
var dictionary = (IDictionary<string, object>)BsonTypeMapper.MapToDotNetValue(document);
|
||||
// dictionary["x"] == null
|
||||
|
||||
Serializing read-only properties
|
||||
--------------------------------
|
||||
|
||||
The class map based serialization support normally serializes only public
|
||||
read-write properties (or fields). Sometimes it can be useful to serialize
|
||||
read-only properties as well, specially if you want to query against them.
|
||||
You can now opt-in your read-only properties so that they appear in the
|
||||
serialized document. For example:
|
||||
|
||||
public class Book
|
||||
{
|
||||
public ObjectId Id;
|
||||
public string Title;
|
||||
[BsonElement] // opt-in the read-only LowercaseTitle property
|
||||
public string LowercaseTitle { get { return Title.ToLower(); } }
|
||||
}
|
||||
|
||||
Now when a Book is serialized the document will look like:
|
||||
|
||||
{
|
||||
_id : ObjectId("4f8d771dae879111d289dbc0"),
|
||||
Title : "For Whom the Bell Tolls",
|
||||
LowercaseTitle : "for whom the bell tolls"
|
||||
}
|
||||
|
||||
During deserialization any elements in the serialized document that
|
||||
correspond to read-only properties are ignored.
|
||||
|
||||
Driver changes
|
||||
==============
|
||||
|
||||
MongoServer
|
||||
-----------
|
||||
|
||||
There is a new method called IsDatabaseNameValid that you can call to test if
|
||||
a database name is valid.
|
||||
|
||||
MongoDatabase
|
||||
-------------
|
||||
|
||||
There is a new method called IsCollectionNameValid that you can call to test if a
|
||||
collection name is valid.
|
||||
|
||||
MongoGridFS
|
||||
-----------
|
||||
|
||||
You can now disable computing the MD5 at the server when uploading a GridFS
|
||||
file. You can also disable the client side verification of the MD5 that is
|
||||
normally done on Upload or Download. The reason you might choose to disable
|
||||
MD5 verification is that it is computationally expensive to compute the MD5.
|
||||
|
||||
LINQ OfType\<T\> query operator
|
||||
-------------------------------
|
||||
|
||||
You can now use the OfType\<T\> query operator in LINQ queries. For example:
|
||||
|
||||
var query = collection.AsQueryable<B>().OfType<C>();
|
||||
|
||||
this generates a query against the "_t" discriminator value that is used to
|
||||
identify the actual type of a serialized document.
|
||||
|
||||
Additional expressions supported in LINQ where clauses
|
||||
------------------------------------------------------
|
||||
|
||||
The following expressions are now supported in LINQ where clauses:
|
||||
|
||||
// d is the document
|
||||
// p is a property of the document
|
||||
// c is a character constant
|
||||
// ca is an array of character constants
|
||||
// s is a string constant
|
||||
// i, j, k, n are integer constants
|
||||
|
||||
where d.p.Equals(constant)
|
||||
where string.IsNullOrEmpty(d.p)
|
||||
where d.p.IndexOf(c) == i
|
||||
where d.p.IndexOf(c, j) == i
|
||||
where d.p.IndexOf(c, j, k) == i
|
||||
where d.p.IndexOf(s) == i
|
||||
where d.p.IndexOf(s, j) == i
|
||||
where d.p.IndexOf(s, j, k) == i
|
||||
where d.p.IndexOfAny(ca) == i
|
||||
where d.p.IndexOfAny(ca, j) == i
|
||||
where d.p.IndexOfAny(ca, j, k) == i
|
||||
where d.p[i] == c
|
||||
where d.p.Length == n
|
||||
where d.p.ToLower().Contains("xyz")
|
||||
where d.p.ToLower().StartsWith("xyz")
|
||||
where d.p.ToLower().EndsWith("xyz")
|
||||
where d.p.ToUpper().Contains("xyz")
|
||||
where d.p.ToUpper().StartsWith("xyz")
|
||||
where d.p.ToUpper().EndsWith("xyz")
|
||||
where d.p.Trim().Contains("xyz")
|
||||
where d.p.Trim().StartsWith("xyz")
|
||||
where d.p.Trim().EndsWith("xyz")
|
||||
where d.p.TrimStart().Contains("xyz")
|
||||
where d.p.TrimStart().StartsWith("xyz")
|
||||
where d.p.TrimStart().EndsWith("xyz")
|
||||
where d.p.TrimEnd().Contains("xyz")
|
||||
where d.p.TrimEnd().StartsWith("xyz")
|
||||
where d.p.TrimEnd().EndsWith("xyz")
|
||||
where d.GetType() == typeof(T)
|
||||
where d is T
|
||||
|
||||
// you can use any combination of ToLower/ToUpper/Trim/TrimStart/TrimEnd
|
||||
// before Contains/StartsWith/EndsWith
|
||||
|
||||
In the 1.4 version of the C# driver the constant always had to appear on the
|
||||
right of a comparison operator. That restriction is lifted in 1.4.1 so now the
|
||||
following are equivalent:
|
||||
|
||||
where d.Height < 60
|
||||
where 60 > d.Height
|
||||
|
||||
Type of \<T\> in AsQueryable can now be deduced
|
||||
-----------------------------------------------
|
||||
|
||||
The type of \<T\> in the call to AsQueryable can now be deduced from the collection argument:
|
||||
|
||||
var collection = database.GetCollection<MyDocument>("mydocuments")
|
||||
var query = collection.AsQueryable(); // <T> is deduced to be MyDocument
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,348 +0,0 @@
|
||||
C# Driver Version 1.4 Release Notes
|
||||
===================================
|
||||
|
||||
The major feature of this release is support for LINQ queries. Some of the other
|
||||
changes (e.g. new IBsonSerializer methods) are also in support of the new LINQ
|
||||
implementation.
|
||||
|
||||
File by file change logs are available at:
|
||||
|
||||
https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Change%20Log%20v1.4-Bson.txt
|
||||
https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Change%20Log%20v1.4-Driver.txt
|
||||
|
||||
These release notes describe the changes at a higher level, and omit describing
|
||||
some of the minor changes.
|
||||
|
||||
Breaking changes
|
||||
----------------
|
||||
|
||||
There are some breaking changes in this release. Some of them are only breaking
|
||||
at the binary level and are easily taken care of by simply recompiling your
|
||||
application. Others require minor changes to your source code. Many of the
|
||||
breaking changes are in low level classes, and these won't affect most users,
|
||||
unless for example you are doing things like writing custom serializers.
|
||||
|
||||
Please read these release notes carefully before adopting the new 1.4 release
|
||||
of the C# driver to determine if any of the breaking changes affect you.
|
||||
|
||||
LINQ query support
|
||||
------------------
|
||||
|
||||
As stated previously, the major feature of this release is support for LINQ
|
||||
queries. These release notes don't describe the new LINQ support, for that
|
||||
please refer to the online LINQ tutorial at:
|
||||
|
||||
http://www.mongodb.org/display/DOCS/CSharp+Driver+LINQ+Tutorial
|
||||
|
||||
(Please note that the LINQ tutorial won't be available until several weeks
|
||||
after the 1.4 release has been shipped. Sorry.)
|
||||
|
||||
CLS compliance
|
||||
--------------
|
||||
|
||||
Both the MongoDB.Bson.dll and MongoDB.Driver.dll libraries have been marked
|
||||
as CLS compliant, which should make them more useful from other .NET languages.
|
||||
Most of the changes required to make the libraries CLS compliant are not even
|
||||
visible in the public interface.
|
||||
|
||||
Release builds
|
||||
--------------
|
||||
|
||||
Starting with the 1.4 version we are shipping Release builds of the DLLs.
|
||||
|
||||
Code formatting changes
|
||||
-----------------------
|
||||
|
||||
In response to popular demand the code base has been reformatted using the
|
||||
default Visual Studio C# code formatting settings. We have also adopted
|
||||
the convention of prefixing instance field names with a single "_" and static
|
||||
fields names with a double "__" (while this convention for static fields is
|
||||
not common it is very useful). One of the nice benefits of these conventions
|
||||
is that the drop down menu in Visual Studio that displays class members ends
|
||||
up grouping all static fields first, followed by instance fields, followed by
|
||||
the rest of the properties and methods.
|
||||
|
||||
BSON library changes
|
||||
====================
|
||||
|
||||
ArraySerializationOptions
|
||||
-------------------------
|
||||
|
||||
This new class allows you to specify serialization options for array-like
|
||||
members. Initially the only option available is to specify serialization
|
||||
options for the items of the array. When using attributes to specify
|
||||
serialization options any attributes that don't apply to the collection as a
|
||||
whole implictly apply to the items of the collection.
|
||||
|
||||
BsonDateTime is now a pure BSON DateTime value
|
||||
----------------------------------------------
|
||||
|
||||
In previous versions the BsonDateTime class stored its value twice in two
|
||||
different private fields: _millisecondsSinceEpoch (a long) and _value (a .NET
|
||||
DateTime). The idea was that you could store a .NET DateTime without losing any
|
||||
precision. However, that turns out to be confusing because as soon as you save
|
||||
the BsonDateTime value to the database and read it back you are going to lose
|
||||
precision anyway, so you might as well lose it right up front and not make
|
||||
false promises.
|
||||
|
||||
BsonDateTime also has two new helper methods: ToLocalTime and ToUniversalTime.
|
||||
These methods convert the BSON DateTime to either local or UTC .NET DateTime
|
||||
values. There are also new AsLocalTime and AsUniversalTime properties in
|
||||
BsonValues that can be used to convert BsonValues to .NET DateTime values (like
|
||||
all AsXyz properties in BsonValue they throw an InvalidCastException if the
|
||||
BsonValue is not actually a BsonDateTime).
|
||||
|
||||
BsonIgnoreExtraElements attribute
|
||||
---------------------------------
|
||||
|
||||
The BsonIgnoreExtraElements attribute has a new property called Inherited. If
|
||||
this property is set to true then all classes derived from this one will
|
||||
automatically inherit this setting, which makes it easy to set it for an
|
||||
entire class hierarchy at once.
|
||||
|
||||
BsonIgnoreIfDefault attribute
|
||||
-----------------------------
|
||||
|
||||
This new attribute allows you to specify that you want a field to be ignored
|
||||
during serialization if it is equal to the default value. This replaces the
|
||||
SerializeDefaultValue parameter of the BsonDefaultValue attribute. By making
|
||||
this a separate attribute you can specify that you want the default value
|
||||
ignored without having to specify the default value as well.
|
||||
|
||||
BsonReader: CurrentBsonType vs GetCurrentBsonType
|
||||
-------------------------------------------------
|
||||
|
||||
In previous versions the CurrentBsonType property had side effects. In general
|
||||
it is bad form for the get accessor of a property to have side effects, as even
|
||||
something as simple as looking at the value of the property in a debugger can
|
||||
have unintended consequences. Therefore, in the 1.4 release the CurrentBsonType
|
||||
property has no side effects. The previous behavior is now implemented in the
|
||||
GetCurrentBsonType method. While this is mostly an internal change, *if* you
|
||||
have written a custom serializer that used the CurrentBsonType property and
|
||||
were relying on its side effects you will have to change your custom serializer
|
||||
to call GetCurrentBsonType instead.
|
||||
|
||||
ConventionProfile new conventions
|
||||
---------------------------------
|
||||
|
||||
The ConventionProfile class has two new conventions: IgnoreIfDefaultConvention
|
||||
and SerializationOptionsConvention. Also, the SerializeDefaultValueConvention
|
||||
has been obsoleted in favor of the new IgnoreIfDefaultConvention.
|
||||
|
||||
DictionarySerializationOptions
|
||||
------------------------------
|
||||
|
||||
This class has a new property called ItemSerializationOptions that can be used
|
||||
to specify the options to use when serializing the value of the items in the
|
||||
dictionary. When using attributes to specify serialization options, any
|
||||
attributes that don't apply to the dictionary as a whole implicitly apply to
|
||||
the value of the items in the dictionary.
|
||||
|
||||
ExtraElements
|
||||
-------------
|
||||
|
||||
Previous versions of the C# driver allowed you to specify a field of the class
|
||||
to be used to store any extra elements encountered during deserialization.
|
||||
However, this field *had* to be of type BsonDocument, which meant introducing
|
||||
a dependency on the driver into your data model classes (which some developers
|
||||
don't want to do). You now have the additional option of declaring your
|
||||
ExtraElements field to be of type IDictionary\<string, object\> instead.
|
||||
|
||||
IBsonSerializationOptions
|
||||
-------------------------
|
||||
|
||||
The IBsonSerializationOptions has several new methods. ApplyAttribute is used
|
||||
during the AutoMap process to apply an attribute to some serialization options
|
||||
that are being built incrementally (starting from the default serialization
|
||||
options). This provides an extensible mechanism for applying new attributes to
|
||||
new serialization options classes. The Clone and Freeze methods are introduced
|
||||
to allow serialization options to be converted to read-only once initialization
|
||||
is complete to provide thread safety.
|
||||
|
||||
IBsonSerializer
|
||||
---------------
|
||||
|
||||
The IBsonSerializer has several new methods. GetDefaultSerializationOptions
|
||||
provides an initial set of serialization options that any serialization
|
||||
attributes found can be applied against. GetItemSerializationInfo provides
|
||||
serialization info about the items and applies only to serializers for
|
||||
collection-like classes. GetMemberSerializationInfo provides serialization
|
||||
info about members of a class. The last two are used in the implementation
|
||||
of LINQ queries.
|
||||
|
||||
Image/Bitmap serializers
|
||||
------------------------
|
||||
|
||||
New serializers have been provided for the Image abstract base class and the
|
||||
Bitmap class derived from it.
|
||||
|
||||
ISupportInitialize
|
||||
------------------
|
||||
|
||||
The ISupportInitialize interface defines two methods: BeginInit and EndInit.
|
||||
The BsonClassMapSerializer now checks whether the class being deserialized
|
||||
implements this interface, and if so, calls BeginInit just before it starts
|
||||
to deserialize a class, and EndInit just after it has finished. You can
|
||||
use this feature to do any pre- or post-processing.
|
||||
|
||||
ObjectId/BsonObjectId creation
|
||||
------------------------------
|
||||
|
||||
ObjectId (and BsonObjectId) have a new constructor that allows you to supply
|
||||
the timestamp as a .NET DateTime value and it will automatically be converted
|
||||
to seconds since the Unix Epoch. These new constructors are useful if you want
|
||||
to create artificial ObjectIds to use in range based ObjectId queries (in
|
||||
which case you will usually set the machine, pid and increment fields to zero).
|
||||
|
||||
There are also two new overloads of GenerateNewId that allow you to provide
|
||||
the desired timestamp as either an int or a .NET DateTime. These new overloads
|
||||
are useful if you need to create backdated ObjectIds. When generating backdated
|
||||
ObjectIds there is a slight risk that you might create an ObjectId that is
|
||||
not unique (but that risk is very small).
|
||||
|
||||
TimeSpanSerializationOptions
|
||||
----------------------------
|
||||
|
||||
You can now choose any of the following representations for a TimeSpan: string,
|
||||
double, Int32 or Int64. In addition, when using any of the numeric
|
||||
representations, you can use the Units property to choose the units that the
|
||||
numeric value is in (choose from: Ticks, Days, Hours, Minutes, Seconds,
|
||||
Milliseconds and Nanoseconds).
|
||||
|
||||
Driver changes
|
||||
==============
|
||||
|
||||
Authentication support improved
|
||||
-------------------------------
|
||||
|
||||
Operations that require admin credentials previously required you to set the
|
||||
DefaultCredentials of MongoServerSetttings to admin credentials. But that is
|
||||
undesirable because it provides the client code full access to all databases,
|
||||
essentially negating the benefit of using authentication in the first place.
|
||||
In the 1.4 release all operations that require admin credentials have a new
|
||||
overload where you can provide the needed credentials; you no longer have to
|
||||
set the DefaultCredentials. Another option is to store credentials for the
|
||||
admin database in the new MongoCredentialsStore.
|
||||
|
||||
Connection pool defaults changed
|
||||
--------------------------------
|
||||
|
||||
The default value of WaitQueueMultiple has been changed from 1.0 to 5.0 and the
|
||||
default value of WaitQueueTimeout has been changed from 0.5 seconds to 2
|
||||
minutes. These new values are taken from the Java driver, where they have
|
||||
reportedly been working well for users running under heavy loads. These new
|
||||
values mean that many more threads can be waiting for a longer time before a
|
||||
timeout exception is thrown.
|
||||
|
||||
Exceptions are no longer caught and rethrown when possible
|
||||
----------------------------------------------------------
|
||||
|
||||
Wherever possible exception handling code that used to use catch exceptions
|
||||
and rethrow them after processing them has been changed to roughly equivalent
|
||||
code that uses try/finally to accomplish the same objective. This is specially
|
||||
helpful if you are running the debugger set to stop whenever an exception is
|
||||
thrown.
|
||||
|
||||
IBsonSerializable semi-deprecated
|
||||
---------------------------------
|
||||
|
||||
The LINQ support relies heavily on the new methods added to IBsonSerializer.
|
||||
Because of this it is highly encouraged that *if* you have to handle your own
|
||||
serialization that you always opt to write an IBsonSerializer for your class
|
||||
instead of having it implement IBsonSerializable (see the notes for MongoDBRef
|
||||
and SystemProfileInfo for examples of where the driver itself has switched
|
||||
from IBsonSerializable to using a IBsonSerializer). IBsonSerializable still
|
||||
has a modest role to play in classes that just need to be serialized quickly
|
||||
and simply and for which we won't be writing LINQ queries (for example, the
|
||||
driver's Builders and Wrappers still use IBsonSerializable).
|
||||
|
||||
LINQ query support
|
||||
------------------
|
||||
|
||||
As mentioned earlier in the release notes more information about the new
|
||||
support for LINQ queries can be found in the forthcoming LINQ tutorial:
|
||||
|
||||
http://www.mongodb.org/display/DOCS/CSharp+Driver+LINQ+Tutorial
|
||||
|
||||
Locking issues
|
||||
--------------
|
||||
|
||||
A number of locking issues related to connection pooling have been resolved.
|
||||
These issues were particularly likely to occur if you had more threads than
|
||||
the maximum size of the connection pool and were using the connections heavily
|
||||
enough that the connection pool could be used up.
|
||||
|
||||
MongoCredentialsStore
|
||||
---------------------
|
||||
|
||||
You can now create a credentials store which contains credentials for multiple
|
||||
databases (the name of the database is the key and the credentials are the
|
||||
value). The credentials store must be set up (in the MongoServerSettings)
|
||||
before you call MongoServer.Create, so it is only intended for scenarios
|
||||
where you have a fixed set of credentials that aren't going to change at runtime.
|
||||
|
||||
MongoDBRef no longer implements IBsonSerializable
|
||||
-------------------------------------------------
|
||||
|
||||
MongoDBRef used to handle its own serialization by virtue of implementing
|
||||
IBsonSerializable. But the IBsonSerializable interface is not helpful when we
|
||||
try to add support for writing LINQ queries against components of a MongoDBRef.
|
||||
Instead, there is now a MongoDBRefSerializer which handles serialization of
|
||||
MongoDBRefs, as well as implementing GetMemberSerializationInfo which enables
|
||||
the LINQ implementation to support LINQ queries against MongoDBRefs.
|
||||
|
||||
MongoInsertOptions/MongoUpdateOptions constructor changed
|
||||
---------------------------------------------------------
|
||||
|
||||
The constructors for MongoInsertOptions and MongoUpdateOptions used to require
|
||||
that the collection be passed in as a parameter. The purpose was to allow
|
||||
the constructor to inherit some of the options from the collection settings.
|
||||
To the developer however, this was awkward, as it required providing the
|
||||
collection where it seemed to be redundant. By handling default values in a
|
||||
different way we no longer require the collection to be supplied to the
|
||||
constructors. The old constructors (that require the collection parameter) are
|
||||
still temporarily supported but have been marked as deprecated with a warning.
|
||||
|
||||
MongoServer Admin properties and methods removed
|
||||
------------------------------------------------
|
||||
|
||||
The following Admin properties and methods have been removed from MongoServer:
|
||||
AdminDatabase, GetAdminDatabase, RunAdminCommand, and RunAdminCommandAs. The
|
||||
reason for removing them is that many developers would never use them anyway,
|
||||
and adding new overloads for providing admin credentials would have resulted
|
||||
in even more of these rarely used properties and methods. If you were using
|
||||
any of these methods or properties they can easily be replaced with calls to
|
||||
methods of an instance of MongoDatabase (use one of the overloads of
|
||||
GetDatabase with "admin" as the database name to get a reference to the admin
|
||||
database).
|
||||
|
||||
RequestStart/RequestDone
|
||||
------------------------
|
||||
|
||||
Recall that the purpose of RequestStart is to tell the driver that a series of
|
||||
operations should all be done using the same connection (which in the case of a
|
||||
replica set also implies using the same member of the connection set). Which
|
||||
member of a replica set was chosen depended on the slaveOk parameter: a value
|
||||
of false meant that the primary had to be used, and a value of true meant that
|
||||
an arbitrary secondary could be used. A new overload of RequestStart now allows
|
||||
the caller to specify which member should be used, which can be very useful for
|
||||
implementing custom query routing algorithms or for querying specific members
|
||||
of a replica set. In general though, keep in mind that you should *not* be
|
||||
using RequestStart unless you have an unusual scenario which requires it.
|
||||
|
||||
SocketTimeout default changed
|
||||
-----------------------------
|
||||
|
||||
The default value for SocketTimeout has been changed from 30 seconds to 0,
|
||||
which is a special value meaning to use the operating system default value,
|
||||
which in turn is infinity. If you actually want a SocketTimeout you now
|
||||
have to set it yourself. The SocketTimeout is currently a server level setting,
|
||||
but most likely in a future release it will be possible to set it at other
|
||||
levels, including for individual operations.
|
||||
|
||||
SystemProfileInfo no longer implements IBsonSerializable
|
||||
--------------------------------------------------------
|
||||
|
||||
See the notes for MongoDBRef. SystemProfileInfo no longer implements
|
||||
IBsonSerializable for the same reasons, and there is a new
|
||||
SystemProfileInfoSerializer instead.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue