// Token: 0x06000838 RID: 2104 RVA: 0x0002D914 File Offset: 0x0002BB14 public void WriteNextValue(ContentLineParser.Separators separator) { string data; if (separator == ContentLineParser.Separators.Comma) { data = ","; } else { if (separator != ContentLineParser.Separators.SemiColon) { throw new ArgumentException(); } data = ";"; } ContentLineWriteState contentLineWriteState = this.state; if (contentLineWriteState == ContentLineWriteState.PropertyValue || contentLineWriteState == ContentLineWriteState.ParameterValue) { this.WriteToStream(data); return; } throw new InvalidOperationException(CalendarStrings.InvalidState); }
// Token: 0x0600076E RID: 1902 RVA: 0x00029437 File Offset: 0x00027637 private void PrepareStartPropertyValue(ContentLineParser.Separators separator) { this.EndParameter(); this.AssertValidState(WriteState.Property); if (this.firstPropertyValue) { this.writer.WriteStartValue(); this.firstPropertyValue = false; return; } this.writer.WriteNextValue(separator); }
// Token: 0x06000817 RID: 2071 RVA: 0x0002D168 File Offset: 0x0002B368 public string ReadPropertyValue(bool returnValue, ContentLineParser.Separators expectedSeparators, bool useDefaultSeparator, out ContentLineParser.Separators endSeparator) { this.CheckDisposed("ReadPropertyValue"); if (this.propertyValueRead) { throw new InvalidOperationException(CalendarStrings.ValueAlreadyRead); } endSeparator = ContentLineParser.Separators.None; if (this.parser.State == ContentLineParser.States.ParamName || this.nodeType == ContentLineNodeType.Parameter) { while (this.ReadNextParameter()) { } } if (!useDefaultSeparator) { this.propertyValueSeparator = expectedSeparators; } if (this.parser.State == ContentLineParser.States.ValueStart) { if (useDefaultSeparator) { this.propertyValueSeparator = ContentLineParser.Separators.None; } int charCount; this.parser.ParseElement(this.charBuffer, 0, 256, out charCount, false, ContentLineParser.Separators.None); } this.DrainValueStream(); if (this.parser.State == ContentLineParser.States.End) { this.propertyValueRead = true; return(string.Empty); } ContentLineParser.Separators separators = this.propertyValueSeparator; if (!this.ValueType.CanBeMultivalued) { separators &= ~ContentLineParser.Separators.Comma; } if (!this.ValueType.CanBeCompound) { separators &= ~ContentLineParser.Separators.SemiColon; } string result = null; if (returnValue) { this.stringBuilder.Length = 0; bool flag; do { int charCount; flag = this.parser.ParseElement(this.charBuffer, 0, 256, out charCount, this.ValueType.IsTextType, separators); this.stringBuilder.Append(this.charBuffer, 0, charCount); }while (flag); result = this.stringBuilder.ToString(); } else { int charCount; while (this.parser.ParseElement(this.charBuffer, 0, 256, out charCount, this.ValueType.IsTextType, separators)) { } } this.propertyValueRead = true; this.parameterName = null; if (this.parser.State == ContentLineParser.States.ValueStartComma) { endSeparator = ContentLineParser.Separators.Comma; } else if (this.parser.State == ContentLineParser.States.ValueStartSemiColon) { endSeparator = ContentLineParser.Separators.SemiColon; } return(result); }