public object Deserialize(object?o, IXmlDeserializationInfo info, object?parentobject) { var action = (FilterAction)info.GetEnum("Action", typeof(FilterAction)); var matchString = info.GetString("MatchString"); return(new FilterItem(action, matchString)); }
public object Deserialize(object o, IXmlDeserializationInfo info, object parent) { Foo foo = o!=null ? (Foo)o : new Foo(); int val = info.GetInt32(); int count = info.GetInt32Attribute("Count"); foo.m_Array = new Double[count]; // for(int i=0;i<count;i++) foo.m_Array[i] = info.GetDouble(); info.GetArray(foo.m_Array,count); foo.m_String = info.GetString(); return foo; }
public object Deserialize(object o, IXmlDeserializationInfo info, object parent) { Foo foo = o != null ? (Foo)o : new Foo(); int val = info.GetInt32(); int count = info.GetInt32Attribute("Count"); foo.m_Array = new Double[count]; // for(int i=0;i<count;i++) foo.m_Array[i] = info.GetDouble(); info.GetArray(foo.m_Array, count); foo.m_String = info.GetString(); return(foo); }
public object Deserialize(object?o, IXmlDeserializationInfo info, object?parentobject) { var s = o as DirectoryList ?? new DirectoryList(); s.Clear(); var count = info.OpenArray("DirectoryList"); for (int i = 0; i < count; ++i) { var entry = (DirectoryEntry)(info.GetValue("DirectoryEntry", s) ?? throw new InvalidOperationException()); s.Add(entry); } info.CloseArray(count); return(s); }
public object Deserialize(object?o, IXmlDeserializationInfo info, object?parentobject) { var s = o as FilterItemCollection ?? new FilterItemCollection(); s.Clear(); var count = info.OpenArray("FilterItems"); for (int i = 0; i < count; ++i) { var entry = (FilterItem)(info.GetValue("FilterItem", s) ?? throw new InvalidOperationException()); s.Add(entry); } info.CloseArray(count); return(s); }
public object Deserialize(object?o, IXmlDeserializationInfo info, object?parentobject) { var isEnabled = info.GetBoolean("IsEnabled"); var sourceDirectory = info.GetString("SourceDirectory"); var destinationDirectory = info.GetString("DestinationDirectory"); var maxDepthOfSymbolicLinksToFollow = (info.CurrentElementName == "MaxDepthOfSymbolicLinksToFollow") ? info.GetInt32("MaxDepthOfSymbolicLinksToFollow") : 16; var filter = (Filter.FilterItemCollection)(info.GetValue("Filter", null) ?? throw new InvalidOperationException()); return(new DirectoryEntry(sourceDirectory, destinationDirectory) { IsEnabled = isEnabled, _excludedFiles = filter, _maxDepthOfSymbolicLinksToFollow = maxDepthOfSymbolicLinksToFollow, }); }
public object Deserialize(object?o, IXmlDeserializationInfo info, object?parentobject) { var s = o as BackupDocument ?? new BackupDocument(); s.BackupMode = (BackupMode)info.GetEnum("BackupMode", typeof(BackupMode)); s.BackupMainFolder = info.GetString("BackupMainFolder"); s.BackupTodaysDirectoryPreText = info.GetString("BackupTodaysFolderPreText"); s.BackupTodaysDirectoryMiddleText = (BackupTodaysDirectoryMiddleTextType)info.GetEnum("BackupTodaysFolderMiddleText", typeof(BackupTodaysDirectoryMiddleTextType)); s.BackupTodaysDirectoryPostText = info.GetString("BackupTodaysFolderPostText"); var dirs = (DirectoryList)(info.GetValue("BackupDirectories", s) ?? throw new InvalidOperationException()); s._directories.Clear(); foreach (var d in dirs) { s._directories.Add(d); } s.IsDirty = false; return(s); }
public object Deserialize(object o, IXmlDeserializationInfo info, object parentobject) { return(info.GetInt32("e")); }
public object Deserialize(object o, IXmlDeserializationInfo info, object parentobject) { return info.GetDateTime("e"); }
public object Deserialize(object?o, IXmlDeserializationInfo info, object?parentobject) { return(info.GetDouble("e")); }