Exemple #1
0
        public Dictionary <string, string> ToDictionary()
        {
            var options = new Dictionary <string, string>();

            if (!string.IsNullOrEmpty(FaxNumber))
            {
                options.Add("faxNumber", FaxNumber);
            }
            if (!string.IsNullOrEmpty(Contact))
            {
                options.Add("contact", Contact);
            }
            if (PostponeTime.HasValue)
            {
                options.Add("postponeTime", PostponeTime.Value.ToString("s") + "Z");
            }
            if (RetriesToPerform != null)
            {
                options.Add("retriesToPerform", RetriesToPerform.ToString());
            }
            if (!string.IsNullOrEmpty(Csid))
            {
                options.Add("csid", Csid);
            }
            if (!string.IsNullOrEmpty(PageHeader))
            {
                options.Add("pageHeader", PageHeader);
            }
            if (!string.IsNullOrEmpty(Reference))
            {
                options.Add("reference", Reference);
            }
            if (!string.IsNullOrEmpty(ReplyAddress))
            {
                options.Add("replyAddress", ReplyAddress);
            }
            if (PageSize.HasValue)
            {
                options.Add("pageSize", PageSize.ToCamelCase());
            }
            if (ShouldScale.HasValue)
            {
                options.Add("fitToPage", ShouldScale.Value? "scale" : "noscale");
            }
            if (PageOrientation.HasValue)
            {
                options.Add("pageOrientation", PageOrientation.ToCamelCase());
            }
            if (PageResolution.HasValue)
            {
                options.Add("resolution", PageResolution.ToCamelCase());
            }
            if (PageRendering.HasValue)
            {
                options.Add("rendering", PageRendering.ToCamelCase());
            }
            return(options);
        }