public void GetObjectData(ISerializationData dataHolder) { dataHolder.SetValue("Intensity", Intensity); dataHolder.SetValue("Decay", Decay); dataHolder.SetValue("Threshold", Threshold); dataHolder.SetValue("CauseId", CauseId); if (Direction != null) { dataHolder.SetValue("Direction", Direction.ToString()); } dataHolder.SetValue("EmotionType", EmotionType); dataHolder.SetValue("Valence", Valence); dataHolder.SetValue("AppraisalVariables", AppraisalVariables.ToArray()); dataHolder.SetValue("InfluenceMood", InfluenceMood); }
public void GetObjectData(ISerializationData dataHolder, ISerializationContext context) { dataHolder.SetValue("Intensity", Intensity); dataHolder.SetValue("Decay", Decay); dataHolder.SetValue("Threshold", Threshold); dataHolder.SetValue("CauseId", CauseId); if (Target != null) { dataHolder.SetValue("Direction", Target.ToString()); } if (EventName != null) { dataHolder.SetValue("EventName", EventName.ToString()); } if (Target != null) { dataHolder.SetValue("Target", Target); } dataHolder.SetValue("EmotionType", EmotionType); dataHolder.SetValue("Valence", Valence); dataHolder.SetValue("AppraisalVariables", AppraisalVariables.ToArray()); dataHolder.SetValue("InfluenceMood", InfluenceMood); }
public override int GetHashCode() { return(AppraisalVariables.Aggregate(CauseId.GetHashCode(), (h, s) => h ^ s.GetHashCode())); }