Esempio n. 1
0
 private void CalculateValueType()
 {
     if (this.isValueTypeInitialized)
     {
         return;
     }
     this.valueType = CalendarValueType.Unknown;
     if (this.valueTypeParameter != null)
     {
         this.valueType = CalendarCommon.GetValueTypeEnum(this.valueTypeParameter);
     }
     else
     {
         PropertyId propertyEnum = CalendarCommon.GetPropertyEnum(this.propertyName);
         if (propertyEnum != PropertyId.Unknown)
         {
             this.valueType = CalendarCommon.GetDefaultValueType(propertyEnum);
         }
     }
     if (this.valueType == CalendarValueType.Unknown)
     {
         this.valueType = CalendarValueType.Text;
     }
     this.isValueTypeInitialized = true;
 }
Esempio n. 2
0
        // Token: 0x06000746 RID: 1862 RVA: 0x00028A8C File Offset: 0x00026C8C
        public void StartProperty(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (this.validate && name.Length == 0)
            {
                throw new ArgumentException();
            }
            this.EndProperty();
            this.AssertValidState(WriteState.Component);
            PropertyId propertyEnum = CalendarCommon.GetPropertyEnum(name);

            this.propertyName = name.ToUpper();
            this.property     = propertyEnum;
            this.Save();
            this.valueType = CalendarCommon.GetDefaultValueType(propertyEnum);
            this.writer.StartProperty(this.propertyName);
            this.firstPropertyValue = true;
            this.state = WriteState.Property;
        }