Changeset 1476
- Timestamp:
- 04/01/09 15:10:14 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Persistence
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/Default/ViewOnly/ViewOnlyFormat.cs
r1454 r1476 45 45 public override Type Type { get { return typeof(Type); } } 46 46 } 47 48 //public class ToStringDecomposer : IDecomposer {49 // should not be used by default50 public class ToStringDecomposer {51 public bool CanDecompose(Type type) { return true; }52 public IEnumerable<Tag> DeCompose(object obj) {53 yield return new Tag(obj.ToString());54 }55 56 public object CreateInstance(Type type) {57 throw new NotImplementedException();58 }59 60 public object Populate(object instance, IEnumerable<Tag> tags, Type type) {61 throw new NotImplementedException();62 }63 64 }65 66 47 67 48 public class ViewOnlyGenerator : Generator<string> { -
trunk/sources/HeuristicLab.Persistence/Default/Xml/XmlGenerator.cs
r1466 r1476 6 6 using System.IO; 7 7 using ICSharpCode.SharpZipLib.Zip; 8 using HeuristicLab.Tracing; 9 using log4net; 8 10 9 11 namespace HeuristicLab.Persistence.Default.Xml { … … 145 147 zipStream.PutNextEntry(new ZipEntry("data.xml")); 146 148 StreamWriter writer = new StreamWriter(zipStream); 147 foreach ( ISerializationToken token in serializer ) 148 writer.Write(generator.Format(token)); 149 ILog logger = Logger.GetDefaultLogger(); 150 foreach (ISerializationToken token in serializer) { 151 string line = generator.Format(token); 152 writer.Write(line); 153 logger.Debug(line); 154 } 149 155 writer.Flush(); 150 156 zipStream.PutNextEntry(new ZipEntry("typecache.xml")); 151 157 writer = new StreamWriter(zipStream); 152 foreach ( string line in generator.Format(serializer.TypeCache))158 foreach (string line in generator.Format(serializer.TypeCache)) { 153 159 writer.WriteLine(line); 160 logger.Debug(line); 161 } 154 162 writer.Flush(); 155 163 zipStream.Close(); -
trunk/sources/HeuristicLab.Persistence/HeuristicLab.Persistence.csproj
r1474 r1476 80 80 <HintPath>..\HeuristicLab.PluginInfrastructure.GUI\ICSharpCode.SharpZipLib.dll</HintPath> 81 81 </Reference> 82 <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> 83 <SpecificVersion>False</SpecificVersion> 84 <HintPath>..\HeuristicLab.Tracing\libs\debug\log4net.dll</HintPath> 85 </Reference> 82 86 <Reference Include="System" /> 83 87 <Reference Include="System.configuration" /> … … 99 103 <Compile Include="Default\Decomposers\StorableDecomposer.cs" /> 100 104 <Compile Include="Default\Decomposers\TypeDecomposer.cs" /> 105 <Compile Include="Default\Decomposers\X2StringDecomposer.cs" /> 101 106 <Compile Include="Default\ViewOnly\ViewOnlyFormat.cs" /> 102 107 <Compile Include="Default\Xml\Compact\IntArray2XmlFormatters.cs" /> … … 107 112 <Compile Include="Core\DataMemberAccessor.cs" /> 108 113 <Compile Include="Default\Xml\Compact\IntList2XmlFormatter.cs" /> 109 <Compile Include="Default\Xml\Primitive\St ing2XmlFormatter.cs" />114 <Compile Include="Default\Xml\Primitive\String2XmlFormatter.cs" /> 110 115 <Compile Include="Default\Xml\Primitive\Int2XmlFormatter.cs" /> 111 116 <Compile Include="Default\Xml\Primitive\Double2XmlFormatter.cs" />
Note: See TracChangeset
for help on using the changeset viewer.