Skip to content

Commit 5ab8b4d

Browse files
committed
chore: Update/Added XML in the project
1 parent c00f3ab commit 5ab8b4d

File tree

126 files changed

+1168
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1168
-131
lines changed

src/Examine.Core/BaseIndexProvider.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public abstract class BaseIndexProvider : IIndex
1818
/// <summary>
1919
/// Constructor for creating an indexer at runtime
2020
/// </summary>
21+
/// <param name="loggerFactory"></param>
2122
/// <param name="name"></param>
22-
/// <param name="fieldDefinitions"></param>
23-
/// <param name="validator"></param>
23+
/// <param name="indexOptions"></param>
2424
protected BaseIndexProvider(ILoggerFactory loggerFactory, string name,
2525
IOptionsMonitor<IndexOptions> indexOptions)
2626
{
@@ -33,7 +33,15 @@ protected BaseIndexProvider(ILoggerFactory loggerFactory, string name,
3333
_indexOptions = indexOptions.GetNamedOptions(name);
3434
}
3535

36+
/// <summary>
37+
/// Represents a type used to configure the logging system and create instances of
38+
/// <see cref="ILogger"/> from the registered Microsoft.Extensions.Logging.ILoggerProviders.
39+
/// </summary>
3640
protected ILoggerFactory LoggerFactory { get; }
41+
42+
/// <summary>
43+
/// The index name
44+
/// </summary>
3745
public virtual string Name { get; }
3846

3947
/// <summary>
@@ -73,6 +81,9 @@ protected abstract void PerformDeleteFromIndex(IEnumerable<string> itemIds,
7381

7482
#region IIndex members
7583

84+
/// <summary>
85+
/// The default searcher of the index
86+
/// </summary>
7687
public abstract ISearcher Searcher { get; }
7788

7889
/// <inheritdoc />
@@ -125,6 +136,10 @@ public void DeleteFromIndex(IEnumerable<string> itemIds)
125136

126137
#region Protected Event callers
127138

139+
/// <summary>
140+
/// Run when a index operation completes
141+
/// </summary>
142+
/// <param name="e"></param>
128143
protected void OnIndexOperationComplete(IndexOperationEventArgs e) => IndexOperationComplete?.Invoke(this, e);
129144

130145
/// <summary>

src/Examine.Core/BaseSearchProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ namespace Examine
88
///</summary>
99
public abstract class BaseSearchProvider : ISearcher
1010
{
11+
/// <inheritdoc/>
1112
protected BaseSearchProvider(string name)
1213
{
1314
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(name));
1415
Name = name;
1516
}
1617

18+
/// <inheritdoc/>
1719
public string Name { get; }
1820

1921
/// <summary>
2022
/// Searches the index
2123
/// </summary>
2224
/// <param name="searchText"></param>
23-
/// <param name="maxResults"></param>
25+
/// <param name="options"></param>
2426
/// <returns></returns>
2527
public abstract ISearchResults Search(string searchText, QueryOptions options = null);
2628

src/Examine.Core/DisposableObjectSlim.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
namespace Examine
44
{
@@ -10,11 +10,13 @@ public abstract class DisposableObjectSlim : IDisposable
1010
{
1111
private readonly object _locko = new object();
1212

13-
// gets a value indicating whether this instance is disposed.
14-
// for internal tests only (not thread safe)
13+
/// <summary>
14+
/// Gets a value indicating whether this instance is disposed.
15+
/// for internal tests only (not thread safe)
16+
/// </summary>
1517
protected bool Disposed { get; private set; }
1618

17-
// implements IDisposable
19+
/// <inheritdoc/>
1820
public void Dispose()
1921
{
2022
Dispose(true);
@@ -32,6 +34,9 @@ private void Dispose(bool disposing)
3234
DisposeResources();
3335
}
3436

37+
/// <summary>
38+
/// Used to dispose resources
39+
/// </summary>
3540
protected abstract void DisposeResources();
3641
}
37-
}
42+
}

src/Examine.Core/EmptySearchResults.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,45 @@
44

55
namespace Examine
66
{
7+
/// <summary>
8+
/// Represents <see cref="ISearchResults"/> with no elements
9+
/// </summary>
710
public sealed class EmptySearchResults : ISearchResults
811
{
912
private EmptySearchResults()
1013
{
1114
}
1215

16+
/// <summary>
17+
/// Gets the static instance
18+
/// </summary>
1319
public static ISearchResults Instance { get; } = new EmptySearchResults();
1420

21+
/// <inheritdoc/>
1522
public IEnumerator<ISearchResult> GetEnumerator()
1623
{
1724
return Enumerable.Empty<ISearchResult>().GetEnumerator();
1825
}
1926

20-
IEnumerator IEnumerable.GetEnumerator()
27+
/// <inheritdoc/>
28+
IEnumerator IEnumerable.GetEnumerator()
2129
{
2230
return Enumerable.Empty<ISearchResult>().GetEnumerator();
2331
}
2432

33+
/// <inheritdoc/>
2534
public long TotalItemCount => 0;
2635

27-
public IEnumerable<ISearchResult> Skip(int skip)
36+
/// <inheritdoc/>
37+
public IEnumerable<ISearchResult> Skip(int skip)
2838
{
2939
return Enumerable.Empty<ISearchResult>();
3040
}
3141

42+
/// <inheritdoc/>
3243
public IEnumerable<ISearchResult> SkipTake(int skip, int? take = null)
3344
{
3445
return Enumerable.Empty<ISearchResult>();
3546
}
3647
}
37-
}
48+
}

