using System;
using System.Globalization;
using System.Reflection;

namespace ZionRobot.Models.AASP
{
	// Token: 0x02000045 RID: 69
	public class Intimacao
	{
		// Token: 0x1700014C RID: 332
		// (get) Token: 0x06000314 RID: 788 RVA: 0x0000A122 File Offset: 0x00008322
		// (set) Token: 0x06000315 RID: 789 RVA: 0x0000A12A File Offset: 0x0000832A
		public Jornal Jornal { get; set; }

		// Token: 0x1700014D RID: 333
		// (get) Token: 0x06000316 RID: 790 RVA: 0x0000A133 File Offset: 0x00008333
		// (set) Token: 0x06000317 RID: 791 RVA: 0x0000A13B File Offset: 0x0000833B
		public string Titulo { get; set; }

		// Token: 0x1700014E RID: 334
		// (get) Token: 0x06000318 RID: 792 RVA: 0x0000A144 File Offset: 0x00008344
		// (set) Token: 0x06000319 RID: 793 RVA: 0x0000A14C File Offset: 0x0000834C
		public string TextoPublicacao { get; set; }

		// Token: 0x1700014F RID: 335
		// (get) Token: 0x0600031A RID: 794 RVA: 0x0000A155 File Offset: 0x00008355
		// (set) Token: 0x0600031B RID: 795 RVA: 0x0000A15D File Offset: 0x0000835D
		public int NumeroPublicacao { get; set; }

		// Token: 0x17000150 RID: 336
		// (get) Token: 0x0600031C RID: 796 RVA: 0x0000A166 File Offset: 0x00008366
		// (set) Token: 0x0600031D RID: 797 RVA: 0x0000A16E File Offset: 0x0000836E
		public int NumeroArquivo { get; set; }

		// Token: 0x17000151 RID: 337
		// (get) Token: 0x0600031E RID: 798 RVA: 0x0000A177 File Offset: 0x00008377
		// (set) Token: 0x0600031F RID: 799 RVA: 0x0000A17F File Offset: 0x0000837F
		public string Cabecalho { get; set; }

		// Token: 0x17000152 RID: 338
		// (get) Token: 0x06000320 RID: 800 RVA: 0x0000A188 File Offset: 0x00008388
		// (set) Token: 0x06000321 RID: 801 RVA: 0x0000A190 File Offset: 0x00008390
		public long CodigoRelacionamento { get; set; }

		// Token: 0x17000153 RID: 339
		// (get) Token: 0x06000322 RID: 802 RVA: 0x0000A199 File Offset: 0x00008399
		// (set) Token: 0x06000323 RID: 803 RVA: 0x0000A1A1 File Offset: 0x000083A1
		public string NumeroUnicoProcesso { get; set; }

		// Token: 0x17000154 RID: 340
		// (get) Token: 0x06000324 RID: 804 RVA: 0x0000A1AA File Offset: 0x000083AA
		// (set) Token: 0x06000325 RID: 805 RVA: 0x0000A1B2 File Offset: 0x000083B2
		public string Rodape
		{
			get
			{
				return this.rodape;
			}
			set
			{
				this.rodape = ((value == null) ? string.Empty : value);
			}
		}

		// Token: 0x06000326 RID: 806 RVA: 0x0000A1C8 File Offset: 0x000083C8
		public string GetParamValue(string paramName)
		{
			object obj = this;
			string[] nameParts = paramName.Split(new char[]
			{
				'.'
			});
			bool flag = nameParts.Length == 1;
			string result;
			if (flag)
			{
				object propertyValue = obj.GetType().GetProperty(paramName).GetValue(obj);
				result = ((propertyValue == null) ? string.Empty : propertyValue.ToString());
			}
			else
			{
				foreach (string part in nameParts)
				{
					bool flag2 = obj == null;
					if (flag2)
					{
						break;
					}
					Type type = obj.GetType();
					PropertyInfo info = type.GetProperty(part);
					bool flag3 = info == null;
					if (flag3)
					{
						break;
					}
					obj = info.GetValue(obj, null);
				}
				result = obj.ToString();
			}
			return result;
		}

		// Token: 0x06000327 RID: 807 RVA: 0x0000A284 File Offset: 0x00008484
		public string GetAllParam()
		{
			return string.Join("\r\n", new string[]
			{
				this.Jornal.GetAllParam(),
				"Titulo: " + this.Titulo.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				"TextoPublicacao: " + this.TextoPublicacao.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				string.Format("{0}: {1}", "NumeroPublicacao", this.NumeroPublicacao),
				string.Format("{0}: {1}", "NumeroArquivo", this.NumeroArquivo),
				"Cabecalho: " + this.Cabecalho.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				"Rodape: " + this.Rodape.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				string.Format("{0}: {1}", "CodigoRelacionamento", this.CodigoRelacionamento),
				"NumeroUnicoProcesso: " + this.NumeroUnicoProcesso
			});
		}

		// Token: 0x06000328 RID: 808 RVA: 0x0000A3F0 File Offset: 0x000085F0
		public string GetParamAASP()
		{
			DateTime dateTime;
			DateTime.TryParse(this.Jornal.DataDisponibilizacao_Publicacao, out dateTime);
			this.Jornal.DataDisponibilizacao_Publicacao = dateTime.ToString("D", new CultureInfo("pt-BR"));
			return string.Join(" - ", new string[]
			{
				this.Jornal.NomeJornal,
				this.Jornal.TermoReferenciaData,
				this.Jornal.DataDisponibilizacao_Publicacao,
				string.Format("{0}: {1}", "NumeroArquivo", this.NumeroArquivo),
				string.Format("{0}: {1}", "NumeroPublicacao", this.NumeroPublicacao),
				"Titulo: " + this.Titulo.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				"Cabecalho: " + this.Cabecalho.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				"TextoPublicacao: " + this.TextoPublicacao.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " "),
				"Rodape: " + this.Rodape.Replace('\r', ' ').Replace('\n', ' ').Replace("  ", " ")
			});
		}

		// Token: 0x04000151 RID: 337
		private string rodape;
	}
}
