Skip to content

Commit 6cd7368

Browse files
committed
Add code documentation to FileGdbProvider
1 parent c698036 commit 6cd7368

2 files changed

Lines changed: 42 additions & 5 deletions

File tree

SharpMap.Data.Providers.FileGdb/FileGdbProvider.cs

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
namespace SharpMap.Data.Providers
3131
{
32+
/// <summary>
33+
/// Provider implementation for ESRI File Gdb database
34+
/// </summary>
3235
[Serializable]
3336
public class FileGdbProvider : IProvider
3437
{
@@ -73,10 +76,17 @@ private EsriGdb EsriGdbInstance
7376
[NonSerialized]
7477
private EsriTable _esriTable;
7578

79+
/// <summary>
80+
/// Creates an instance of this class
81+
/// </summary>
7682
public FileGdbProvider()
7783
{
7884
}
7985

86+
/// <summary>
87+
/// Creates an instance of this class, assigning the location of the database
88+
/// </summary>
89+
/// <param name="path">A path to the directory containing the database files.</param>
8090
public FileGdbProvider(string path)
8191
{
8292
_esriGdbLocation = new DirectoryInfo(path);
@@ -93,6 +103,10 @@ public void Dispose()
93103
Dispose(true);
94104
}
95105

106+
/// <summary>
107+
/// Actual implementation for disposing the provider.
108+
/// </summary>
109+
/// <param name="disposing">A flag indicating if this function is called from <see cref="IDisposable.Dispose()"/> or the finalizer.</param>
96110
protected virtual void Dispose(bool disposing)
97111
{
98112
if (IsDisposed)
@@ -110,6 +124,9 @@ protected virtual void Dispose(bool disposing)
110124
}
111125
}
112126

127+
/// <summary>
128+
/// Gets a value indicating if this provider has been disposed.
129+
/// </summary>
113130
public bool IsDisposed { get; private set; }
114131

115132
#endregion
@@ -136,6 +153,10 @@ public string ConnectionID
136153
}
137154

138155
private string _table;
156+
157+
/// <summary>
158+
/// Gets or sets a value indicating the name of the data table.
159+
/// </summary>
139160
public string Table
140161
{
141162
get { return _table; }
@@ -191,11 +212,11 @@ public Collection<IGeometry> GetGeometriesInView(Envelope bbox)
191212
}
192213

193214
/// <summary>
194-
/// Returns all objects whose <see cref="SharpMap.Geometries.BoundingBox"/> intersects 'bbox'.
215+
/// Returns all objects whose <see cref="Envelope"/> intersects 'bbox'.
195216
/// </summary>
196217
/// <remarks>
197218
/// This method is usually much faster than the QueryFeatures method, because intersection tests
198-
/// are performed on objects simplifed by their <see cref="SharpMap.Geometries.BoundingBox"/>, and using the Spatial Index
219+
/// are performed on objects simplified by their <see cref="Envelope"/>, and using the Spatial Index
199220
/// </remarks>
200221
/// <param name="bbox">Box that objects should intersect</param>
201222
/// <returns></returns>
@@ -400,18 +421,33 @@ public void Close()
400421
//Nothing to do
401422
}
402423

424+
/// <summary>
425+
/// Gets an array of feature dataset names
426+
/// </summary>
427+
/// <param name="path">The root path (default = "\")</param>
428+
/// <returns>An array of feature dataset names.</returns>
403429
public string[] GetFeatureDatasets(string path = "\\")
404430
{
405431
var e = EsriGdbInstance;
406432
return e.GetChildDatasets(path, "Feature Dataset");
407433
}
408434

435+
/// <summary>
436+
/// Gets an array of feature class names
437+
/// </summary>
438+
/// <param name="path">The root path (default = "\")</param>
439+
/// <returns>An array of feature class names.</returns>
409440
public string[] GetFeatureClasses(string path = "\\")
410441
{
411442
var e = EsriGdbInstance;
412443
return e.GetChildDatasets(path, "Feature Class");
413444
}
414445

446+
/// <summary>
447+
/// Gets an array of table names
448+
/// </summary>
449+
/// <param name="path">The root path (default = "\")</param>
450+
/// <returns>An array of table names.</returns>
415451
public string[] GetTables(string path = "\\")
416452
{
417453
var e = EsriGdbInstance;
@@ -420,6 +456,7 @@ public string[] GetTables(string path = "\\")
420456

421457
#endregion
422458
#if DEBUG
459+
#pragma warning disable 1591
423460
public IEnumerable<string> EnumerateTables(string path = "\\")
424461
{
425462
var e = EsriGdbInstance;
@@ -437,11 +474,9 @@ public IEnumerable<string> EnumerateTables(string path = "\\")
437474
}
438475
}
439476
}
477+
#pragma warning restore 1591
440478
#endif
441479
}
442480

443-
#if DEBUG
444-
445-
#endif
446481

447482
}

SharpMap.Data.Providers.FileGdb/FileGdbProviderTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
using NUnit.Framework;
2727
using SharpMap.Layers;
2828

29+
#pragma warning disable 1591
30+
2931
namespace SharpMap.Data.Providers
3032
{
3133

0 commit comments

Comments
 (0)