-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #28 from NatVanG/AddRuleIDProperty
Add rule id property
Showing
25 changed files
with
1,395 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleToAttribute("PBIXInspectorTests")] | ||
|
||
namespace PBIXInspectorLibrary | ||
{ | ||
internal class PbiFileUtils | ||
{ | ||
internal static PbiFile InitPbiFile(string pbiFilePath) | ||
{ | ||
if (string.IsNullOrEmpty(pbiFilePath)) throw new PBIXInspectorException("PBI file path is empty."); | ||
|
||
switch (PbiFile.PBIFileType(pbiFilePath)) | ||
{ | ||
case PbiFile.PBIFileTypeEnum.PBIX: | ||
return new PbixFile(pbiFilePath); | ||
case PbiFile.PBIFileTypeEnum.PBIP: | ||
return new PbipFile(pbiFilePath); | ||
case PbiFile.PBIFileTypeEnum.PBIPReport: | ||
return new PbipReportFile(pbiFilePath); | ||
default: | ||
throw new PBIXInspectorException(string.Format("Could not determine the extension of PBI file with path \"{0}\".", pbiFilePath)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma warning disable CS8602 | ||
|
||
using PBIXInspectorLibrary; | ||
|
||
namespace PBIXInspectorTests | ||
{ | ||
public class PbiFileUtilsTests | ||
{ | ||
[Test] | ||
public void PbiFileUtilsThrows() | ||
{ | ||
PbiFile pbiFile = null; | ||
string pbiFilePath = null; | ||
PBIXInspectorException ex = Assert.Throws<PBIXInspectorException>( | ||
() => pbiFile = PbiFileUtils.InitPbiFile(pbiFilePath)); | ||
} | ||
|
||
[Test] | ||
public void PbiFileUtilsThrows2() | ||
{ | ||
PbiFile pbiFile = null; | ||
string pbiFilePath = string.Empty; | ||
PBIXInspectorException ex = Assert.Throws<PBIXInspectorException>( | ||
() => pbiFile = PbiFileUtils.InitPbiFile(pbiFilePath)); | ||
} | ||
|
||
[Test] | ||
public void PbiFileUtilsThrows3() | ||
{ | ||
PbiFile pbiFile = null; | ||
string pbiFilePath = "myreport.xxxx"; | ||
PBIXInspectorException ex = Assert.Throws<PBIXInspectorException>( | ||
() => pbiFile = PbiFileUtils.InitPbiFile(pbiFilePath)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters