Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d077bc9
Aligned equal signs
JeremyCaney Apr 30, 2018
339f879
Fixed bug with mapping `Id` field
JeremyCaney Apr 30, 2018
64e6ea2
Introduced support for Reference Topics
JeremyCaney Apr 30, 2018
909da0c
Established `Reflection` namespace
JeremyCaney Apr 30, 2018
a01abfe
Fixed reference to `TypeCollection`
JeremyCaney Apr 30, 2018
c4ac02a
Abstracted out `MemberInfoCollection{T}`
JeremyCaney Apr 30, 2018
4d3928b
Converted `GetMember<T>` and `HasMember<T>`
JeremyCaney May 1, 2018
63b02b1
Renamed `SetProperty()` to `SetPropertyValue()`
JeremyCaney May 1, 2018
f7e32fe
Established `HasSettableMethod()`, `SetMethodValue()`, `GetMethodValu…
JeremyCaney May 1, 2018
851762d
Removed unused overload parameter
JeremyCaney May 1, 2018
8211fab
Updated to use new `GetMethodValue()`
JeremyCaney May 1, 2018
a354a00
Introduced internal cache
JeremyCaney May 1, 2018
862dafe
Fixed XmlDoc references
JeremyCaney May 1, 2018
87abbce
Fixed typo in XmlDoc
JeremyCaney May 1, 2018
a19d109
Fixed string conversion
JeremyCaney May 1, 2018
58df3ca
Renamed to `SetMethodTest()`
JeremyCaney May 1, 2018
22e7b02
Introduced `IsSettableType()` helper method
JeremyCaney May 1, 2018
3bd1292
Added XmlDocs for method parameters
JeremyCaney May 1, 2018
a2aa127
Introduced `HasGettableProperty()` and `GetPropertyValue()`
JeremyCaney May 1, 2018
d13ff90
Introduced `HasGettableMethod()` and updated `GetMethodValue()`
JeremyCaney May 1, 2018
8c2a4c2
Introduced assertions for new `GetPropertyValue()`
JeremyCaney May 1, 2018
82faa39
Introduced support for 1:1 property matching
JeremyCaney May 1, 2018
e67eeec
Renamed `[Recurse()]` to `[Follow()]`
JeremyCaney May 1, 2018
4a82666
Introduced `[Flatten]` attribute
JeremyCaney May 1, 2018
8a6e2ae
Updated `TopicMappingService` documentation
JeremyCaney May 2, 2018
529a7b9
Added view model interfaces to documentation
JeremyCaney May 2, 2018
00f98f0
Added controllers reference
JeremyCaney May 2, 2018
bda37fe
Introduced `GetAttributeValue<>()` helper
JeremyCaney May 2, 2018
d34cef0
Removed unused `exception` variable
JeremyCaney May 2, 2018
205d22d
Created `IsCurrentRelationship()` helper method
JeremyCaney May 2, 2018
72fad38
Moved attribute settings into `PropertyConfiguration` class
JeremyCaney May 3, 2018
9d0e8bb
Enabled Code Analysis, and implemented recommendations
JeremyCaney May 3, 2018
71eff0a
Set all projects to use latest C# version
JeremyCaney May 3, 2018
ec80445
Used shortcut for `SqlCommand` constructors
JeremyCaney May 3, 2018
aa3e428
Moved attributed property to separate "block"
JeremyCaney May 3, 2018
483ca7a
Established auto-implemented properties
JeremyCaney May 3, 2018
aba54bc
Implemented `readonly` variables
JeremyCaney May 3, 2018
1d32cb5
Minor formatting updates
JeremyCaney May 4, 2018
0a3ffad
Converted to auto-implemented properties
JeremyCaney May 4, 2018
57e41b4
Established `static` constructors
JeremyCaney May 4, 2018
a59128e
Moved initialization inside constructor
JeremyCaney May 4, 2018
33aaeef
Converted methods to use Lamda expressions
JeremyCaney May 4, 2018
4ff137e
Used implicit variables where possible
JeremyCaney May 4, 2018
9ae7a1b
Converted stateless methods to `static`
JeremyCaney May 4, 2018
ec311e4
Updated `Product`, `Title`, `Description`, and `Version`
JeremyCaney May 4, 2018
1804bcf
Configuration of Precision Infinity's Automatic Versions plugin
JeremyCaney May 4, 2018
a58b0c6
Reintroduced `InternalsVisibleTo` attribute
JeremyCaney May 4, 2018
d91316b
Removed unnecessary variable
JeremyCaney May 4, 2018
02a233f
Fixed `AssemblyInfo` files
JeremyCaney May 4, 2018
49cb283
Fixed various spelling errors across files
JeremyCaney May 4, 2018
a3b9837
[Breaking] Removed optional `type` parameter from parameter
JeremyCaney May 4, 2018
d43929d
Extended documentation
JeremyCaney May 4, 2018
35274c2
Reintroduced `ParentTest`
JeremyCaney May 4, 2018
4cdc237
Marked stateless private methods as `static`
JeremyCaney May 4, 2018
a35437f
Implemented expression bodied members
JeremyCaney May 4, 2018
9af7dae
Streamlined construction of view model
JeremyCaney May 4, 2018
79bfdfd
Suppressed static warnings
JeremyCaney May 4, 2018
e8b16b6
Simplified syntax
JeremyCaney May 4, 2018
dff6b7c
Removed trailing spaces
JeremyCaney May 4, 2018
547713b
Updated XmlDoc to use Framework Type
JeremyCaney May 4, 2018
ff7eed5
Flipped logic for `SatisfiesAttributeFilters()`
JeremyCaney May 4, 2018
0d0812c
Removed unnecessary `using` statements
JeremyCaney May 5, 2018
a1843cc
Added `Property` property
JeremyCaney May 5, 2018
dc2e88e
Established `SetScalarValue()` helper method
JeremyCaney May 5, 2018
5c540f4
Established `SetCollectionValue()` helper method
JeremyCaney May 5, 2018
39e4536
Established `SetTopicReference()` helper method
JeremyCaney May 5, 2018
8bb8f34
Swapped setting of `listType` and `list`
JeremyCaney May 5, 2018
22fe7df
Further separated `SetCollectionValue()` into `GetSourceCollection()`…
JeremyCaney May 5, 2018
f5b9bf1
Moved `IsCurrentRelationship()` to local function
JeremyCaney May 5, 2018
7356961
Made `PopulateChildTopics()` protected
JeremyCaney May 5, 2018
60a1cbb
Converted `SetProperty()` to `protected`
JeremyCaney May 5, 2018
a5a968d
Removed extraneous line breaks
JeremyCaney May 6, 2018
fdcac62
Removed legacy `<paramref />`
JeremyCaney May 6, 2018
0e96ce3
Renamed `topic` parameter to `source`
JeremyCaney May 6, 2018
ed80d27
Rearranged parameter order
JeremyCaney May 6, 2018
6f10323
Added better explanation for empty `catch` statement
JeremyCaney May 6, 2018
b38ded9
Removed unnecessary `sourcetype` and `targetType` variables
JeremyCaney May 6, 2018
ce53eac
Introduced generic `FindAll()` method with delegate
JeremyCaney May 6, 2018
35b83d1
Introduced `FindFirst()` extension method
JeremyCaney May 6, 2018
746141f
Replaced `GetTopic(topicId)` with `Topic.FindFirst(…)`
JeremyCaney May 6, 2018
d6f6085
Established reusable `TypeIndex` type
JeremyCaney May 6, 2018
9173ba9
Implemented `TypeIndex`
JeremyCaney May 6, 2018
20916c0
Established new `ITypeLookupService`
JeremyCaney May 6, 2018
45e58a4
Established `StaticTypeLookupService`
JeremyCaney May 6, 2018
0b7da33
Established `DynamicTypeLookupService`
JeremyCaney May 6, 2018
94c4218
Exposed `TypeLookupService` to `TopicFactory`
JeremyCaney May 6, 2018
2d33371
[Breaking] Introduced `ITypeLookupService` dependency on `TopicMappin…
JeremyCaney May 6, 2018
61fabc3
Removed errant whitespace
JeremyCaney May 6, 2018
ce7d2ee
Marked constructor as `public`
JeremyCaney May 6, 2018
9142377
Added `ITypeLookupService` to documentation
JeremyCaney May 6, 2018
65d9e0e
Added XmlDoc for initializer
JeremyCaney May 6, 2018
872177f
Removed unnecessary code contract
JeremyCaney May 6, 2018
c074767
Updated to include `ITypeLookupService`
JeremyCaney May 6, 2018
2587c85
Fixed alignment
JeremyCaney May 6, 2018
8f7b1d9
Removed unnecessary contract
JeremyCaney May 6, 2018
fcbd2e8
Removed unused `using` statements
JeremyCaney May 6, 2018
bdbd4e3
Fixed `topicRepository` reference
JeremyCaney May 6, 2018
8bc1f20
Changed `IsCurrentRelationship()` to `GetRelationship()`
JeremyCaney May 7, 2018
1bdea84
Streamlined syntax for brevity
JeremyCaney May 7, 2018
e59dd1b
Updated libraries to .NET Framework 4.7
JeremyCaney May 7, 2018
c530001
Baked `Children` logic into `PropertyConfiguration`
JeremyCaney May 7, 2018
2bb146e
Prefixed dynamic lookup services with `Dynamic`
JeremyCaney May 7, 2018
9875416
Fixed flowerbox width
JeremyCaney May 7, 2018
e94a1e1
Introduced `DefaultTopicLookupService`
JeremyCaney May 7, 2018
a7ead4d
Configured `TopicFactory` to use `DefaultTopicLookupService`
JeremyCaney May 7, 2018
d5b45eb
Removed zero-length arrays
JeremyCaney May 7, 2018
2c21506
Established `TopicViewModelLookupService`
JeremyCaney May 7, 2018
ffdeef3
[Breaking] Converted `ITopicMappingService` to `async`
JeremyCaney May 7, 2018
1c254e7
Removed completed `### TODO` (from 2013!)
JeremyCaney May 8, 2018
b79075b
Converted local cache to thread-safe `ConcurrentDictionary<>`
JeremyCaney May 8, 2018
1c5ee27
Made lookups case-insensitive
JeremyCaney May 9, 2018
ea8ed3a
Bug Fix: Second cache for null type
JeremyCaney May 9, 2018
8f9a07d
Migrated to implicit Tuple format
JeremyCaney May 9, 2018
731c481
Configured auto-versioning per project
JeremyCaney May 9, 2018
7cd6c68
Moved `Title` to `ITopicViewModel`
JeremyCaney May 9, 2018
0f8edb1
Added `UniqueKey` to interface definition
JeremyCaney May 9, 2018
bb46923
Modified `INavigationTyopicViewModel<T>` to derive from `ITopicViewMo…
JeremyCaney May 9, 2018
0f89cd2
Added concurrency to `AddNestedTopicsAsync`
JeremyCaney May 9, 2018
66774f7
Reconfigured auto-version to auto-increment
JeremyCaney May 9, 2018
4c3faf0
Fixed partial match bug in `IsSelected`
JeremyCaney May 9, 2018
dabc79f
Established `CachedLayoutControllerBase{T}`
JeremyCaney May 9, 2018
3e2780b
Reduced `FakeTopicRepository`'s descendents
JeremyCaney May 10, 2018
4dfa925
Fixed generic test
JeremyCaney May 10, 2018
5f43dd6
Simplified test names
JeremyCaney May 10, 2018
7cd6dc9
Fixed name of `ContentTypeDescriptor` content type
JeremyCaney May 22, 2018
32f9322
Added null conditional operator to `sourceTopic`
ktrunkey May 22, 2018
c61d2a5
Removed `IsHidden`
JeremyCaney May 22, 2018
fb1625f
Cleaned up formatting
ktrunkey May 22, 2018
4e47c59
Throw error on duplicate
JeremyCaney May 22, 2018
13f83ec
Moved duplicate exception to `InsertItem()`
JeremyCaney May 23, 2018
5490fdb
Corrected XmlDoc on `InsertItem`
JeremyCaney May 23, 2018
7b2e7ad
Initialized `_cache_ as part of constructor
JeremyCaney May 23, 2018
60bb4f6
Moved `GetContentTypeDescriptors()` to `TopicRepositoryBase`
JeremyCaney May 23, 2018
65c7b9a
Established `GetContentTypeDescriptors()` test
JeremyCaney May 23, 2018
c8d6011
Fixed reference to `IsHidden`
JeremyCaney May 23, 2018
f0667c1
Changed `Rollback` to `Virtual`
JeremyCaney May 23, 2018
6342c91
Migrated to `GetInteger()` where appropriate
JeremyCaney May 23, 2018
a13627f
Included `UniqueKey` in view models
JeremyCaney May 23, 2018
4238d50
Indented variables
JeremyCaney May 23, 2018
1a0a411
Changed `GetPath()` to static
JeremyCaney May 25, 2018
adac48b
Moved to `catch(SqlException…)`
JeremyCaney May 25, 2018
b63dc07
Introduced `TopicRepositoryException`
JeremyCaney May 25, 2018
24b2e9b
Provide more explicit messaging on key conflict
JeremyCaney May 25, 2018
08e3ed5
Remove unused `using` statements
JeremyCaney May 25, 2018
9034c85
Migrated to string interpolation
JeremyCaney May 25, 2018
ee7de38
Implemented expression-bodied method
JeremyCaney May 25, 2018
113f505
Added default constructor
JeremyCaney May 25, 2018
ba281ba
Removed unused `using` statements
JeremyCaney May 25, 2018
02d003f
Increment minor version
JeremyCaney Jun 5, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 16 additions & 68 deletions Ignia.Topics.Data.Caching/CachedTopicRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Diagnostics.Contracts;
using Ignia.Topics.Collections;
using Ignia.Topics.Repositories;
using Ignia.Topics.Querying;

