コード例 #1
0
 /// <summary>
 /// A constructs that creates an <see cref="IssueNote"/> from the corresponding
 /// type in the webservice proxy.
 /// </summary>
 /// <param name="issueNoteData">The type defined by the webservice proxy for issue notes.</param>
 internal IssueNote(MantisConnectWebservice.IssueNoteData issueNoteData)
 {
     this.Id            = Convert.ToInt32(issueNoteData.id);
     this.Author        = new User(issueNoteData.reporter);
     this.Text          = StringUtils.WebserviceMultilineToNative(issueNoteData.text);
     this.ViewState     = new ObjectRef(issueNoteData.view_state);
     this.DateSubmitted = issueNoteData.date_submitted;
     this.LastModified  = issueNoteData.last_modified;
 }
コード例 #2
0
        /// <summary>
        /// A static method that converts and array of <see cref="IssueNote"/> to an array of
        /// issue notes in webservice proxy data type.
        /// </summary>
        /// <param name="notes">An array of issue notes.</param>
        /// <returns>An array of issue notes in webservice proxy data type.</returns>
        internal static MantisConnectWebservice.IssueNoteData[] ConvertArrayToWebservice(IssueNote[] notes)
        {
            if (notes == null)
            {
                return(null);
            }

            MantisConnectWebservice.IssueNoteData[] notesForWebservice = new MantisConnectWebservice.IssueNoteData[notes.Length];

            int i = 0;

            foreach (IssueNote note in notes)
            {
                notesForWebservice[i++] = note.ToWebservice();
            }

            return(notesForWebservice);
        }
コード例 #3
0
        /// <summary>
        /// A static method that converts and array of <see cref="IssueNote"/> to an array of 
        /// issue notes in webservice proxy data type.
        /// </summary>
        /// <param name="notes">An array of issue notes.</param>
        /// <returns>An array of issue notes in webservice proxy data type.</returns>
        internal static MantisConnectWebservice.IssueNoteData[] ConvertArrayToWebservice(IssueNote[] notes)
        {
            if (notes == null)
            {
                return null;
            }

            MantisConnectWebservice.IssueNoteData[] notesForWebservice = new MantisConnectWebservice.IssueNoteData[notes.Length];

            int i = 0;

            foreach (IssueNote note in notes)
            {
                notesForWebservice[i++] = note.ToWebservice();
            }

            return notesForWebservice;
        }