/// <summary> /// For JSON deserialization /// </summary> private Protocol() { _running = false; _forceProtocolReportsToRemoteDataStore = false; _lockPasswordHash = ""; _jsonAnonymizer = new AnonymizedJsonContractResolver(this); _shareable = false; _pointsOfInterest = new List<PointOfInterest>(); _participationHorizonDays = 1; _healthTestTimes = new List<DateTime>(); }
public AnonymizedMemberValueProvider(PropertyInfo property, IValueProvider defaultMemberValueProvider, AnonymizedJsonContractResolver contractResolver) { _property = property; _defaultMemberValueProvider = defaultMemberValueProvider; _contractResolver = contractResolver; }
public string GetJSON(AnonymizedJsonContractResolver anonymizationContractResolver) { JSON_SERIALIZER_SETTINGS.ContractResolver = anonymizationContractResolver; return JsonConvert.SerializeObject(this, Formatting.None, JSON_SERIALIZER_SETTINGS).Replace('\n', ' ').Replace('\r', ' '); }
/// <summary> /// For JSON deserialization /// </summary> private Protocol() { _running = false; _forceProtocolReportsToRemoteDataStore = false; _lockPasswordHash = ""; _jsonAnonymizer = new AnonymizedJsonContractResolver(this); _shareable = false; _pointsOfInterest = new List<PointOfInterest>(); _participationHorizonDays = 1; _groupable = false; _groupedProtocols = new List<Protocol>(); _rewardThreshold = null; }
/// <summary> /// For JSON deserialization /// </summary> private Protocol() { _running = false; _forceProtocolReportsToRemoteDataStore = false; _lockPasswordHash = ""; _jsonAnonymizer = new AnonymizedJsonContractResolver(this); _shareable = false; _pointsOfInterest = new List<PointOfInterest>(); }
public string GetJSON(AnonymizedJsonContractResolver anonymizationContractResolver, bool indented) { JSON_SERIALIZER_SETTINGS.ContractResolver = anonymizationContractResolver; string json = JsonConvert.SerializeObject(this, indented ? Formatting.Indented : Formatting.None, JSON_SERIALIZER_SETTINGS); // if the json should not be indented, replace all newlines with white space if (!indented) json = json.Replace('\n', ' ').Replace('\r', ' '); return json; }
/// <summary> /// For JSON deserialization /// </summary> private Protocol() { _running = false; _forceProtocolReportsToRemoteDataStore = false; _lockPasswordHash = ""; _jsonAnonymizer = new AnonymizedJsonContractResolver(this); _shareable = false; _pointsOfInterest = new List<PointOfInterest>(); _participationHorizonDays = 1; _groupable = false; _groupedProtocols = new List<Protocol>(); _rewardThreshold = null; _gpsDesiredAccuracyMeters = GPS_DEFAULT_ACCURACY_METERS; _gpsMinTimeDelayMS = GPS_DEFAULT_MIN_TIME_DELAY_MS; _gpsMinDistanceDelayMeters = GPS_DEFAULT_MIN_DISTANCE_DELAY_METERS; }