Esempio n. 1
0
        /// <summary>
        /// Helper method to deep compare two Application instances.
        /// </summary>
        /// <param name="a">Application instance one.</param>
        /// <param name="b">Application instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Application a, Application b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return true;
            }

            if (((object)a == null) || ((object)b == null))
            {
                return false;
            }

            // Return true if the fields match:
            return String.Equals(a.getAlias, b.getAlias, StringComparison.Ordinal) &&
                   String.Equals(a.getApplicationId, b.getApplicationId, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getVoiceUrl, b.getVoiceUrl, StringComparison.Ordinal) &&
                   String.Equals(a.getVoiceFallbackUrl, b.getVoiceFallbackUrl, StringComparison.Ordinal) &&
                   String.Equals(a.getSmsUrl, b.getSmsUrl, StringComparison.Ordinal) &&
                   String.Equals(a.getSmsFallbackUrl, b.getSmsFallbackUrl, StringComparison.Ordinal) &&
                   String.Equals(a.getCallConnectUrl, b.getCallConnectUrl, StringComparison.Ordinal) &&
                   String.Equals(a.getStatusCallbackUrl, b.getStatusCallbackUrl, StringComparison.Ordinal) &&

                   PersyCommon.Equal(a, b);
        }
        /// <summary>
        /// Helper method to deep compare two IncomingPhoneNumber instances.
        /// </summary>
        /// <param name="a">IncomingPhoneNumber instance one.</param>
        /// <param name="b">IncomingPhoneNumber instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(IncomingPhoneNumber a, IncomingPhoneNumber b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            // Return true if the fields match:
            return(String.Equals(a.getAlias, b.getAlias, StringComparison.Ordinal) &&
                   String.Equals(a.getApplicationId, b.getApplicationId, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getPhoneNumberId, b.getPhoneNumberId, StringComparison.Ordinal) &&
                   String.Equals(a.getPhoneNumber, b.getPhoneNumber, StringComparison.Ordinal) &&
                   String.Equals(a.getRegion, b.getRegion, StringComparison.Ordinal) &&
                   String.Equals(a.getCountry, b.getCountry, StringComparison.Ordinal) &&
                   (a.getVoiceEnabled == b.getVoiceEnabled) &&
                   (a.getSmsEnabled == b.getSmsEnabled) &&

                   PersyCommon.Equal(a, b));
        }
Esempio n. 3
0
        /// <summary>
        /// Helper method to deep compare two Call instances.
        /// </summary>
        /// <param name="a">Call instance one.</param>
        /// <param name="b">Call instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Call a, Call b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            return(String.Equals(a.getCallId, b.getCallId, StringComparison.Ordinal) &&
                   String.Equals(a.getParentCallId, b.getParentCallId, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getTo, b.getTo, StringComparison.Ordinal) &&
                   String.Equals(a.getFrom, b.getFrom, StringComparison.Ordinal) &&
                   String.Equals(a.getPhoneNumberId, b.getPhoneNumberId, StringComparison.Ordinal) &&
                   (a.getStatus == b.getStatus) &&
                   ((DateTime.Compare(a.getStartTime, b.getStartTime) == 0) ? true : false) &&
                   ((DateTime.Compare(a.getEndTime, b.getEndTime) == 0) ? true : false) &&
                   (a.getDurationSec == b.getDurationSec) &&
                   (a.getDirection == b.getDirection) &&
                   (a.getAnsweredBy == b.getAnsweredBy) &&
                   String.Equals(a.getCallerName, b.getCallerName, StringComparison.Ordinal) &&
                   DictionaryEqual(a.subresourceUris, b.subresourceUris) &&
                   PersyCommon.Equal(a, b));
        }
Esempio n. 4
0
        /// <summary>
        /// Helper method to deep compare two Participant instances.
        /// </summary>
        /// <param name="a">Participant instance one.</param>
        /// <param name="b">Participant instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Participant a, Participant b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            return(String.Equals(a.getConferenceId, b.getConferenceId, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getCallId, b.getCallId, StringComparison.Ordinal) &&
                   (a.getListen == b.getListen) &&
                   (a.getTalk == b.getTalk) &&
                   (a.getStartConfOnEnter == b.getStartConfOnEnter) &&
                   PersyCommon.Equal(a, b));
        }
