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

namespace ZionRobot.Models.AASP
{
	// Token: 0x02000049 RID: 73
	public class Intimacao
	{
		// Token: 0x17000161 RID: 353
		// (get) Token: 0x06000342 RID: 834 RVA: 0x0000A624 File Offset: 0x00008824
		// (set) Token: 0x06000343 RID: 835 RVA: 0x0000A62C File Offset: 0x0000882C
		public Jornal Jornal { get; set; }

		// Token: 0x17000162 RID: 354
		// (get) Token: 0x06000344 RID: 836 RVA: 0x0000A635 File Offset: 0x00008835
		// (set) Token: 0x06000345 RID: 837 RVA: 0x0000A63D File Offset: 0x0000883D
		public string Titulo { get; set; }

		// Token: 0x17000163 RID: 355
		// (get) Token: 0x06000346 RID: 838 RVA: 0x0000A646 File Offset: 0x00008846
		// (set) Token: 0x06000347 RID: 839 RVA: 0x0000A64E File Offset: 0x0000884E
		public string TextoPublicacao { get; set; }

		// Token: 0x17000164 RID: 356
		// (get) Token: 0x06000348 RID: 840 RVA: 0x0000A657 File Offset: 0x00008857
		// (set) Token: 0x06000349 RID: 841 RVA: 0x0000A65F File Offset: 0x0000885F
		public int NumeroPublicacao { get; set; }

		// Token: 0x17000165 RID: 357
		// (get) Token: 0x0600034A RID: 842 RVA: 0x0000A668 File Offset: 0x00008868
		// (set) Token: 0x0600034B RID: 843 RVA: 0x0000A670 File Offset: 0x00008870
		public int NumeroArquivo { get; set; }

		// Token: 0x17000166 RID: 358
		// (get) Token: 0x0600034C RID: 844 RVA: 0x0000A679 File Offset: 0x00008879
		// (set) Token: 0x0600034D RID: 845 RVA: 0x0000A681 File Offset: 0x00008881
		public string Cabecalho { get; set; }

		// Token: 0x17000167 RID: 359
		// (get) Token: 0x0600034E RID: 846 RVA: 0x0000A68A File Offset: 0x0000888A
		// (set) Token: 0x0600034F RID: 847 RVA: 0x0000A692 File Offset: 0x00008892
		public long CodigoRelacionamento { get; set; }

		// Token: 0x17000168 RID: 360
		// (get) Token: 0x06000350 RID: 848 RVA: 0x0000A69B File Offset: 0x0000889B
		// (set) Token: 0x06000351 RID: 849 RVA: 0x0000A6A3 File Offset: 0x000088A3
		public string NumeroUnicoProcesso { get; set; }

		// Token: 0x17000169 RID: 361
		// (get) Token: 0x06000352 RID: 850 RVA: 0x0000A6AC File Offset: 0x000088AC
		// (set) Token: 0x06000353 RID: 851 RVA: 0x0000A6B4 File Offset: 0x000088B4
		public string Rodape
		{
			get
			{
				return this.rodape;
			}
			set
			{
				this.rodape = ((value == null) ? string.Empty : value);
			}
		}

		// Token: 0x06000354 RID: 852 RVA: 0x0000A6C8 File Offset: 0x000088C8
		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: 0x06000355 RID: 853 RVA: 0x0000A784 File Offset: 0x00008984
		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: 0x06000356 RID: 854 RVA: 0x0000A8F0 File Offset: 0x00008AF0
		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: 0x04000167 RID: 359
		private string rodape;
	}
}
