Exemple #1
0
        public void RemoveDynProperty(string propertyName)
        {
            if (!DynPropertyExists(propertyName))
            {
                throw new Exception(string.Format("Property '{0}' not found." +
                                                  Environment.NewLine +
                                                  "Check the LogParserProfile definitions.", propertyName));
            }

            DynObjectDictionary.Remove(propertyName);
        }
Exemple #2
0
 public void SetDynProperty(string propertyName, object propertyValue, PropertyDataType propertyDataType = PropertyDataType.String, string format = null, Type enumType = null)
 {
     if (!DynPropertyExists(propertyName))
     {
         DynObjectDictionary.Add(propertyName, CovertValueToRequiredDataType(propertyValue != null ? propertyValue.ToString() : null, propertyDataType, enumType, format));
     }
     else
     {
         DynObjectDictionary[propertyName] = CovertValueToRequiredDataType(propertyValue != null ? propertyValue.ToString() : null, propertyDataType, enumType, format);
     }
 }
Exemple #3
0
 private bool DynPropertyExists(string propertyName)
 {
     return(DynObjectDictionary.ContainsKey(propertyName));
 }
Exemple #4
0
 public void Dispose()
 {
     DynObjectDictionary.Clear();
     StateCollection.Clear();
     ColorKeys.Clear();
 }
Exemple #5
0
 public bool GetDynPropertyValue(string propertyName, out object propertyValue)
 {
     return(DynObjectDictionary.TryGetValue(propertyName, out propertyValue));
 }
Exemple #6
0
 public void ClearDynProperties()
 {
     DynObjectDictionary.Clear();
 }