Esempio n. 5
0
        /// <summary>
        /// Helper method to deep compare two Recording instances.
        /// </summary>
        /// <param name="a">Recording instance one.</param>
        /// <param name="b">Recording instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Recording a, Recording b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            // Return true if the fields match:
            return(String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getRecordingId, b.getRecordingId, StringComparison.Ordinal) &&
                   String.Equals(a.getCallId, b.getCallId, StringComparison.Ordinal) &&
                   String.Equals(a.getConferenceId, b.getConferenceId, StringComparison.Ordinal) &&
                   (a.getDurationSec == b.getDurationSec) &&
                   PersyCommon.Equal(a, b));
        }
Esempio n. 6
0
        /// <summary>
        /// Helper method to deep compare two CallingNumber instances.
        /// </summary>
        /// <param name="a">CallingNumber instance one.</param>
        /// <param name="b">CallingNumber instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(CallingNumber a, CallingNumber b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            // Return true if the fields match:
            return(String.Equals(a.getAlias, b.getAlias, StringComparison.Ordinal) &&
                   String.Equals(a.getPhoneNumber, b.getPhoneNumber, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getCallingNumberId, b.getCallingNumberId, StringComparison.Ordinal) &&

                   PersyCommon.Equal(a, b));
        }
Esempio n. 7
0
        /// <summary>
        /// Helper method to deep compare two Account instances.
        /// </summary>
        /// <param name="a">Account instance one.</param>
        /// <param name="b">Account instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Account a, Account b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            return(String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getAuthToken, b.getAuthToken, StringComparison.Ordinal) &&
                   String.Equals(a.getLabel, b.getLabel, StringComparison.Ordinal) &&
                   String.Equals(a.getAlias, b.getAlias, StringComparison.Ordinal) &&
                   (a.getType == b.getType) &&
                   (a.getStatus == b.getStatus) &&
                   DictionaryEqual(a.subresourceUris, b.subresourceUris) &&
                   PersyCommon.Equal(a, b));
        }
Esempio n. 8
0
        /// <summary>
        /// Helper method to deep compare two Queue instances.
        /// </summary>
        /// <param name="a">Queue instance one.</param>
        /// <param name="b">Queue instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Queue a, Queue b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            // Return true if the fields match:
            return(String.Equals(a.getQueueId, b.getQueueId, StringComparison.Ordinal) &&
                   String.Equals(a.getAlias, b.getAlias, StringComparison.Ordinal) &&
                   (a.getCurrentSize == b.getCurrentSize) &&
                   (a.getMaxSize == b.getMaxSize) &&
                   (a.getAverageWaitTime == b.getAverageWaitTime) &&
                   DictionaryEqual(a.subresourceUris, b.subresourceUris) &&
                   PersyCommon.Equal(a, b));
        }
Esempio n. 9
0
        /// <summary>
        /// Helper method to deep compare two Conference instances.
        /// </summary>
        /// <param name="a">Conference instance one.</param>
        /// <param name="b">Conference instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Conference a, Conference b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            return(String.Equals(a.getConferenceId, b.getConferenceId, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getAlias, b.getAlias, StringComparison.Ordinal) &&
                   (a.getStatus == b.getStatus) &&
                   (a.getPlayBeep == b.getPlayBeep) &&
                   (a.getRecord == b.getRecord) &&
                   String.Equals(a.getWaitUrl, b.getWaitUrl, StringComparison.Ordinal) &&
                   String.Equals(a.getStatusCallBackUrl, b.getStatusCallBackUrl, StringComparison.Ordinal) &&
                   DictionaryEqual(a.subresourceUris, b.subresourceUris) &&
                   PersyCommon.Equal(a, b));
        }
Esempio n. 10
0
        /// <summary>
        /// Helper method to deep compare two Message instances.
        /// </summary>
        /// <param name="a">Message instance one.</param>
        /// <param name="b">Message instance two.</param>
        /// <returns>True is a == b, otherwise false.</returns>
        public static bool Equal(Message a, Message b)
        {
            if (System.Object.ReferenceEquals(a, b))
            {
                return(true);
            }

            if (((object)a == null) || ((object)b == null))
            {
                return(false);
            }

            // Return true if the fields match:
            return(String.Equals(a.getMessageId, b.getMessageId, StringComparison.Ordinal) &&
                   String.Equals(a.getAccountId, b.getAccountId, StringComparison.Ordinal) &&
                   String.Equals(a.getFrom, b.getFrom, StringComparison.Ordinal) &&
                   String.Equals(a.getTo, b.getTo, StringComparison.Ordinal) &&
                   String.Equals(a.getText, b.getText, StringComparison.Ordinal) &&
                   a.getDirection == b.getDirection &&
                   a.getStatus == b.getStatus &&
                   String.Equals(a.getNotificationUrl, b.getNotificationUrl, StringComparison.Ordinal) &&
                   PersyCommon.Equal(a, b));
        }