/// <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); }
/// <summary> /// Parse a campaign. </summary> /// <param name="campaignId"> already parsed campaign id. </param> /// <param name="values"> content data. </param> /// <exception cref="JSONException"> if payload parsing failure. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementReachContent(CampaignId campaignId, android.content.ContentValues values) throws org.json.JSONException internal EngagementReachContent(CampaignId campaignId, ContentValues values) { /* Parse base fields */ mCampaignId = campaignId; mDlc = values.getAsInteger(DLC); mDlcId = values.getAsString(DLC_ID); mCategory = values.getAsString(CATEGORY); long?expiry = values.getAsLong(TTL); if (expiry != null) { expiry *= 1000L; if (parseBoolean(values, USER_TIME_ZONE)) { expiry -= TimeZone.Default.getOffset(expiry); } } mExpiry = expiry; if (values.containsKey(PAYLOAD)) { Payload = new JSONObject(values.getAsString(PAYLOAD)); } }
/// <summary> /// Parse a datapush. </summary> /// <param name="campaignId"> already parsed campaign id. </param> /// <param name="values"> campaign data. </param> /// <param name="params"> special parameters to inject in the body of the datapush. </param> /// <exception cref="JSONException"> if payload parsing error occurs. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementDataPush(CampaignId campaignId, android.content.ContentValues values, java.util.Map<String, String> params) throws org.json.JSONException internal EngagementDataPush(CampaignId campaignId, ContentValues values, IDictionary<string, string> @params) : base(campaignId, values) { this.@params = @params; replacePayloadParams(); }
/// <summary> /// Parse a campaign. </summary> /// <param name="campaignId"> already parsed campaign id. </param> /// <param name="values"> content data. </param> /// <exception cref="JSONException"> if payload parsing failure. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: EngagementReachContent(CampaignId campaignId, android.content.ContentValues values) throws org.json.JSONException internal EngagementReachContent(CampaignId campaignId, ContentValues values) { /* Parse base fields */ mCampaignId = campaignId; mDlc = values.getAsInteger(DLC); mDlcId = values.getAsString(DLC_ID); mCategory = values.getAsString(CATEGORY); long? expiry = values.getAsLong(TTL); if (expiry != null) { expiry *= 1000L; if (parseBoolean(values, USER_TIME_ZONE)) { expiry -= TimeZone.Default.getOffset(expiry); } } mExpiry = expiry; if (values.containsKey(PAYLOAD)) { Payload = new JSONObject(values.getAsString(PAYLOAD)); } }
/// <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 and body 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: EngagementAnnouncement(CampaignId campaignId, android.content.ContentValues values, java.util.Map<String, String> params) throws org.json.JSONException internal EngagementAnnouncement(CampaignId campaignId, ContentValues values, IDictionary <string, string> @params) : base(campaignId, values, @params) { this.@params = @params; replacePayloadParams(); }
/// <summary> /// Parse a notification 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: EngagementNotifAnnouncement(CampaignId campaignId, android.content.ContentValues values, java.util.Map<String, String> params) throws org.json.JSONException internal EngagementNotifAnnouncement(CampaignId campaignId, ContentValues values, IDictionary <string, string> @params) : base(campaignId, values, @params) { }
/// <summary> /// Parse a notification 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: EngagementNotifAnnouncement(CampaignId campaignId, android.content.ContentValues values, java.util.Map<String, String> params) throws org.json.JSONException internal EngagementNotifAnnouncement(CampaignId campaignId, ContentValues values, IDictionary<string, string> @params) : base(campaignId, values, @params) { }
/// <summary> /// Parse a poll. </summary> /// <param name="campaignId"> already parsed campaign id. </param> /// <param name="values"> campaign data. </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: EngagementPoll(CampaignId campaignId, android.content.ContentValues values) throws org.json.JSONException internal EngagementPoll(CampaignId campaignId, ContentValues values) : base(campaignId, values) { mAnswers = new Bundle(); }