Beispiel #1
0
        private void TrackMetricForOrganization(
            string metricName,
            User user,
            Action <Dictionary <string, string> > addProperties = null)
        {
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            TrackMetric(metricName, 1, properties =>
            {
                properties.Add(OrganizationAccountKey, user.Key.ToString());
                properties.Add(AccountCreationDate, GetAccountCreationDate(user));
                properties.Add(OrganizationIsRestrictedToOrganizationTenantPolicy, user.IsRestrictedToOrganizationTenantPolicy().ToString());
                addProperties?.Invoke(properties);
            });
        }