/// <summary> /// Parse an announcement. </summary> /// <param name="campaignId"> already parsed campaign id. </param> /// <param name="values"> campaign data. </param> /// <param name="params"> special parameters to inject in the action URL of the announcement. </param> /// <exception cref="JSONException"> if a parsing error occurs. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementAbstractAnnouncement(CampaignId campaignId, android.content.ContentValues values, java.util.Map<String, String> params) throws org.json.JSONException internal EngagementAbstractAnnouncement(CampaignId campaignId, ContentValues values, IDictionary<string, string> @params) : base(campaignId, values) { string actionURL = values.getAsString(ACTION_URL); foreach (KeyValuePair<string, string> param in @params.SetOfKeyValuePairs()) { if (actionURL != null) { actionURL = actionURL.Replace(param.Key, param.Value); } } mActionURL = actionURL; }
/// <summary> /// Parse an announcement. </summary> /// <param name="campaignId"> already parsed campaign id. </param> /// <param name="values"> campaign data. </param> /// <param name="params"> special parameters to inject in the action URL of the announcement. </param> /// <exception cref="JSONException"> if a parsing error occurs. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementAbstractAnnouncement(CampaignId campaignId, android.content.ContentValues values, java.util.Map<String, String> params) throws org.json.JSONException internal EngagementAbstractAnnouncement(CampaignId campaignId, ContentValues values, IDictionary <string, string> @params) : base(campaignId, values) { string actionURL = values.getAsString(ACTION_URL); foreach (KeyValuePair <string, string> param in @params.SetOfKeyValuePairs()) { if (actionURL != null) { actionURL = actionURL.Replace(param.Key, param.Value); } } mActionURL = actionURL; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementReachInteractiveContent(CampaignId campaignId, android.content.ContentValues values) throws org.json.JSONException internal EngagementReachInteractiveContent(CampaignId campaignId, ContentValues values) : base(campaignId, values) { /* Base fields */ /* Behavior */ string deliveryTime = values.getAsString(DELIVERY_TIME); if (deliveryTime.Equals("s")) { mBehavior = Behavior.SESSION; } else { mBehavior = Behavior.ANYTIME; } /* Notification type */ mSystemNotification = "s".Equals(values.getAsString(NOTIFICATION_TYPE)); /* Is notification closeable? */ mNotiticationCloseable = parseBoolean(values, NOTIFICATION_CLOSEABLE); /* Has notification icon? */ mNotificationIcon = parseBoolean(values, NOTIFICATION_ICON); /* Sound and vibration */ mNotificationSound = parseBoolean(values, NOTIFICATION_SOUND); mNotificationVibrate = parseBoolean(values, NOTIFICATION_VIBRATION); /* Parse texts */ mNotificationTitle = values.getAsString(NOTIFICATION_TITLE); mNotificationMessage = values.getAsString(NOTIFICATION_MESSAGE); /* Big text */ mNotificationBigText = values.getAsString(NOTIFICATION_BIG_TEXT); /* Big picture */ mNotificationBigPicture = values.getAsString(NOTIFICATION_BIG_PICTURE); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementReachInteractiveContent(CampaignId campaignId, android.content.ContentValues values) throws org.json.JSONException internal EngagementReachInteractiveContent(CampaignId campaignId, ContentValues values) : base(campaignId, values) { /* Base fields */ /* Behavior */ string deliveryTime = values.getAsString(DELIVERY_TIME); if (deliveryTime.Equals("s")) { mBehavior = Behavior.SESSION; } else { mBehavior = Behavior.ANYTIME; } /* Notification type */ mSystemNotification = "s".Equals(values.getAsString(NOTIFICATION_TYPE)); /* Is notification closeable? */ mNotiticationCloseable = parseBoolean(values, NOTIFICATION_CLOSEABLE); /* Has notification icon? */ mNotificationIcon = parseBoolean(values, NOTIFICATION_ICON); /* Sound and vibration */ mNotificationSound = parseBoolean(values, NOTIFICATION_SOUND); mNotificationVibrate = parseBoolean(values, NOTIFICATION_VIBRATION); /* Parse texts */ mNotificationTitle = values.getAsString(NOTIFICATION_TITLE); mNotificationMessage = values.getAsString(NOTIFICATION_MESSAGE); /* Big text */ mNotificationBigText = values.getAsString(NOTIFICATION_BIG_TEXT); /* Big picture */ mNotificationBigPicture = values.getAsString(NOTIFICATION_BIG_PICTURE); }