namespace Ignia.Topics.Data.Caching {

Expand Down Expand Up @@ -50,6 +51,11 @@ public CachedTopicRepository(ITopicRepository dataProvider) : base() {
\-----------------------------------------------------------------------------------------------------------------------*/
_dataProvider = dataProvider;

/*------------------------------------------------------------------------------------------------------------------------
| Ensure topics are loaded
\-----------------------------------------------------------------------------------------------------------------------*/
_cache = _dataProvider.Load();

}

/*==========================================================================================================================
Expand All @@ -64,54 +70,35 @@ public CachedTopicRepository(ITopicRepository dataProvider) : base() {
| METHOD: LOAD
\-------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Loads a topic (and, optionally, all of its descendents) based on the specified unique identifier.
/// Loads a topic (and, optionally, all of its descendants) based on the specified unique identifier.
/// </summary>
/// <param name="topicId">The topic identifier.</param>
/// <param name="isRecursive">Determines whether or not to recurse through and load a topic's children.</param>
/// <returns>A topic object.</returns>
public override Topic Load(int topicId, bool isRecursive = true) {

/*------------------------------------------------------------------------------------------------------------------------
| Validate contracts
| Handle request for entire tree
\-----------------------------------------------------------------------------------------------------------------------*/
Contract.Ensures(Contract.Result<Topic>() != null);

/*------------------------------------------------------------------------------------------------------------------------
| Ensure topics are loaded
\-----------------------------------------------------------------------------------------------------------------------*/
if (_cache == null) {
_cache = _dataProvider.Load();
if (topicId < 0) {
return _cache;
}

/*------------------------------------------------------------------------------------------------------------------------
| Lookup by TopicId
| Recursive search
\-----------------------------------------------------------------------------------------------------------------------*/
if (topicId >= 0) {
return GetTopic(_cache, topicId);
}

/*------------------------------------------------------------------------------------------------------------------------
| Return entire cache
\-----------------------------------------------------------------------------------------------------------------------*/
return _cache;
return _cache.FindFirst(t => t.Id.Equals(topicId));

}

/// <summary>
/// Loads a topic (and, optionally, all of its descendents) based on the specified key name.
/// Loads a topic (and, optionally, all of its descendants) based on the specified key name.
/// </summary>
/// <param name="topicKey">The topic key.</param>
/// <param name="isRecursive">Determines whether or not to recurse through and load a topic's children.</param>
/// <returns>A topic object.</returns>
public override Topic Load(string topicKey = null, bool isRecursive = true) {

/*------------------------------------------------------------------------------------------------------------------------
| Ensure topics are loaded
\-----------------------------------------------------------------------------------------------------------------------*/
if (_cache == null) {
_cache = _dataProvider.Load();
}

/*------------------------------------------------------------------------------------------------------------------------
| Lookup by TopicKey
\-----------------------------------------------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -142,45 +129,6 @@ public override Topic Load(string topicKey = null, bool isRecursive = true) {
/*==========================================================================================================================
| METHOD: GET TOPIC
\-------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Retrieves a topic object based on the current topic scope and the specified integer identifier.
/// </summary>
/// <remarks>
/// If the specified ID does not match the identifier for the current topic, its children will be searched.
/// </remarks>
/// <param name="sourceTopic">The root topic to search from.</param>
/// <param name="topicId">The integer identifier for the topic.</param>
/// <returns>The topic or null, if the topic is not found.</returns>
/// <requires description="The topicId is expected to be a positive integer." exception="T:System.ArgumentException">
/// topicId &lt;= 0
/// </requires>
private Topic GetTopic(Topic sourceTopic, int topicId) {

/*------------------------------------------------------------------------------------------------------------------------
| Validate input
\-----------------------------------------------------------------------------------------------------------------------*/
Contract.Requires<ArgumentException>(topicId >= 0, "The topicId is expected to be a non-negative integer.");

/*------------------------------------------------------------------------------------------------------------------------
| Return if current
\-----------------------------------------------------------------------------------------------------------------------*/
if (sourceTopic.Id == topicId) return sourceTopic;

/*------------------------------------------------------------------------------------------------------------------------
| Iterate through children
\-----------------------------------------------------------------------------------------------------------------------*/
foreach (var childTopic in sourceTopic.Children) {
var foundTopic = GetTopic(childTopic, topicId);
if (foundTopic != null) return foundTopic;
}

/*------------------------------------------------------------------------------------------------------------------------
| Return null if not found
\-----------------------------------------------------------------------------------------------------------------------*/
return null;

}

/// <summary>
/// Retrieves a topic object based on the specified partial or full (prefixed) topic key.
/// </summary>
Expand Down Expand Up @@ -211,7 +159,7 @@ private Topic GetTopic(Topic sourceTopic, string uniqueKey) {
| Provide implicit root
>-------------------------------------------------------------------------------------------------------------------------
| ###NOTE JJC080313: While a root topic is required by the data structure, it should be implicit from the perspective of
| the calling application. A developer should be able to call GetTopic("Namepace:TopicPath") to get to a topic, without
| the calling application. A developer should be able to call GetTopic("Namespace:TopicPath") to get to a topic, without
| needing to be aware of the root.
\-----------------------------------------------------------------------------------------------------------------------*/
if (
Expand Down Expand Up @@ -261,8 +209,8 @@ private Topic GetTopic(Topic sourceTopic, string uniqueKey) {
/// <param name="isDraft">Boolean indicator as to the topic's publishing status.</param>
/// <returns>The integer return value from the execution of the <c>topics_UpdateTopic</c> stored procedure.</returns>
/// <exception cref="Exception">
/// The Content Type <c>topic.Attributes.GetValue(ContentType, Page)</c> referenced by <c>topic.Key</c> could not be found under
/// Configuration:ContentTypes. There are <c>TopicRepository.ContentTypes.Count</c> ContentTypes in the Repository.
/// The Content Type <c>topic.Attributes.GetValue(ContentType, Page)</c> referenced by <c>topic.Key</c> could not be found
/// under Configuration:ContentTypes. There are <c>TopicRepository.ContentTypes.Count</c> ContentTypes in the Repository.
/// </exception>
/// <exception cref="Exception">
/// Failed to save Topic <c>topic.Key</c> (<c>topic.Id</c>) via
Expand Down
15 changes: 14 additions & 1 deletion Ignia.Topics.Data.Caching/Ignia.Topics.Data.Caching.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Ignia.Topics.Data.Caching</RootNamespace>
<AssemblyName>Ignia.Topics.Data.Caching</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
Expand Down Expand Up @@ -45,6 +45,17 @@
<CodeContractsBeingOptimisticOnExternal>True</CodeContractsBeingOptimisticOnExternal>
<CodeContractsRuntimeCheckingLevel>Full</CodeContractsRuntimeCheckingLevel>
<CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
<TargetFrameworkProfile />
<ShouldCreateLogs>True</ShouldCreateLogs>
<AdvancedSettingsExpanded>False</AdvancedSettingsExpanded>
<UpdateAssemblyVersion>True</UpdateAssemblyVersion>
<UpdateAssemblyFileVersion>True</UpdateAssemblyFileVersion>
<UpdateAssemblyInfoVersion>False</UpdateAssemblyInfoVersion>
<AssemblyVersionSettings>None.None.Increment.None</AssemblyVersionSettings>
<UpdatePackageVersion>False</UpdatePackageVersion>
<AssemblyInfoVersionType>SettingsVersion</AssemblyInfoVersionType>
<InheritWinAppVersionFrom>None</InheritWinAppVersionFrom>
<AssemblyFileVersionSettings>None.None.Increment.None</AssemblyFileVersionSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -66,6 +77,8 @@
<CodeContractsNecessaryEnsures>False</CodeContractsNecessaryEnsures>
<CodeContractsShowSquigglies>False</CodeContractsShowSquigglies>
<CodeContractsReferenceAssembly>%28none%29</CodeContractsReferenceAssembly>
<RunCodeAnalysis>true</RunCodeAnalysis>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
49 changes: 21 additions & 28 deletions Ignia.Topics.Data.Caching/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
using System.Reflection;
using System.Runtime.CompilerServices;
/*==============================================================================================================================
| Author Ignia, LLC
| Client Ignia, LLC
| Project Topics Library
\=============================================================================================================================*/
using System;
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Ignia.Topics.Data.Caching")]
[assembly: AssemblyDescription("")]
/*==============================================================================================================================
| DEFINE ASSEMBLY ATTRIBUTES
>===============================================================================================================================
| Declare and define attributes used in the compiling of the finished assembly.
\-----------------------------------------------------------------------------------------------------------------------------*/
[assembly: AssemblyCompany("Ignia, LLC")]
[assembly: AssemblyCopyright("Copyright © 2018 Ignia, LLC")]
[assembly: AssemblyProduct("Ignia OnTopic Library")]
[assembly: AssemblyTitle("OnTopic Cached Repository")]
[assembly: AssemblyDescription("Provides a caching decorator for ITopicRepository implementations.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ignia.Topics.Data.Caching")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: AssemblyVersion("3.6.1762.0")]
[assembly: AssemblyFileVersion("3.5.1794.0")]
[assembly: CLSCompliant(true)]
[assembly: Guid("206b7f91-ca25-4e9d-9576-60d2e54a2c0a")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ModelCollation>1033,CI</ModelCollation>
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
<DeployToDatabase>True</DeployToDatabase>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetLanguage>CS</TargetLanguage>
<AppDesignerFolder>Properties</AppDesignerFolder>
<SqlServerVerification>False</SqlServerVerification>
Expand All @@ -27,6 +27,7 @@
<DefaultFilegroup>PRIMARY</DefaultFilegroup>
<GenerateCreateScript>False</GenerateCreateScript>
<DacApplicationName>OnTopic</DacApplicationName>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
Expand Down
4 changes: 2 additions & 2 deletions Ignia.Topics.Data.Sql.Database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `Ignia.Topics.Data.Sql.Database` provides a default schema for supporting th

## Tables
The following is a summary of the most relevant tables.
- **[`topics_Topics`](dbo/Tables/topics_Topics.sql)**: Represents the core hiearchy of topics, encoded in a nested set format.
- **[`topics_Topics`](dbo/Tables/topics_Topics.sql)**: Represents the core hierarchy of topics, encoded in a nested set format.
- **[`topics_TopicAttributes`](dbo/Tables/topics_Topics.sql)**: Represents key/value pairs of topic attributes, including historical versions.
- **[`topics_Blob`](dbo/Tables/topics_Blob.sql)**: Represents an XML-based blob of non-indexed attributes, which are too long for `topics_TopicAttributes`.
- **[`topics_Relationships`](dbo/Tables/topics_Relationships.sql)**: Represents relationships between topics, segmented by namespace.
Expand All @@ -24,7 +24,7 @@ The following is a summary of the most relevant stored procedures.
- **[`topics_CreateTopic`](dbo/Stored%20Procedures/topics_CreateTopic.sql)**: Creates a new topic based on a `@ParentId`, an array of `@Attributes`, and an XML `@Blob`. Returns a new `@@Identity`.
- **[`topics_DeleteTopic`](dbo/Stored%20Procedures/topics_DeleteTopic.sql)**: Deletes an existing topic based on a `@Id`.
- **[`topics_MoveTopic`](dbo/Stored%20Procedures/topics_MoveTopic.sql)**: Moves an existing topic based on an `@Id`, `@ParentId`, and `@SiblingId`.
- **[`topics_UpdateTopic`](dbo/Stored%20Procedures/topics_UpdateTopic.sql)**: Updates an existing topic based on an `@Id`, an array of `@Attributes`, and a `@Blob`. Optionally deletes all relationships; these will need to be readded using `topics_PersistRelations`. Old attributes are persisted as previous versions.
- **[`topics_UpdateTopic`](dbo/Stored%20Procedures/topics_UpdateTopic.sql)**: Updates an existing topic based on an `@Id`, an array of `@Attributes`, and a `@Blob`. Optionally deletes all relationships; these will need to be re-added using `topics_PersistRelations`. Old attributes are persisted as previous versions.
- **[`topics_PersistRelations`](dbo/Stored%20Procedures/topics_PersistRelations.sql)**: Associates a relationship with a topic based on a `@Source_TopicId`, array of `@Target_TopicIds`, and `@RelationshipTypeID` (which can be any string label).

## Views
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--
-- Purpose Creates a new topic.
--
-- History Casey Margell 04062009 Initial Creation baseaed on code from Celko's Sql For Smarties.
-- History Casey Margell 04062009 Initial Creation based on code from Celko's SQL For Smarties.
-- Jeremy Caney 05282010 Reformatted code and refactored identifiers for improved readability.
-- Katherine Trunkey 08142014 Updated topic_TopicAttributes insertion script to use uncommon, multi-character delimiters
-- rather than a colon and semicolon in order to provide better escaping safety for @Attributes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Purpose Gets the tree of current topics rooted FROM the provided TopicID. If no TopicID is provided then the sproc returns everything
-- under the topic with the lowest id.
--
-- History Casey Margell 04062009 Initial Creation baseaed on code FROM Celko's Sql For Smarties.
-- History Casey Margell 04062009 Initial Creation based on code FROM Celko's SQL For Smarties.
-- Jeremy Caney 07192009 Added support for AttributeID lookup.
-- Jeremy Caney 05282010 Reformatted code AND refactored identifiers for improved readability.
-- Jeremy Caney 06072010 Added support for blob fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-- Hedley Robertson 07062010 Added support for SiblingID (Ordering)
-- Hedley Robertson 08122010 Inline test cases, debugging statements and check for re-parenting;
-- now avoids moving item to start of SET when sibling move requested
-- and parentid has not changed
-- and ParentId has not changed
-- Hedley Robertson 08172010 Rebuilt with externalized MoveSubTree function
-- Jeremy Caney 09222014 Updated logic for ParentID attribute to be based on Key, not ID
-- Jeremy Caney 12092017 Refactored based on Celko's alternative formulation.
Expand Down Expand Up @@ -124,7 +124,7 @@ SET @Offset =
-- MOVE SOURCE RANGE TO INSERTION POINT
-----------------------------------------------------------------------------------------------------------------------------------------------
-- The basic idea behind moving nodes is that we're going to a) shift the target subtree (@Parent) by the delta (@Offset) between its original
-- position (@OriginalLeft, @OriginalRight) and the the target location (@InsertionPoint), while b) closing the gap left behind by shifting all
-- position (@OriginalLeft, @OriginalRight) and the target location (@InsertionPoint), while b) closing the gap left behind by shifting all
-- intermediate nodes by the width of the target subtree (@OriginalRange).
-----------------------------------------------------------------------------------------------------------------------------------------------
-- EXAMPLE: If we're moving a target subtree of width 12 down 26 nodes, then we'd a) subtract 26 (the @Offset) from all nodes between RangeLeft
Expand Down
Loading