string IBody.GetCharsetName() { BodyData bodyData = this.BodyData; return(bodyData.CharsetName); }
internal void Load(CalendarReader reader, Charset charset) { while (reader.ReadNextComponent()) { if (ComponentId.VEvent == reader.ComponentId) { CalendarPropertyReader propertyReader = reader.PropertyReader; while (propertyReader.ReadNextProperty()) { PropertyId propertyId = propertyReader.PropertyId; if (this.dirty.ContainsKey(propertyId) && !this.properties.ContainsKey(propertyId)) { if (PropertyId.Description == propertyId || PropertyId.Comment == propertyId) { byte[] array = null; TemporaryDataStorage temporaryDataStorage = new TemporaryDataStorage(); using (Stream stream = temporaryDataStorage.OpenWriteStream(true)) { using (Stream valueReadStream = propertyReader.GetValueReadStream()) { DataStorage.CopyStreamToStream(valueReadStream, stream, long.MaxValue, ref array); } } BodyData bodyData = new BodyData(); bodyData.SetFormat(BodyFormat.Text, InternalBodyFormat.Text, charset); bodyData.SetStorage(temporaryDataStorage, 0L, long.MaxValue); temporaryDataStorage.Release(); this.properties[propertyId] = bodyData; } else if (PropertyId.Attendee == propertyId) { CalendarParameterReader parameterReader = propertyReader.ParameterReader; while (parameterReader.ReadNextParameter()) { if (parameterReader.ParameterId == ParameterId.ParticipationStatus) { this.properties[propertyId] = parameterReader.ReadValue(); } } } else { this.properties[propertyId] = propertyReader.ReadValue(); } } } } if (ComponentId.VCalendar == reader.ComponentId) { CalendarPropertyReader propertyReader2 = reader.PropertyReader; while (propertyReader2.ReadNextProperty()) { PropertyId propertyId2 = propertyReader2.PropertyId; if (PropertyId.Method == propertyId2) { this.properties[propertyId2] = propertyReader2.ReadValue(); } } } } }