src/Examine.Core/Examine.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
77
<Description>Examine is an abstraction for indexing and search operations with implementations such as Lucene.Net</Description>
88
<PackageTags>examine search index</PackageTags>
9+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
910
</PropertyGroup>
1011

1112
<ItemGroup>

src/Examine.Core/ExamineExtensions.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ namespace Examine
88
/// </summary>
99
public static class ExamineExtensions
1010
{
11+
/// <summary>
12+
/// Gets named options from an <see cref="IOptionsMonitor{TOptions}"/>
13+
/// </summary>
14+
/// <typeparam name="T"></typeparam>
15+
/// <param name="optionsMonitor"></param>
16+
/// <param name="name"></param>
17+
/// <returns></returns>
18+
/// <exception cref="InvalidOperationException"></exception>
1119
public static T GetNamedOptions<T>(this IOptionsMonitor<T> optionsMonitor, string name)
1220
where T : class
1321
{
@@ -36,6 +44,11 @@ public static IIndex GetIndex(this IExamineManager examineManager, string indexN
3644
throw new InvalidOperationException("No index found with name " + indexName);
3745
}
3846

47+
/// <summary>
48+
/// Deletes a node from the index
49+
/// </summary>
50+
/// <param name="index"></param>
51+
/// <param name="itemId"></param>
3952
public static void DeleteFromIndex(this IIndex index, string itemId)
4053
{
4154
index.DeleteFromIndex(new[] {itemId});

src/Examine.Core/ExamineFieldNames.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace Examine
22
{
3+
/// <summary>
4+
/// Constant names for speciffic fields
5+
/// </summary>
36
public static class ExamineFieldNames
47
{
58
/// <summary>
@@ -22,6 +25,9 @@ public static class ExamineFieldNames
2225
/// </summary>
2326
public const string ItemIdFieldName = "__NodeId";
2427

28+
/// <summary>
29+
/// Used to store the item type for a document
30+
/// </summary>
2531
public const string ItemTypeFieldName = "__NodeTypeAlias";
2632

2733
/// <summary>

src/Examine.Core/ExamineManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Examine
1010
///</summary>
1111
public class ExamineManager : IDisposable, IExamineManager
1212
{
13+
/// <inheritdoc/>
1314
public ExamineManager(IEnumerable<IIndex> indexes, IEnumerable<ISearcher> searchers)
1415
{
1516
foreach(IIndex i in indexes)
@@ -68,6 +69,8 @@ private ISearcher AddSearcher(ISearcher searcher)
6869
public void Dispose() => Dispose(true);
6970

7071
private bool _disposed = false;
72+
73+
/// <inheritdoc/>
7174
protected virtual void Dispose(bool disposing)
7275
{
7376
if (!_disposed)

src/Examine.Core/FieldDefinition.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ public FieldDefinition(string name, string type)
3030
/// </summary>
3131
public string Type { get; }
3232

33+
/// <inheritdoc/>
3334
public bool Equals(FieldDefinition other) => string.Equals(Name, other.Name) && string.Equals(Type, other.Type);
3435

36+
/// <inheritdoc/>
3537
public override bool Equals(object obj)
3638
{
3739
if (ReferenceEquals(null, obj)) return false;
3840
return obj is FieldDefinition definition && Equals(definition);
3941
}
4042

43+
/// <inheritdoc/>
4144
public override int GetHashCode()
4245
{
4346
unchecked
@@ -46,8 +49,10 @@ public override int GetHashCode()
4649
}
4750
}
4851

52+
/// <inheritdoc/>
4953
public static bool operator ==(FieldDefinition left, FieldDefinition right) => left.Equals(right);
5054

55+
/// <inheritdoc/>
5156
public static bool operator !=(FieldDefinition left, FieldDefinition right) => !left.Equals(right);
5257
}
5358
}

src/Examine.Core/FieldDefinitionCollection.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@
22

33
namespace Examine
44
{
5+
/// <inheritdoc/>
56
public class FieldDefinitionCollection : ReadOnlyFieldDefinitionCollection
67
{
8+
/// <inheritdoc/>
79
public FieldDefinitionCollection(params FieldDefinition[] definitions) : base(definitions)
810
{
911
}
1012

13+
/// <inheritdoc/>
1114
public FieldDefinitionCollection()
1215
{
1316
}
1417

18+
/// <summary>
19+
/// Adds a key/value pair to the System.Collections.Concurrent.ConcurrentDictionary`2
20+
/// by using the specified function if the key does not already exist, or returns
21+
/// the existing value if the key exists.
22+
/// </summary>
23+
/// <param name="fieldName"></param>
24+
/// <param name="add"></param>
25+
/// <returns></returns>
26+
/// <exception cref="ArgumentNullException">fieldName or add is null</exception>
27+
/// <exception cref="OverflowException">The dictionary already contains the maximum number of elements (<see cref="int.MaxValue"/>)</exception>
1528
public FieldDefinition GetOrAdd(string fieldName, Func<string, FieldDefinition> add) => Definitions.GetOrAdd(fieldName, add);
1629

1730
/// <summary>
@@ -20,6 +33,16 @@ public FieldDefinitionCollection()
2033
/// <param name="definition"></param>
2134
public void AddOrUpdate(FieldDefinition definition) => Definitions.AddOrUpdate(definition.Name, definition, (s, factory) => definition);
2235

36+
/// <summary>
37+
/// Attempts to add the specified key and value to the System.Collections.Concurrent.ConcurrentDictionary`2.
38+
/// </summary>
39+
/// <param name="definition"></param>
40+
/// <returns>
41+
/// True if the key/value pair was added to the System.Collections.Concurrent.ConcurrentDictionary`2
42+
/// successfully; false if the key already exists.
43+
/// </returns>
44+
/// <exception cref="ArgumentNullException">definition.Name is null</exception>
45+
/// <exception cref="OverflowException">The dictionary already contains the maximum number of elements (<see cref="int.MaxValue"/>)</exception>
2346
public bool TryAdd(FieldDefinition definition) => Definitions.TryAdd(definition.Name, definition);
2447
}
2548
}

0 commit comments

Comments
 (0)