/// <ToBeCompleted></ToBeCompleted> public void LoadInnerObjects(string propertyName, IRepositoryReader reader, int version) { if (propertyName == null) { throw new ArgumentNullException("propertyName"); } if (reader == null) { throw new ArgumentNullException("reader"); } if (propertyName == "ConnectionPointMappings") { // load ConnectionPoint mappings reader.BeginReadInnerObjects(); while (reader.BeginReadInnerObject()) { ControlPointId connectionPointId = reader.ReadInt32(); TerminalId terminalId = reader.ReadInt32(); // The following is the essence of MapTerminal without the checks. if (connectionPointMappings.ContainsKey(connectionPointId)) { connectionPointMappings[connectionPointId] = terminalId; } else { connectionPointMappings.Add(connectionPointId, terminalId); } reader.EndReadInnerObject(); } reader.EndReadInnerObjects(); } }
/// <override></override> public override void LoadInnerObjects(string propertyName, IRepositoryReader reader, int version) { base.LoadInnerObjects(propertyName, reader, version); Debug.Assert(propertyName == "ValueRanges"); Debug.Assert((intRanges != null && intRanges.Count == 0) || (floatRanges != null && floatRanges.Count == 0)); reader.BeginReadInnerObjects(); while (reader.BeginReadInnerObject()) { IStyle style = null; switch (mappingType) { case MappingType.IntegerStyle: int intValue = (int)reader.ReadFloat(); style = ReadStyle(reader); intRanges.Add(intValue, style); break; case MappingType.FloatStyle: float floatValue = reader.ReadFloat(); style = ReadStyle(reader); floatRanges.Add(floatValue, style); break; default: throw new NShapeUnsupportedValueException(mappingType); } reader.EndReadInnerObject(); } reader.EndReadInnerObjects(); }
void IEntity.LoadInnerObjects(string propertyName, IRepositoryReader reader, int version) { Project.AssertSupportedVersion(false, version); reader.BeginReadInnerObjects(); while (reader.BeginReadInnerObject()) { LibraryData ld = new LibraryData(null, null, 0); ld.Name = reader.ReadString(); ld.AssemblyName = reader.ReadString(); ld.RepositoryVersion = reader.ReadInt32(); libraries.Add(ld); reader.EndReadInnerObject(); } reader.EndReadInnerObjects(); }
/// <override></override> protected override void LoadInnerObjectsCore(string propertyName, IRepositoryReader reader, int version) { if (propertyName == attrNameColumns) { reader.BeginReadInnerObjects(); while (reader.BeginReadInnerObject()) { int colIdx = reader.ReadInt32(); string colName = reader.ReadString(); reader.EndReadInnerObject(); InsertColumn(colIdx, colName); } reader.EndReadInnerObjects(); } else base.LoadInnerObjectsCore(propertyName, reader, version); }
/// <ToBeCompleted></ToBeCompleted> public void LoadInnerObjects(string propertyName, IRepositoryReader reader, int version) { if (propertyName == null) throw new ArgumentNullException("propertyName"); if (reader == null) throw new ArgumentNullException("reader"); if (propertyName == "ConnectionPointMappings") { // load ConnectionPoint mappings reader.BeginReadInnerObjects(); while (reader.BeginReadInnerObject()) { ControlPointId connectionPointId = reader.ReadInt32(); TerminalId terminalId = reader.ReadInt32(); // The following is the essence of MapTerminal without the checks. if (connectionPointMappings.ContainsKey(connectionPointId)) connectionPointMappings[connectionPointId] = terminalId; else connectionPointMappings.Add(connectionPointId, terminalId); reader.EndReadInnerObject(); } reader.EndReadInnerObjects(); } }
void IEntity.LoadInnerObjects(string propertyName, IRepositoryReader reader, int version) { Debug.Assert(propertyName == "Layers"); Debug.Assert(layers.Count == 0); reader.BeginReadInnerObjects(); while (reader.BeginReadInnerObject()) { int id = reader.ReadInt32(); string name = reader.ReadString(); Layer l = new Layer(name); l.Id = (LayerIds)id; l.Title = reader.ReadString(); l.LowerZoomThreshold = reader.ReadInt32(); l.UpperZoomThreshold = reader.ReadInt32(); reader.EndReadInnerObject(); layers.Add(l); } reader.EndReadInnerObjects(); }