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

namespace ZionRobot.Models.AASP
{
	// Token: 0x02000039 RID: 57
	public class Intimacao
	{
		// Token: 0x170000D8 RID: 216
		// (get) Token: 0x0600021A RID: 538 RVA: 0x0000881E File Offset: 0x00006A1E
		// (set) Token: 0x0600021B RID: 539 RVA: 0x00008826 File Offset: 0x00006A26
		public Jornal Jornal { get; set; }

		// Token: 0x170000D9 RID: 217
		// (get) Token: 0x0600021C RID: 540 RVA: 0x0000882F File Offset: 0x00006A2F
		// (set) Token: 0x0600021D RID: 541 RVA: 0x00008837 File Offset: 0x00006A37
		public string Titulo { get; set; }

		// Token: 0x170000DA RID: 218
		// (get) Token: 0x0600021E RID: 542 RVA: 0x00008840 File Offset: 0x00006A40
		// (set) Token: 0x0600021F RID: 543 RVA: 0x00008848 File Offset: 0x00006A48
		public string TextoPublicacao { get; set; }

		// Token: 0x170000DB RID: 219
		// (get) Token: 0x06000220 RID: 544 RVA: 0x00008851 File Offset: 0x00006A51
		// (set) Token: 0x06000221 RID: 545 RVA: 0x00008859 File Offset: 0x00006A59
		public int NumeroPublicacao { get; set; }

		// Token: 0x170000DC RID: 220
		// (get) Token: 0x06000222 RID: 546 RVA: 0x00008862 File Offset: 0x00006A62
		// (set) Token: 0x06000223 RID: 547 RVA: 0x0000886A File Offset: 0x00006A6A
		public int NumeroArquivo { get; set; }

		// Token: 0x170000DD RID: 221
		// (get) Token: 0x06000224 RID: 548 RVA: 0x00008873 File Offset: 0x00006A73
		// (set) Token: 0x06000225 RID: 549 RVA: 0x0000887B File Offset: 0x00006A7B
		public string Cabecalho { get; set; }

		// Token: 0x170000DE RID: 222
		// (get) Token: 0x06000226 RID: 550 RVA: 0x00008884 File Offset: 0x00006A84
		// (set) Token: 0x06000227 RID: 551 RVA: 0x0000888C File Offset: 0x00006A8C
		public long CodigoRelacionamento { get; set; }

		// Token: 0x170000DF RID: 223
		// (get) Token: 0x06000228 RID: 552 RVA: 0x00008895 File Offset: 0x00006A95
		// (set) Token: 0x06000229 RID: 553 RVA: 0x0000889D File Offset: 0x00006A9D
		public string NumeroUnicoProcesso { get; set; }

		// Token: 0x170000E0 RID: 224
		// (get) Token: 0x0600022A RID: 554 RVA: 0x000088A6 File Offset: 0x00006AA6
		// (set) Token: 0x0600022B RID: 555 RVA: 0x000088AE File Offset: 0x00006AAE
		public string Rodape
		{
			get
			{
				return this.rodape;
			}
			set
			{
				this.rodape = ((value == null) ? string.Empty : value);
			}
		}

		// Token: 0x0600022C RID: 556 RVA: 0x000088C4 File Offset: 0x00006AC4
		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: 0x0600022D RID: 557 RVA: 0x00008980 File Offset: 0x00006B80
		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: 0x0600022E RID: 558 RVA: 0x00008AEC File Offset: 0x00006CEC
		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: 0x040000E8 RID: 232
		private string rodape;
	}
}
