Changeset 17034 for branches/2435-alglib_3_15/HeuristicLab.Persistence
- Timestamp:
- 06/25/19 23:14:06 (5 years ago)
- Location:
- branches/2435-alglib_3_15
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2435-alglib_3_15
- Property svn:mergeinfo changed
-
branches/2435-alglib_3_15/HeuristicLab.Persistence
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Persistence (added) merged: 16796-16797,16799,16945
- Property svn:mergeinfo changed
-
branches/2435-alglib_3_15/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs
r16565 r17034 41 41 } 42 42 public StorableMemberInfo(StorableAttribute attribute, MemberInfo memberInfo) { 43 DisentangledName = attribute.Name;43 DisentangledName = string.IsNullOrEmpty(attribute.OldName) ? attribute.Name : attribute.OldName; 44 44 DefaultValue = attribute.DefaultValue; 45 45 MemberInfo = memberInfo; 46 if ( !attribute.AllowOneWay)46 if (string.IsNullOrEmpty(attribute.OldName) && !attribute.AllowOneWay) 47 47 CheckPropertyAccess(memberInfo as PropertyInfo); 48 48 } -
branches/2435-alglib_3_15/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs
r16565 r17034 288 288 } 289 289 } 290 291 /// <summary> 292 /// Checks if the given file can be opened as <see cref="ZipArchive" />. 293 /// </summary> 294 /// <param name="filename">The filename.</param> 295 /// <returns><see langword="true" /> if the file can be opened as <see cref="ZipArchive" />; otherwise, <see langword="false" />.</returns> 296 public static bool CanOpen(string filename) { 297 try { 298 using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read)) { 299 using (ZipArchive zip = new ZipArchive(fs)) { 300 return true; 301 } 302 } 303 } catch (InvalidDataException) { 304 return false; 305 } 306 } 290 307 } 291 308 }
Note: See TracChangeset
for help on using the changeset viewer.