This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some utility refactoring, makes the MixpanelEvent class more useful
This MixpanelEvent can be used in proxies and other places where a single generic class is needed to serialize and deserialize Mixpanel event data. Bumped version to 0.1.3 to release a new nuget package.
- Loading branch information
chris.nicola
committed
Nov 28, 2011
1 parent
9f8d26a
commit eec694c
Showing
10 changed files
with
95 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Mixpanel.NET | ||
{ | ||
/// <summary> | ||
/// Structure which represents a standard Mixpanel event. Mixpanel events are each | ||
/// given a name which is sent as "event" and a property bag sent as "properties". | ||
/// The entire event is serialized to JSON and so the property bag must contain | ||
/// only types supported by JSON serialization and should be flat (no nested properties). | ||
/// | ||
/// This class is also useful for testing or building proxies where deserialization of the | ||
/// events may be needed. | ||
/// </summary> | ||
public class MixpanelEvent | ||
{ | ||
public MixpanelEvent() { } | ||
|
||
public MixpanelEvent(string name, IDictionary<string,object> properties = null) { | ||
Event = name; | ||
Properties = properties ?? new Dictionary<string, object>(); | ||
} | ||
|
||
public string Event { get; set; } | ||
|
||
public IDictionary<string, object> Properties { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters