Ejemplo n.º 1
0
        public void DictionaryRoundTripTest3()
        {
            // dictionary with default with DICTIONARYVAR values
            var dict = new DxfDictionaryWithDefault();

            dict.DefaultObject = new DxfDictionaryVariable()
            {
                Value = "default-value"
            };
            dict["key-1"] = new DxfDictionaryVariable()
            {
                Value = "value-1"
            };

            var file = new DxfFile();

            file.Clear();
            file.Header.Version = DxfAcadVersion.R2000;
            file.Objects.Add(dict);
            var text = ToString(file);

            var parsedFile       = Parse(text);
            var roundTrippedDict = parsedFile.Objects.OfType <DxfDictionaryWithDefault>().Single();

            Assert.Equal("value-1", ((DxfDictionaryVariable)roundTrippedDict["key-1"]).Value);
            Assert.Equal("default-value", ((DxfDictionaryVariable)roundTrippedDict.DefaultObject).Value);
        }
Ejemplo n.º 2
0
        public void WriteDictionaryTest3()
        {
            // dictionary with default with DICTIONARYVAR value
            var dict = new DxfDictionaryWithDefault();

            dict.DefaultObject = new DxfDictionaryVariable()
            {
                Value = "default-value"
            };
            dict["key-1"] = new DxfDictionaryVariable()
            {
                Value = "value-1"
            };
            EnsureFileContainsObject(dict, @"
  0
ACDBDICTIONARYWDFLT
  5
#
100
AcDbDictionary
281
0
  3
key-1
350
#
100
AcDbDictionaryWithDefault
340
#
  0
DICTIONARYVAR
  5
#
330
#
100
DictionaryVariables
280
0
  1
default-value
  0
DICTIONARYVAR
  5
#
330
#
100
DictionaryVariables
280
0
  1
value-1
", DxfAcadVersion.R2000);
        }
Ejemplo n.º 3
0
 public void Visit(DxfDictionaryWithDefault dictionaryWithDefault)
 {
 }
Ejemplo n.º 4
0
 public void Visit(DxfDictionaryWithDefault dictionaryWithDefault)
 {
     this.bool_0 = true;
 }
Ejemplo n.º 5
0
 public Class263(DxfDictionaryWithDefault dictionary)
     : base((DxfDictionary)dictionary)
 {
 }