﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Runtime.Serialization;
using System.ServiceModel;

using Hydra.Framework;
using Hydra.Framework.Exceptions;
using Hydra.DomainModel;

namespace Hydra.DomainStatus
{
    //
    // **********************************************************************
    /// <summary>
    /// Theme of an String Request
    /// </summary>
    // **********************************************************************
    //
    [Serializable]
    [DataContract(Namespace = CommonConstants.DATA_NAMESPACE)]
    public class StringThemeResult
        : Hydra.Framework.Exceptions.Status
    {
        #region Member Variables
        //
        // **********************************************************************
        /// <summary>
        /// String Element
        /// </summary>
        // **********************************************************************
        //
        [DataMember(Name = "Element")]
        public string Element = string.Empty;
        #endregion

        #region Constructors
        //
        // **********************************************************************
        /// <summary>
        /// Initializes a new instance of the <see cref="StringThemeResult"/> class.
        /// </summary>
        // **********************************************************************
        //
        public StringThemeResult()
        {
        }

        //
        // **********************************************************************
        /// <summary>
        /// Initializes a new instance of the <see cref="StringThemeResult"/> class.
        /// </summary>
        /// <param name="element">The element.</param>
        // **********************************************************************
        //
        public StringThemeResult(string element)
        {
            Element = element;
            StackTrace = "";
            StatusCode = StatusCodeType.SUCCESS;
            StatusDescription = "";
        }

        //
        // **********************************************************************
        /// <summary>
        /// Initializes a new instance of the <see cref="StringThemeResult"/> class.
        /// </summary>
        /// <param name="statusCode">The status code.</param>
        /// <param name="statusDescription">The status description.</param>
        // **********************************************************************
        //
        public StringThemeResult(StatusCodeType statusCode, string statusDescription)
        {
            StackTrace = "";
            StatusCode = statusCode;
            StatusDescription = statusDescription;
        }

        //
        // **********************************************************************
        /// <summary>
        /// Initializes a new instance of the <see cref="StringThemeResult"/> class.
        /// </summary>
        /// <param name="statusCode">The status code.</param>
        /// <param name="ex">The ex.</param>
        // **********************************************************************
        public StringThemeResult(StatusCodeType statusCode, Exception ex)
        {
            StackTrace = "";
            StatusCode = statusCode;
            StatusDescription = Hydra.Framework.Exceptions.Status.SetException(ex);
        }
        #endregion
    }
}
