Changeset 2737
- Timestamp:
- 02/02/10 16:24:12 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence.GUI/3.3/HeuristicLabPersistenceGUIPlugin.cs
r2656 r2737 7 7 [PluginFile("HeuristicLab.Persistence.GUI-3.3.dll", PluginFileType.Assembly)] 8 8 [PluginDependency("HeuristicLab.Persistence-3.3")] 9 public class HeuristicLabPersistence Plugin : PluginBase { }9 public class HeuristicLabPersistenceGUIPlugin : PluginBase { } 10 10 11 11 12 12 [Application("Persistence Configuration")] 13 public class HeuristicLabPersistence Application : ApplicationBase {13 public class HeuristicLabPersistenceGUIApplication : ApplicationBase { 14 14 public override void Run() { 15 15 Application.EnableVisualStyles(); -
trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs
r1795 r2737 31 31 Version := '\d+\.\d+\.\d+\.\d+)' 32 32 33 IDENTIFIER = [ a-zA-Z][a-ZA-Z0-9]*33 IDENTIFIER = [_a-zA-Z][_a-ZA-Z0-9]* 34 34 */ 35 35 … … 38 38 private static Dictionary<string, string> tokens = 39 39 new Dictionary<string, string> { 40 {"-", "DASH"}, 40 41 {"&", "AMPERSAND"}, 41 42 {".", "DOT"}, 42 {"-", "DASH"},43 43 {"+", "PLUS"}, 44 44 {",", "COMMA"}, … … 50 50 {"`", "BACKTICK"} }; 51 51 private static Regex NumberRegex = new Regex("^\\d+$"); 52 private static Regex TokenRegex = new Regex("[-&.+,\\[\\]* =`]|\\d+|[ a-zA-Z][a-zA-Z0-9]*");52 private static Regex TokenRegex = new Regex("[-&.+,\\[\\]* =`]|\\d+|[_a-zA-Z][_a-zA-Z0-9]*"); 53 53 public string Name { get; private set; } 54 54 public string Value { get; private set; } -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs
r2106 r2737 53 53 private List<TypeMapping> externalTypeCache; 54 54 private List<string> requiredFiles; 55 private void BuildTypeCache() { 55 private void BuildTypeCache() { 56 56 externalTypeCache = new List<TypeMapping>(); 57 57 Dictionary<Assembly, bool> assemblies = new Dictionary<Assembly, bool>(); … … 84 84 85 85 public Serializer(object obj, Configuration configuration, string rootName, bool isTestRun) { 86 87 86 this.obj = obj; 88 87 this.rootName = rootName; … … 174 173 yield return new BeginToken(name, typeId, id); 175 174 bool first = true; 176 foreach (var tag in metaInfo) { 177 IEnumerator<ISerializationToken> metaIt = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 178 while (metaIt.MoveNext()) { 179 if (first) { 180 yield return new MetaInfoBeginToken(); 181 first = false; 175 if (metaInfo != null) { 176 foreach (var tag in metaInfo) { 177 IEnumerator<ISerializationToken> metaIt = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 178 while (metaIt.MoveNext()) { 179 if (first) { 180 yield return new MetaInfoBeginToken(); 181 first = false; 182 } 183 yield return metaIt.Current; 182 184 } 183 yield return metaIt.Current;184 185 } 185 186 } … … 187 188 yield return new MetaInfoEndToken(); 188 189 } 189 foreach (var tag in tags) { 190 IEnumerator<ISerializationToken> it = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 191 while (it.MoveNext()) 192 yield return it.Current; 190 if (tags != null) { 191 foreach (var tag in tags) { 192 IEnumerator<ISerializationToken> it = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 193 while (it.MoveNext()) 194 yield return it.Current; 195 } 193 196 } 194 197 yield return new EndToken(name, typeId, id);
Note: See TracChangeset
for help on using the changeset viewer.