From 6151a750eb52771d1bbca1f912e992aae761d3ec Mon Sep 17 00:00:00 2001 From: Barry Jones Date: Wed, 12 Nov 2014 21:34:21 +0000 Subject: [PATCH] Fixed issue with CRefPath.Parse method not correctly parsing indexor properties. --- .../CRefPath.cs | 17 +++++------------ .../Comments/CRefPath.cs | 13 ++++--------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/Source/TheBoxSoftware.API.LiveDocumenter/CRefPath.cs b/Source/TheBoxSoftware.API.LiveDocumenter/CRefPath.cs index 2425a61..ab3564f 100644 --- a/Source/TheBoxSoftware.API.LiveDocumenter/CRefPath.cs +++ b/Source/TheBoxSoftware.API.LiveDocumenter/CRefPath.cs @@ -51,22 +51,15 @@ private void Parse() if (this.PathType != CRefTypes.Error) { string[] items; - if (this.PathType != CRefTypes.Method) + int startParams = this.crefPath.IndexOf('('); + if (startParams == -1) { items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1).Split('.'); } - else + else { - int startParams = this.crefPath.IndexOf('('); - if (startParams == -1) - { - items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1).Split('.'); - } - else - { - items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1, this.crefPath.IndexOf('(') - 2).Split('.'); - this.Parameters = this.crefPath.Substring(this.crefPath.IndexOf('(')); - } + items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1, this.crefPath.IndexOf('(') - 2).Split('.'); + this.Parameters = this.crefPath.Substring(this.crefPath.IndexOf('(')); } switch (this.PathType) diff --git a/Source/TheBoxSoftware.Reflection/Comments/CRefPath.cs b/Source/TheBoxSoftware.Reflection/Comments/CRefPath.cs index c266de0..ede313d 100644 --- a/Source/TheBoxSoftware.Reflection/Comments/CRefPath.cs +++ b/Source/TheBoxSoftware.Reflection/Comments/CRefPath.cs @@ -195,18 +195,13 @@ private void Parse() if (this.PathType != CRefTypes.Error) { string[] items; - if (this.PathType != CRefTypes.Method) { + int startParams = this.crefPath.IndexOf('('); + if (startParams == -1) { items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1).Split('.'); } else { - int startParams = this.crefPath.IndexOf('('); - if (startParams == -1) { - items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1).Split('.'); - } - else { - items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1, this.crefPath.IndexOf('(') - 2).Split('.'); - this.Parameters = this.crefPath.Substring(this.crefPath.IndexOf('(')); - } + items = this.crefPath.Substring(this.crefPath.IndexOf(':') + 1, this.crefPath.IndexOf('(') - 2).Split('.'); + this.Parameters = this.crefPath.Substring(this.crefPath.IndexOf('(')); } switch (this.PathType) {