private void OnGetProfileJson(DataModels.Profile profile, string data)
        {
            Test(profile != null);

            if (profile != null)
            {
                if (!string.IsNullOrEmpty(profile.id))
                {
                    Log.Debug("ExamplePersonalityInsights", "id: {0}", profile.id);
                }
                if (!string.IsNullOrEmpty(profile.source))
                {
                    Log.Debug("ExamplePersonalityInsights", "source: {0}", profile.source);
                }
                if (!string.IsNullOrEmpty(profile.processed_lang))
                {
                    Log.Debug("ExamplePersonalityInsights", "proccessed_lang: {0}", profile.processed_lang);
                }
                if (!string.IsNullOrEmpty(profile.word_count))
                {
                    Log.Debug("ExamplePersonalityInsights", "word_count: {0}", profile.word_count);
                }
                if (!string.IsNullOrEmpty(profile.word_count_message))
                {
                    Log.Debug("ExamplePersonalityInsights", "word_count_message: {0}", profile.word_count_message);
                }

                if (profile.tree != null)
                {
                    LogTraitTree(profile.tree);
                }

                m_GetProfileJsonTested = true;
            }
        }
Example #2
0
    private void OnGetProfile(DataModels.Profile profile, string data)
    {
        Log.Debug("ExamplePersonalityInsights", "data: {0}", data);
        if (profile != null)
        {
            if (!string.IsNullOrEmpty(profile.id))
            {
                Log.Debug("ExamplePersonalityInsights", "id: {0}", profile.id);
            }
            if (!string.IsNullOrEmpty(profile.source))
            {
                Log.Debug("ExamplePersonalityInsights", "source: {0}", profile.source);
            }
            if (!string.IsNullOrEmpty(profile.processed_lang))
            {
                Log.Debug("ExamplePersonalityInsights", "proccessed_lang: {0}", profile.processed_lang);
            }
            if (!string.IsNullOrEmpty(profile.word_count))
            {
                Log.Debug("ExamplePersonalityInsights", "word_count: {0}", profile.word_count);
            }
            if (!string.IsNullOrEmpty(profile.word_count_message))
            {
                Log.Debug("ExamplePersonalityInsights", "word_count_message: {0}", profile.word_count_message);
            }

            if (profile.tree != null)
            {
                LogTraitTree(profile.tree);
            }
        }
        else
        {
            Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
        }
    }