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); }
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); } }
private bool DynPropertyExists(string propertyName) { return(DynObjectDictionary.ContainsKey(propertyName)); }
public void Dispose() { DynObjectDictionary.Clear(); StateCollection.Clear(); ColorKeys.Clear(); }
public bool GetDynPropertyValue(string propertyName, out object propertyValue) { return(DynObjectDictionary.TryGetValue(propertyName, out propertyValue)); }
public void ClearDynProperties() { DynObjectDictionary.Clear(); }