Exemplo n.º 1
0
        public void TestCreateNode()
        {
            var resxdata = ResXData.FromFile(resxFile);

            var fileRef = (ResXFileRef)resxdata.Nodes[1].ObjectValue;

            Core.FilePath path         = fileRef.FileName;
            var           absolutePath = Path.GetFullPath(path.ToAbsolute(resxdata.Path));
            var           otherNode    = (ResXDataNode)resxdata.CreateNode(absolutePath, typeof(System.Drawing.Bitmap));

            Assert.AreEqual(fileRef.FileName, otherNode.FileRef.FileName);
            Assert.AreEqual(fileRef.TypeName, otherNode.FileRef.TypeName);
            Assert.AreEqual(fileRef.TextFileEncoding, otherNode.FileRef.TextFileEncoding);

            var value      = (System.Drawing.Bitmap)resxdata.GetValue(resxdata.Nodes[0]);
            var otherValue = (System.Drawing.Bitmap)resxdata.GetValue(otherNode);

            Assert.AreEqual(value.Width, otherValue.Width);
            Assert.AreEqual(value.Height, otherValue.Height);
        }
Exemplo n.º 2
0
 public Core.FilePath GetValidFormatName(object obj, Core.FilePath fileName)
 {
     return(fileName.ParentDirectory.Combine("package.json"));
 }
Exemplo n.º 3
0
 public DubSolution(Core.FilePath slnPath)
 {
     base.FileName = slnPath;
 }
Exemplo n.º 4
0
 public void WriteFile(Core.FilePath file, object obj, Core.IProgressMonitor monitor)
 {
 }