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
/// <summary> A DependencyObject extension method that gets injection service by enumerating the visual tree. </summary> | |
/// | |
/// <remarks> Toeb, 2018-04-23. </remarks> | |
/// | |
/// <param name="TargetObject"> . </param> | |
/// | |
/// <returns> The injection service. </returns> | |
public static IInjectionService GetInjectionService(this DependencyObject TargetObject) | |
{ | |
// needs to be extended to look at the views themselves |
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
using Core.Common.Injection; | |
using Core.Common.MVVM; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Windows; | |
using System.Windows.Data; | |
namespace Core.Common.Wpf.Export |
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
using System; | |
using System.Windows.Markup; | |
using System.Windows.Data; | |
using System.Globalization; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Core.Common.Injection; | |
using System.Xml; | |
using System.Diagnostics; |
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
Assert.AreEqual("~/", RelativePathUtility.Normalize("")); | |
Assert.AreEqual("~/", RelativePathUtility.Normalize(".")); | |
Assert.AreEqual("~/", RelativePathUtility.Normalize("./")); | |
Assert.AreEqual("~/", RelativePathUtility.Normalize("/")); | |
Assert.AreEqual("~/", RelativePathUtility.Normalize("~/")); | |
Assert.AreEqual("~/test", RelativePathUtility.Normalize("test")); | |
Assert.AreEqual("~/test", RelativePathUtility.Normalize("./test")); | |
Assert.AreEqual("~/test/", RelativePathUtility.Normalize("./test/")); | |
Assert.AreEqual("~/test/test2", RelativePathUtility.Normalize("test/test2")); |
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
/// concrete testclass implementing the abstract testclass bellow | |
[TestClass] | |
public class CoreFileSystemPhysicalReadonlyFileSystemTest : AbstractReadonlyFileSystemTest | |
{ | |
protected override void CreateFile(string path, string content = "") | |
{ | |
path = uut.NormalizePath(path); | |
using (var writer = new StreamWriter(File.OpenWrite(path))) | |
{ |