示例#1
0
		public override void ExpandView(MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			V_0 = new SyncViewModel.u003cu003ec__DisplayClass178_0();
			V_0.u003cu003e4__this = this;
			V_0._context = _context;
			V_0._transaction = _transaction;
			if (this.get_Id() == 0)
			{
				this.set_ExtraFields(MixService.GetConfig<string>("DefaultPostAttr"));
			}
			this.set_Cultures(this.LoadCultures(this.get_Specificulture(), V_0._context, V_0._transaction));
			this.set_UrlAliases(this.GetAliases(V_0._context, V_0._transaction));
			if (!string.IsNullOrEmpty(this.get_Tags()))
			{
				this.set_ListTag(JArray.Parse(this.get_Tags()));
			}
			this.set_Columns(new List<ModuleFieldViewModel>());
			if (!string.IsNullOrEmpty(this.get_ExtraFields()))
			{
				stackVariable35 = JArray.Parse(this.get_ExtraFields());
			}
			else
			{
				stackVariable35 = new JArray();
			}
			V_5 = stackVariable35.GetEnumerator();
			try
			{
				while (V_5.MoveNext())
				{
					V_6 = V_5.get_Current();
					stackVariable41 = new ModuleFieldViewModel();
					stackVariable41.set_Name(CommonHelper.ParseJsonPropertyName(V_6.get_Item("name").ToString()));
					stackVariable49 = V_6.get_Item("title");
					if (stackVariable49 != null)
					{
						stackVariable50 = stackVariable49.ToString();
					}
					else
					{
						dummyVar0 = stackVariable49;
						stackVariable50 = null;
					}
					stackVariable41.set_Title(stackVariable50);
					if (V_6.get_Item("options") != null)
					{
						stackVariable57 = Newtonsoft.Json.Linq.Extensions.Value<JArray>(V_6.get_Item("options"));
					}
					else
					{
						stackVariable57 = new JArray();
					}
					stackVariable41.set_Options(stackVariable57);
					if (V_6.get_Item("priority") != null)
					{
						stackVariable64 = Newtonsoft.Json.Linq.Extensions.Value<int>(V_6.get_Item("priority"));
					}
					else
					{
						stackVariable64 = 0;
					}
					stackVariable41.set_Priority(stackVariable64);
					stackVariable41.set_DataType(JToken.op_Explicit(V_6.get_Item("dataType")));
					if (V_6.get_Item("width") != null)
					{
						stackVariable75 = Newtonsoft.Json.Linq.Extensions.Value<int>(V_6.get_Item("width"));
					}
					else
					{
						stackVariable75 = 3;
					}
					stackVariable41.set_Width(stackVariable75);
					if (V_6.get_Item("isUnique") != null)
					{
						stackVariable82 = Newtonsoft.Json.Linq.Extensions.Value<bool>(V_6.get_Item("isUnique"));
					}
					else
					{
						stackVariable82 = true;
					}
					stackVariable41.set_IsUnique(stackVariable82);
					if (V_6.get_Item("isRequired") != null)
					{
						stackVariable89 = Newtonsoft.Json.Linq.Extensions.Value<bool>(V_6.get_Item("isRequired"));
					}
					else
					{
						stackVariable89 = true;
					}
					stackVariable41.set_IsRequired(stackVariable89);
					if (V_6.get_Item("isDisplay") != null)
					{
						stackVariable96 = Newtonsoft.Json.Linq.Extensions.Value<bool>(V_6.get_Item("isDisplay"));
					}
					else
					{
						stackVariable96 = true;
					}
					stackVariable41.set_IsDisplay(stackVariable96);
					if (V_6.get_Item("isSelect") != null)
					{
						stackVariable103 = Newtonsoft.Json.Linq.Extensions.Value<bool>(V_6.get_Item("isSelect"));
					}
					else
					{
						stackVariable103 = false;
					}
					stackVariable41.set_IsSelect(stackVariable103);
					if (V_6.get_Item("isGroupBy") != null)
					{
						stackVariable110 = Newtonsoft.Json.Linq.Extensions.Value<bool>(V_6.get_Item("isGroupBy"));
					}
					else
					{
						stackVariable110 = false;
					}
					stackVariable41.set_IsGroupBy(stackVariable110);
					this.get_Columns().Add(stackVariable41);
				}
			}
			finally
			{
				if (V_5 != null)
				{
					V_5.Dispose();
				}
			}
			this.set_Properties(new List<ExtraProperty>());
			if (!string.IsNullOrEmpty(this.get_ExtraProperties()))
			{
				V_5 = JArray.Parse(this.get_ExtraProperties()).GetEnumerator();
				try
				{
					while (V_5.MoveNext())
					{
						V_8 = V_5.get_Current();
						this.get_Properties().Add(V_8.ToObject<ExtraProperty>());
					}
				}
				finally
				{
					if (V_5 != null)
					{
						V_5.Dispose();
					}
				}
			}
			stackVariable121 = this.get_Templates();
			if (stackVariable121 == null)
			{
				dummyVar1 = stackVariable121;
				stackVariable686 = ViewModelBase<MixCmsContext, MixTemplate, Mix.Cms.Lib.ViewModels.MixTemplates.UpdateViewModel>.Repository;
				V_9 = Expression.Parameter(System.Type.GetTypeFromHandle(//