/// <summary> /// Returns dictionary that contains Mixpanel message and is ready to be serialized. /// </summary> /// <param name="builder"> /// An override of <see cref="MessageBuilderBase"/> to use to generate message data. /// </param> /// <param name="userProperties">Object that contains user defined properties.</param> /// <param name="extraProperties"> /// Object created by calling method. Usually contains properties that are passed to calling method /// as arguments. /// </param> private IDictionary<string, object> GetMessageObject( MessageBuilderBase builder, object userProperties, object extraProperties) { var md = new MessageData( builder.SpecialPropsBindings, builder.DistinctIdPropsBindings, builder.MessagePropetiesRules, builder.SuperPropertiesRules, _config); md.SetProperty(MixpanelProperty.Token, _token); md.ParseAndSetSuperProperties(_superProperties); md.ParseAndSetProperties(userProperties); md.ParseAndSetPropertiesIfNotNull(extraProperties); return builder.GetMessageObject(md); }
/// <summary> /// Returns dictionary that contains Mixpanel message and is ready to be serialized. /// </summary> /// <param name="builder"> /// An override of <see cref="MessageBuilderBase"/> to use to generate message data. /// </param> /// <param name="userProperties">Object that contains user defined properties.</param> /// <param name="extraProperties"> /// Object created by calling method. Usually contains properties that are passed to calling method /// as arguments. /// </param> /// <param name="propetyRules"> /// Additional rules that will be appended to user defined properties. /// </param> private IDictionary<string, object> GetMessageObject( MessageBuilderBase builder, object userProperties, object extraProperties, MessagePropetyRules propetyRules = MessagePropetyRules.None) { var od = new MessageData(builder.SpecialPropsBindings, propetyRules, _config); od.ParseAndSetProperties(userProperties); od.SetProperty(MixpanelProperty.Token, _token); od.ParseAndSetPropertiesIfNotNull(extraProperties); od.ParseAndSetProperties(_superProperties); return builder.GetMessageObject(od); }