Пример #1
0
		public static RepositoryResponse<string> ExportAttributeToExcel(List<JObject> lstData, string sheetName, string folderPath, string fileName, List<string> headers = null)
		{
			V_0 = new RepositoryResponse<string>();
			try
			{
				if (lstData.get_Count() <= 0)
				{
					V_0.get_Errors().Add("Can not export data of empty list");
					V_16 = V_0;
				}
				else
				{
					V_3 = DateTime.get_Now();
					V_1 = string.Concat(fileName, "-", V_3.ToString("yyyyMMdd"), ".xlsx");
					V_2 = new DataTable();
					if (headers != null)
					{
						V_6 = headers.GetEnumerator();
						try
						{
							while (V_6.MoveNext())
							{
								V_7 = V_6.get_Current();
								dummyVar1 = V_2.get_Columns().Add(V_7, Type.GetTypeFromHandle(// 
								// Current member / type: Mix.Domain.Core.ViewModels.RepositoryResponse`1<System.String> Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.Helper::ExportAttributeToExcel(System.Collections.Generic.List`1<Newtonsoft.Json.Linq.JObject>,System.String,System.String,System.String,System.Collections.Generic.List`1<System.String>)
								// Exception in: Mix.Domain.Core.ViewModels.RepositoryResponse<System.String> ExportAttributeToExcel(System.Collections.Generic.List<Newtonsoft.Json.Linq.JObject>,System.String,System.String,System.String,System.Collections.Generic.List<System.String>)
								// Specified method is not supported.
								// 
								// mailto: [email protected]


		public static async Task<RepositoryResponse<PaginationModel<TView>>> FilterByKeywordAsync<TView>(string culture, string attributeSetName, RequestPaging request, string keyword, Dictionary<string, StringValues> queryDictionary = null, MixCmsContext _context = null, IDbContextTransaction _transaction = null)
Пример #2
0
 private void RemoveTransitiveEdges()
 {
     V_0 = this.GenerateNodeToIndex();
     V_1 = this.GeenrateAdjacencyMatrix(V_0);
     this.WarsawTransitiveClosure(V_1);
     V_2 = this.inferenceGraph.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             V_4 = this.inferenceGraph.GetEnumerator();
             try
             {
                 while (V_4.MoveNext())
                 {
                     V_5 = V_4.get_Current();
                     V_6 = this.inferenceGraph.GetEnumerator();
                     try
                     {
                         while (V_6.MoveNext())
                         {
                             V_7  = V_6.get_Current();
                             V_8  = V_0.get_Item(V_3);
                             V_9  = V_0.get_Item(V_5);
                             V_10 = V_0.get_Item(V_7);
                             if (!V_1[V_8, V_9] || !V_1[V_9, V_10] || V_3.get_IsHardNode() && V_7.get_IsHardNode() || !V_3.get_SubTypes().Contains(V_7))
                             {
                                 continue;
                             }
                             this.RemoveSubtype(V_3, V_7);
                         }
                     }
                     finally
                     {
                         if (V_6 != null)
                         {
                             V_6.Dispose();
                         }
                     }
                 }
             }
             finally
             {
                 if (V_4 != null)
                 {
                     V_4.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return;
 }
Пример #3
0
		public IServiceProvider CreateContainer(ShellSettings settings, ShellBlueprint blueprint)
		{
			V_0 = this._serviceProvider.CreateChildContainer(this._applicationServices);
			dummyVar0 = ServiceCollectionServiceExtensions.AddSingleton<ShellSettings>(V_0, settings);
			stackVariable8 = V_0;
			stackVariable9 = ShellContainerFactory.u003cu003ec.u003cu003e9__7_0;
			if (stackVariable9 == null)
			{
				dummyVar1 = stackVariable9;
				stackVariable9 = new Func<IServiceProvider, IShellConfiguration>(ShellContainerFactory.u003cu003ec.u003cu003e9.u003cCreateContaineru003eb__7_0);
				ShellContainerFactory.u003cu003ec.u003cu003e9__7_0 = stackVariable9;
			}
			dummyVar2 = ServiceCollectionServiceExtensions.AddSingleton<IShellConfiguration>(stackVariable8, stackVariable9);
			dummyVar3 = ServiceCollectionServiceExtensions.AddSingleton<ShellDescriptor>(V_0, blueprint.get_Descriptor());
			dummyVar4 = ServiceCollectionServiceExtensions.AddSingleton<ShellBlueprint>(V_0, blueprint);
			this.AddCoreServices(V_0);
			V_1 = this._serviceProvider.CreateChildContainer(this._applicationServices);
			stackVariable26 = blueprint.get_Dependencies();
			stackVariable27 = ShellContainerFactory.u003cu003ec.u003cu003e9__7_3;
			if (stackVariable27 == null)
			{
				dummyVar5 = stackVariable27;
				stackVariable27 = new Func<KeyValuePair<Type, FeatureEntry>, bool>(ShellContainerFactory.u003cu003ec.u003cu003e9.u003cCreateContaineru003eb__7_3);
				ShellContainerFactory.u003cu003ec.u003cu003e9__7_3 = stackVariable27;
			}
			V_6 = stackVariable26.Where<KeyValuePair<Type, FeatureEntry>>(stackVariable27).GetEnumerator();
			try
			{
				while (V_6.MoveNext())
				{
					V_7 = V_6.get_Current();
					ServiceCollectionDescriptorExtensions.TryAddEnumerable(V_1, ServiceDescriptor.Singleton(Type.GetTypeFromHandle(// 
Пример #4
0
 private bool TryMakeLoop(IntervalConstruct interval, DominatorTree dominatorTree)
 {
     V_0 = DFSTBuilder.BuildTree(interval);
     if (V_0.get_BackEdges().get_Count() == 0)
     {
         return(false);
     }
     V_2 = this.BuildLoop(V_0, out V_1);
     V_4 = this.DetermineLoopType(V_1, V_2, interval, dominatorTree, out V_3);
     if (V_1.get_Count() > 0)
     {
         V_5 = new LoopLogicalConstruct(interval.get_Entry() as ILogicalConstruct, V_1, V_4, V_3, this.typeSystem);
         this.CleanUpEdges(V_5);
         this.UpdateDominatorTree(dominatorTree, V_5);
         return(true);
     }
     V_6 = V_0.get_BackEdges().GetEnumerator();
     try
     {
         while (V_6.MoveNext())
         {
             V_7 = V_6.get_Current();
             this.MarkAsGotoEdge(V_7.get_Start().get_Construct() as ILogicalConstruct, V_7.get_End().get_Construct() as ILogicalConstruct);
         }
     }
     finally
     {
         ((IDisposable)V_6).Dispose();
     }
     return(false);
 }
Пример #5
0
 public List <FileViewModel> GetWebFiles(string folder)
 {
     stackVariable1    = new string[3];
     stackVariable1[0] = "wwwroot";
     stackVariable1[1] = "content";
     stackVariable1[2] = folder;
     V_0 = CommonHelper.GetFullPath(stackVariable1);
     this.CreateDirectoryIfNotExist(V_0);
     V_1 = new List <FileViewModel>();
     V_2 = Directory.GetDirectories(V_0, "*", 1);
     V_3 = 0;
     while (V_3 < (int)V_2.Length)
     {
         V_4             = new DirectoryInfo(V_2[V_3]);
         V_5             = V_4.ToString().Replace("\\", "/").Replace("wwwroot", string.Empty);
         stackVariable34 = V_4.GetFiles();
         stackVariable35 = FileRepository.u003cu003ec.u003cu003e9__31_0;
         if (stackVariable35 == null)
         {
             dummyVar0       = stackVariable35;
             stackVariable35 = new Func <FileInfo, DateTime>(FileRepository.u003cu003ec.u003cu003e9.u003cGetWebFilesu003eb__31_0);
             FileRepository.u003cu003ec.u003cu003e9__31_0 = stackVariable35;
         }
         V_6 = ((IEnumerable <FileInfo>)stackVariable34).OrderByDescending <FileInfo, DateTime>(stackVariable35).GetEnumerator();
         try
         {
             while (V_6.MoveNext())
             {
                 V_7             = V_6.get_Current();
                 stackVariable42 = V_1;
                 stackVariable43 = new FileViewModel();
                 stackVariable43.set_FolderName(V_4.get_Name());
                 stackVariable43.set_FileFolder(V_5);
                 if (V_7.get_Name().LastIndexOf('.') >= 0)
                 {
                     stackVariable59 = V_7.get_Name().Substring(0, V_7.get_Name().LastIndexOf('.'));
                 }
                 else
                 {
                     stackVariable59 = V_7.get_Name();
                 }
                 stackVariable43.set_Filename(stackVariable59);
                 stackVariable43.set_Extension(V_7.get_Extension());
                 stackVariable42.Add(stackVariable43);
             }
         }
         finally
         {
             if (V_6 != null)
             {
                 V_6.Dispose();
             }
         }
         V_3 = V_3 + 1;
     }
     return(V_1);
 }
		private void GenerateStackData()
		{
			V_0 = new StackUsageData();
			V_1 = this.instructionOffsetToUsedInstructionsMap.GetEnumerator();
			try
			{
				while (V_1.MoveNext())
				{
					V_2 = V_1.get_Current();
					V_3 = new List<VariableDefinition>(V_2.get_Value().Select<int, VariableDefinition>(new Func<int, VariableDefinition>(this.u003cGenerateStackDatau003eb__25_0)));
					V_0.get_InstructionOffsetToUsedStackVariablesMap().set_Item(V_2.get_Key(), V_3);
					V_4 = V_3.GetEnumerator();
					try
					{
						while (V_4.MoveNext())
						{
							V_5 = V_4.get_Current();
							this.GetDefineUseInfo(V_0, V_5).get_UsedAt().Add(V_2.get_Key());
						}
					}
					finally
					{
						((IDisposable)V_4).Dispose();
					}
				}
			}
			finally
			{
				((IDisposable)V_1).Dispose();
			}
			V_6 = this.instructionOffsetToVariableDefinitionMap.GetEnumerator();
			try
			{
				while (V_6.MoveNext())
				{
					V_7 = V_6.get_Current();
					if (V_7.get_Key() >= 0)
					{
						V_0.get_InstructionOffsetToAssignedVariableMap().Add(V_7.get_Key(), V_7.get_Value());
						dummyVar0 = this.GetDefineUseInfo(V_0, V_7.get_Value()).get_DefinedAt().Add(V_7.get_Key());
					}
					else
					{
						V_0.get_ExceptionHandlerStartToExceptionVariableMap().Add(-V_7.get_Key(), V_7.get_Value());
					}
				}
			}
			finally
			{
				((IDisposable)V_6).Dispose();
			}
			this.methodContext.set_StackData(V_0);
			return;
		}
 protected override string ToString(string constructName, HashSet <CFGBlockLogicalConstruct> printedCFGBlocks, LogicalFlowBuilderContext context)
 {
     V_0       = new StringBuilder(this.GetType().get_Name());
     dummyVar0 = V_0.AppendLine();
     dummyVar1 = V_0.AppendLine("{");
     this.IndentAndAppendString(V_0, (this.get_Entry() as LogicalConstructBase).ToString(context));
     dummyVar2 = V_0.AppendLine();
     if (this.get_DefaultCase() != null)
     {
         this.IndentAndAppendString(V_0, this.get_DefaultCase().ToString(context));
     }
     V_1 = this.get_ConditionCases();
     V_2 = 0;
     while (V_2 < (int)V_1.Length)
     {
         this.IndentAndAppendString(V_0, V_1[V_2].ToString(context));
         V_2 = V_2 + 1;
     }
     V_4 = this.get_NonDominatedCFGSuccessors().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5       = V_4.get_Current();
             dummyVar3 = V_0.Append("\tCase");
             V_6       = V_5.get_Key().GetEnumerator();
             try
             {
                 while (V_6.MoveNext())
                 {
                     V_7       = V_6.get_Current();
                     dummyVar4 = V_0.Append(" ").Append(V_7);
                 }
             }
             finally
             {
                 ((IDisposable)V_6).Dispose();
             }
             dummyVar5 = V_0.Append(": ").AppendLine(this.NodeILOffset(context, V_5.get_Value()));
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     if (this.get_DefaultCase() == null)
     {
         dummyVar6 = V_0.Append("\tDefault: ").AppendLine(this.NodeILOffset(context, this.get_DefaultCFGSuccessor()));
     }
     dummyVar7 = V_0.Append("\tFollowNode: ").AppendLine(this.NodeILOffset(context, this.get_CFGFollowNode()));
     dummyVar8 = V_0.AppendLine("}");
     printedCFGBlocks.UnionWith(this.get_CFGBlocks());
     return(V_0.ToString());
 }
Пример #8
0
 private void AddBlocks(List <ILBlock.InstructionPair> allBranches)
 {
     V_0 = allBranches.get_Count() - 1;
     while (V_0 >= 0)
     {
         V_1 = allBranches.get_Item(V_0).get_FirstInstruction().get_Offset() + allBranches.get_Item(V_0).get_FirstInstruction().GetSize();
         V_2 = allBranches.get_Item(V_0).get_SecondInstruction().get_Offset();
         if (V_2 < V_1)
         {
             V_3 = null;
             V_4 = allBranches.get_Item(V_0).get_SecondInstruction().get_Previous();
             if (V_4 != null && !OpCodeInfo.IsUnconditionalBranch(V_4.get_OpCode()))
             {
                 V_3 = allBranches.get_Item(V_0).get_SecondInstruction();
             }
             V_5 = false;
             V_6 = allBranches.GetEnumerator();
             try
             {
                 while (V_6.MoveNext())
                 {
                     V_7 = V_6.get_Current();
                     if (V_7.get_FirstInstruction().get_Offset() >= V_2 && V_7.get_FirstInstruction().get_Offset() < V_1 || V_2 > V_7.get_SecondInstruction().get_Offset() || V_7.get_SecondInstruction().get_Offset() >= V_1)
                     {
                         continue;
                     }
                     if (V_3 != null)
                     {
                         if ((object)V_7.get_SecondInstruction() == (object)V_3)
                         {
                             continue;
                         }
                         V_5 = true;
                     }
                     else
                     {
                         V_3 = V_7.get_SecondInstruction();
                     }
                 }
             }
             finally
             {
                 ((IDisposable)V_6).Dispose();
             }
             if (!V_5)
             {
                 dummyVar0 = this.AddNestedBlock(new ILBlock(1, V_2, V_1, V_3));
             }
         }
         V_0 = V_0 - 1;
     }
     return;
 }
Пример #9
0
 private string RemoveLeadingLineWhitespaces(string text)
 {
     V_0 = new StringBuilder();
     V_1 = new List <string>();
     V_2 = 0x7fffffff;
     V_3 = new StringReader(text);
     try
     {
         V_4 = V_3.ReadLine();
         while (V_4 != null)
         {
             V_5 = 0;
             while (V_5 < V_4.get_Length())
             {
                 if (Char.IsWhiteSpace(V_4.get_Chars(V_5)))
                 {
                     V_5 = V_5 + 1;
                 }
                 else
                 {
                     V_2 = Math.Min(V_2, V_5);
                     V_1.Add(V_4);
                     break;
                 }
             }
             V_4 = V_3.ReadLine();
         }
     }
     finally
     {
         if (V_3 != null)
         {
             ((IDisposable)V_3).Dispose();
         }
     }
     V_6 = V_1.GetEnumerator();
     try
     {
         while (V_6.MoveNext())
         {
             V_7       = V_6.get_Current();
             dummyVar0 = V_0.AppendLine(V_7.Substring(V_2));
         }
     }
     finally
     {
         ((IDisposable)V_6).Dispose();
     }
     return(V_0.ToString());
 }
Пример #10
0
 private void RemoveUnreachableBlocks()
 {
     V_0 = new HashSet <InstructionBlock>();
     V_1 = this.theCFG.get_Blocks();
     V_2 = 0;
     while (V_2 < (int)V_1.Length)
     {
         V_3 = V_1[V_2];
         if (!this.reachableBlocks.Contains(V_3))
         {
             V_3.set_Successors(new InstructionBlock[0]);
             dummyVar0 = V_0.Add(V_3);
         }
         V_2 = V_2 + 1;
     }
     if (V_0.get_Count() > 0)
     {
         this.decompilationContext.get_MethodContext().set_IsMethodBodyChanged(true);
     }
     V_4 = 0;
     while (V_4 < this.theCFG.get_RawExceptionHandlers().get_Count())
     {
         V_5 = this.theCFG.get_RawExceptionHandlers().get_Item(V_4);
         if (V_0.Contains(this.theCFG.get_InstructionToBlockMapping().get_Item(V_5.get_TryStart().get_Offset())))
         {
             stackVariable54 = V_4;
             V_4             = stackVariable54 - 1;
             this.theCFG.get_RawExceptionHandlers().RemoveAt(stackVariable54);
         }
         V_4 = V_4 + 1;
     }
     V_6 = V_0.GetEnumerator();
     try
     {
         while (V_6.MoveNext())
         {
             V_7 = V_6.get_Current();
             this.theCFG.RemoveBlockAt(V_7.get_Index());
         }
     }
     finally
     {
         ((IDisposable)V_6).Dispose();
     }
     return;
 }
Пример #11
0
        private void RemoveBlockingEdges(List <IntervalConstruct> intervals)
        {
            V_0 = new IntervalConstruct(intervals.get_Item(0));
            V_5 = 1;
            while (V_5 < intervals.get_Count())
            {
                dummyVar0 = V_0.get_Children().Add(intervals.get_Item(V_5));
                V_5       = V_5 + 1;
            }
            V_1 = DFSTBuilder.BuildTree(V_0);
            V_2 = V_1.get_BackEdges().FirstOrDefault <DFSTEdge>();
            if (V_2 == null)
            {
                V_2 = V_1.get_CrossEdges().FirstOrDefault <DFSTEdge>();
            }
            V_3 = V_2.get_Start().get_Construct() as IntervalConstruct;
            V_4 = V_2.get_End().get_Construct() as IntervalConstruct;
            V_6 = V_4.get_Entry().get_SameParentPredecessors().GetEnumerator();
            try
            {
                while (V_6.MoveNext())
                {
                    V_7 = (ILogicalConstruct)V_6.get_Current();
                    if (!V_3.get_Children().Contains(V_7))
                    {
                        continue;
                    }
                    V_8 = V_7;
                    V_9 = V_4.get_Entry() as ILogicalConstruct;
                    if (this.removedEdges.TryGetValue(V_8, out V_10) && V_10.Contains(V_9))
                    {
                        continue;
                    }
                    this.MarkAsGotoEdge(V_8, V_9);
                    goto Label0;
                }
            }
            finally
            {
                ((IDisposable)V_6).Dispose();
            }
Label0:
            return;
        }
Пример #12
0
 private bool TryTraverseAndMerge(ILogicalConstruct theConstruct)
 {
     V_0 = new HashSet <ILogicalConstruct>();
     V_1 = new Queue <ILogicalConstruct>();
     V_1.Enqueue(theConstruct.get_Entry() as ILogicalConstruct);
     V_2 = false;
     while (V_1.get_Count() > 0)
     {
         V_3 = V_1.Dequeue();
         V_4 = V_3 as ConditionLogicalConstruct;
         if (V_4 != null)
         {
             V_5 = this.CreateComplexCondition(V_4);
             V_2 = V_2 | V_5 != V_3;
             V_3 = V_5;
         }
         dummyVar0 = V_0.Add(V_3);
         V_6       = V_3.get_SameParentSuccessors().GetEnumerator();
         try
         {
             while (V_6.MoveNext())
             {
                 V_7 = (ILogicalConstruct)V_6.get_Current();
                 if (V_0.Contains(V_7))
                 {
                     continue;
                 }
                 V_1.Enqueue(V_7);
             }
         }
         finally
         {
             ((IDisposable)V_6).Dispose();
         }
         while (V_1.get_Count() > 0 && V_0.Contains(V_1.Peek()))
         {
             dummyVar1 = V_1.Dequeue();
         }
     }
     return(V_2);
 }
Пример #13
0
 public virtual void WriteAssemblyAttributes(AssemblyDefinition assembly, ICollection <string> attributesToIgnore = null)
 {
     V_0 = new List <ICustomAttribute>();
     this.securityAttributeToDeclaration = new Dictionary <SecurityAttribute, SecurityDeclaration>();
     V_0.Add(AttributesUtilities.GetAssemblyVersionAttribute(assembly));
     V_2 = assembly.get_CustomAttributes().GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             V_3.Resolve();
             V_0.Add(V_3);
         }
     }
     finally
     {
         V_2.Dispose();
     }
     if (assembly.get_HasSecurityDeclarations())
     {
         V_4 = assembly.get_SecurityDeclarations().GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5 = V_4.get_Current();
                 V_0.AddRange(this.GetSecurityDeclaration(V_5));
             }
         }
         finally
         {
             V_4.Dispose();
         }
     }
     if (assembly.get_MainModule().get_HasExportedTypes())
     {
         V_6 = assembly.get_MainModule().get_ExportedTypes().GetEnumerator();
         try
         {
             while (V_6.MoveNext())
             {
                 V_7 = V_6.get_Current();
                 if (V_7.get_Scope() as ModuleReference != null)
                 {
                     continue;
                 }
                 V_0.Add(AttributesUtilities.GetExportedTypeAttribute(V_7, assembly.get_MainModule()));
             }
         }
         finally
         {
             V_6.Dispose();
         }
     }
     V_0.Sort(new Comparison <ICustomAttribute>(this.u003cWriteAssemblyAttributesu003eb__18_0));
     V_8 = V_0.GetEnumerator();
     try
     {
         while (V_8.MoveNext())
         {
             V_9 = V_8.get_Current();
             if (attributesToIgnore != null && attributesToIgnore.Contains(V_9.get_AttributeType().get_FullName()))
             {
                 continue;
             }
             if (V_9 as CustomAttribute == null)
             {
                 if (V_9 as SecurityAttribute == null)
                 {
                     continue;
                 }
                 dummyVar0 = this.WriteSecurityAttribute(assembly.get_MainModule(), true, V_9 as SecurityAttribute, this.securityAttributeToDeclaration.get_Item(V_9 as SecurityAttribute), out V_10, false, false);
             }
             else
             {
                 this.WriteAssemblyAttribute(V_9 as CustomAttribute);
             }
         }
     }
     finally
     {
         ((IDisposable)V_8).Dispose();
     }
     return;
 }
Пример #14
0
        private void ReplaceMultipleParentDependencies()
        {
            V_0 = false;
            do
            {
                V_0 = false;
                V_1 = null;
                V_2 = this.inferenceGraph.GetEnumerator();
                try
                {
                    while (V_2.MoveNext())
                    {
                        V_3 = V_2.get_Current();
                        V_4 = true;
                        if (V_3.get_IsHardNode())
                        {
                            continue;
                        }
                        V_6 = V_3.get_SubTypes().GetEnumerator();
                        try
                        {
                            while (V_6.MoveNext())
                            {
                                if (V_6.get_Current().get_IsHardNode())
                                {
                                    continue;
                                }
                                V_4 = false;
                                goto Label1;
                            }
                        }
                        finally
                        {
                            if (V_6 != null)
                            {
                                V_6.Dispose();
                            }
                        }
Label1:
                        if (!V_4 || V_3.get_SubTypes().get_Count() == 0)
                        {
                            continue;
                        }
                        V_0                = true;
                        V_5                = this.FindLowestCommonAncestor(V_3.get_SubTypes());
                        stackVariable32    = new ClassHierarchyNode[2];
                        stackVariable32[0] = V_3;
                        stackVariable32[1] = V_5;
                        V_1                = (ICollection <ClassHierarchyNode>)stackVariable32;
                        goto Label0;
                    }
                }
                finally
                {
                    if (V_2 != null)
                    {
                        V_2.Dispose();
                    }
                }
Label0:
                if (!V_0)
                {
                    continue;
                }
                this.MergeNodes(V_1);
            }while (V_0);
            return;
        }
Пример #15
0
        public static void LoadFromDatabase(MixCmsContext _context = null, IDbContextTransaction _transaction = null)
        {
            UnitOfWorkHelper <MixCmsContext> .InitTransaction(_context, _transaction, ref V_0, ref V_1, ref V_2);

            try
            {
                try
                {
                    MixService.get_Instance().set_Translator(new JObject());
                    V_3 = V_0.get_MixLanguage().ToList <MixLanguage>();
                    V_4 = V_0.get_MixCulture().ToList <MixCulture>();
                    V_6 = V_4.GetEnumerator();
                    try
                    {
                        while (V_6.MoveNext())
                        {
                            V_7             = new MixService.u003cu003ec__DisplayClass63_0();
                            V_7.culture     = V_6.get_Current();
                            V_8             = new JObject();
                            stackVariable22 = V_3;
                            stackVariable24 = V_7.u003cu003e9__0;
                            if (stackVariable24 == null)
                            {
                                dummyVar0          = stackVariable24;
                                stackVariable50    = new Func <MixLanguage, bool>(V_7.u003cLoadFromDatabaseu003eb__0);
                                V_10               = stackVariable50;
                                V_7.u003cu003e9__0 = stackVariable50;
                                stackVariable24    = V_10;
                            }
                            V_9 = stackVariable22.Where <MixLanguage>(stackVariable24).ToList <MixLanguage>().GetEnumerator();
                            try
                            {
                                while (V_9.MoveNext())
                                {
                                    V_11            = V_9.get_Current();
                                    stackVariable33 = V_11.get_Keyword();
                                    stackVariable35 = V_11.get_Value();
                                    if (stackVariable35 == null)
                                    {
                                        dummyVar1       = stackVariable35;
                                        stackVariable35 = V_11.get_DefaultValue();
                                    }
                                    V_8.Add(new JProperty(stackVariable33, stackVariable35));
                                }
                            }
                            finally
                            {
                                ((IDisposable)V_9).Dispose();
                            }
                            MixService.get_Instance().get_Translator().Add(new JProperty(V_7.culture.get_Specificulture(), V_8));
                        }
                    }
                    finally
                    {
                        ((IDisposable)V_6).Dispose();
                    }
                    MixService.get_Instance().set_LocalSettings(new JObject());
                    V_5 = V_0.get_MixConfiguration().ToList <MixConfiguration>();
                    V_6 = V_4.GetEnumerator();
                    try
                    {
                        while (V_6.MoveNext())
                        {
                            V_13            = new MixService.u003cu003ec__DisplayClass63_1();
                            V_13.culture    = V_6.get_Current();
                            V_14            = new JObject();
                            stackVariable65 = V_5;
                            stackVariable67 = V_13.u003cu003e9__1;
                            if (stackVariable67 == null)
                            {
                                dummyVar2           = stackVariable67;
                                stackVariable92     = new Func <MixConfiguration, bool>(V_13.u003cLoadFromDatabaseu003eb__1);
                                V_16                = stackVariable92;
                                V_13.u003cu003e9__1 = stackVariable92;
                                stackVariable67     = V_16;
                            }
                            V_15 = stackVariable65.Where <MixConfiguration>(stackVariable67).ToList <MixConfiguration>().GetEnumerator();
                            try
                            {
                                while (V_15.MoveNext())
                                {
                                    V_17 = V_15.get_Current();
                                    V_18 = new JProperty(V_17.get_Keyword(), V_17.get_Value());
                                    V_14.Add(V_18);
                                }
                            }
                            finally
                            {
                                ((IDisposable)V_15).Dispose();
                            }
                            MixService.get_Instance().get_LocalSettings().Add(new JProperty(V_13.culture.get_Specificulture(), V_14));
                        }
                    }
                    finally
                    {
                        ((IDisposable)V_6).Dispose();
                    }
                    UnitOfWorkHelper <MixCmsContext> .HandleTransaction(true, V_2, V_1);
                }
                catch (Exception exception_0)
                {
                    dummyVar3 = UnitOfWorkHelper <MixCmsContext> .HandleException <MixLanguage>(exception_0, V_2, V_1);
                }
            }
            finally
            {
                if (V_2)
                {
                    RelationalDatabaseFacadeExtensions.CloseConnection(V_0.get_Database());
                    V_1.Dispose();
                    V_0.Dispose();
                }
            }
            return;
        }
Пример #16
0
			V_1 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
			// Current member / type: System.Void Mix.Cms.Lib.ViewModels.MixPages.ReadMvcViewModel::LoadAttributes(Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
			// Exception in: System.Void LoadAttributes(Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
			// Specified method is not supported.
			// 
			// mailto: [email protected]


		public void LoadData(int? pageSize = null, int? pageIndex = null, MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			UnitOfWorkHelper<MixCmsContext>.InitTransaction(_context, _transaction, ref V_0, ref V_1, ref V_2);
			try
			{
				try
				{
					V_4 = pageSize;
					if (V_4.GetValueOrDefault() > 0 & V_4.get_HasValue())
					{
						stackVariable14 = pageSize;
					}
					else
					{
						stackVariable14 = this.get_PageSize();
					}
					pageSize = stackVariable14;
					V_4 = pageIndex;
					if (V_4.GetValueOrDefault() > 0 & V_4.get_HasValue())
					{
						stackVariable24 = pageIndex;
					}
					else
					{
						stackVariable24 = new int?(0);
					}
					pageIndex = stackVariable24;
					V_3 = null;
					V_6 = this.get_Modules().GetEnumerator();
					try
					{
						while (V_6.MoveNext())
						{
							V_4 = null;
							stackVariable35 = V_4;
							V_4 = null;
							stackVariable37 = V_4;
							V_4 = null;
							V_6.get_Current().get_Module().LoadData(stackVariable35, stackVariable37, V_4, pageSize, pageIndex, V_0, V_1);
						}
					}
					finally
					{
						((IDisposable)V_6).Dispose();
					}
					if (this.get_Type() != 2)
					{
						V_7 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
						// Current member / type: System.Void Mix.Cms.Lib.ViewModels.MixPages.ReadMvcViewModel::LoadData(System.Nullable`1<System.Int32>,System.Nullable`1<System.Int32>,Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
						// Exception in: System.Void LoadData(System.Nullable<System.Int32>,System.Nullable<System.Int32>,Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
						// Specified method is not supported.
						// 
						// mailto: [email protected]


		public void LoadDataByKeyword(string keyword, string orderBy, int orderDirection, int? pageSize = null, int? pageIndex = null, MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			V_0 = new Mix.Cms.Lib.ViewModels.MixPages.ReadMvcViewModel.u003cu003ec__DisplayClass149_0();
			V_0.keyword = keyword;
			V_0.u003cu003e4__this = this;
			UnitOfWorkHelper<MixCmsContext>.InitTransaction(_context, _transaction, ref V_1, ref V_2, ref V_3);
			try
			{
				try
				{
					V_5 = pageSize;
					if (V_5.GetValueOrDefault() > 0 & V_5.get_HasValue())
					{
						stackVariable19 = pageSize;
					}
					else
					{
						stackVariable19 = this.get_PageSize();
					}
					pageSize = stackVariable19;
					pageIndex = new int?(pageIndex.GetValueOrDefault());
					V_4 = null;
					V_7 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
					// Current member / type: System.Void Mix.Cms.Lib.ViewModels.MixPages.ReadMvcViewModel::LoadDataByKeyword(System.String,System.String,System.Int32,System.Nullable`1<System.Int32>,System.Nullable`1<System.Int32>,Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
					// Exception in: System.Void LoadDataByKeyword(System.String,System.String,System.Int32,System.Nullable<System.Int32>,System.Nullable<System.Int32>,Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
					// Specified method is not supported.
					// 
					// mailto: [email protected]


		public void LoadDataByTag(string tagName, string orderBy, int orderDirection, int? pageSize = null, int? pageIndex = null, MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			V_0 = new Mix.Cms.Lib.ViewModels.MixPages.ReadMvcViewModel.u003cu003ec__DisplayClass148_0();
			V_0.u003cu003e4__this = this;
			UnitOfWorkHelper<MixCmsContext>.InitTransaction(_context, _transaction, ref V_1, ref V_2, ref V_3);
			try
			{
				try
				{
					V_5 = pageSize;
					if (V_5.GetValueOrDefault() > 0 & V_5.get_HasValue())
					{
						stackVariable17 = pageSize;
					}
					else
					{
						stackVariable17 = this.get_PageSize();
					}
					pageSize = stackVariable17;
					pageIndex = new int?(pageIndex.GetValueOrDefault());
					V_4 = null;
					V_0.obj = new JObject(new JProperty("text", tagName));
					V_7 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
					// Current member / type: System.Void Mix.Cms.Lib.ViewModels.MixPages.ReadMvcViewModel::LoadDataByTag(System.String,System.String,System.Int32,System.Nullable`1<System.Int32>,System.Nullable`1<System.Int32>,Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
					// Exception in: System.Void LoadDataByTag(System.String,System.String,System.Int32,System.Nullable<System.Int32>,System.Nullable<System.Int32>,Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
					// Specified method is not supported.
					// 
					// mailto: [email protected]


		public T Property<T>(string fieldName)
		{
			if (this.get_AttributeData() == null)
			{
				V_1 = default(T);
				return V_1;
			}
			V_0 = this.get_AttributeData().get_Data().get_Data().GetValue(fieldName);
			if (V_0 != null)
			{
				return Newtonsoft.Json.Linq.Extensions.Value<T>(V_0);
			}
			V_1 = default(T);
			return V_1;
		}
	}
}
Пример #17
0
        public static Expression GetEnumExpression(TypeDefinition enumDefinition, LiteralExpression targetedValue, TypeSystem typeSystem)
        {
            V_0 = EnumHelper.GetEnumBitSize(enumDefinition);
            V_1 = (long)0;
            V_4 = targetedValue.get_Value().GetType().get_FullName();
            if (V_4 != null)
            {
                if (String.op_Equality(V_4, "System.Int32"))
                {
                    if (V_0 != 32)
                    {
                        V_1 = (long)((Int32)targetedValue.get_Value());
                    }
                    else
                    {
                        V_1 = (ulong)((Int32)targetedValue.get_Value());
                    }
                }
                else
                {
                    if (String.op_Equality(V_4, "System.Int64"))
                    {
                        V_1 = (Int64)targetedValue.get_Value();
                    }
                    else
                    {
                        if (String.op_Equality(V_4, "System.UInt32"))
                        {
                            V_1 = (ulong)((UInt32)targetedValue.get_Value());
                        }
                        else
                        {
                            if (String.op_Equality(V_4, "System.UInt64"))
                            {
                                V_1 = (UInt64)targetedValue.get_Value();
                            }
                            else
                            {
                                if (String.op_Equality(V_4, "System.Byte"))
                                {
                                    V_1 = (ulong)((Byte)targetedValue.get_Value());
                                }
                                else
                                {
                                    if (String.op_Equality(V_4, "System.SByte"))
                                    {
                                        V_1 = (long)((SByte)targetedValue.get_Value());
                                    }
                                    else
                                    {
                                        if (String.op_Equality(V_4, "System.Int16"))
                                        {
                                            V_1 = (long)((Int16)targetedValue.get_Value());
                                        }
                                        else
                                        {
                                            if (String.op_Equality(V_4, "System.UInt16"))
                                            {
                                                V_1 = (ulong)((UInt16)targetedValue.get_Value());
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            stackVariable10 = enumDefinition.get_Fields();
            V_2             = new List <FieldDefinition>();
            V_6             = stackVariable10.GetEnumerator();
            try
            {
                while (V_6.MoveNext())
                {
                    V_7 = V_6.get_Current();
                    if (V_7.get_Constant() == null || V_7.get_Constant().get_Value() == null)
                    {
                        continue;
                    }
                    V_8 = (long)0;
                    V_4 = V_7.get_Constant().get_Value().GetType().get_FullName();
                    if (V_4 != null)
                    {
                        if (String.op_Equality(V_4, "System.Int32"))
                        {
                            V_8 = (ulong)((Int32)V_7.get_Constant().get_Value());
                        }
                        else
                        {
                            if (String.op_Equality(V_4, "System.UInt32"))
                            {
                                V_8 = (ulong)((UInt32)V_7.get_Constant().get_Value());
                            }
                            else
                            {
                                if (String.op_Equality(V_4, "System.Byte"))
                                {
                                    V_8 = (ulong)((Byte)V_7.get_Constant().get_Value());
                                }
                                else
                                {
                                    if (String.op_Equality(V_4, "System.SByte"))
                                    {
                                        V_8 = (ulong)((byte)((SByte)V_7.get_Constant().get_Value()));
                                    }
                                    else
                                    {
                                        if (String.op_Equality(V_4, "System.Int16"))
                                        {
                                            V_8 = (ulong)((ushort)((Int16)V_7.get_Constant().get_Value()));
                                        }
                                        else
                                        {
                                            if (String.op_Equality(V_4, "System.UInt16"))
                                            {
                                                V_8 = (ulong)((UInt16)V_7.get_Constant().get_Value());
                                            }
                                            else
                                            {
                                                if (String.op_Equality(V_4, "System.Int64"))
                                                {
                                                    V_8 = (Int64)V_7.get_Constant().get_Value();
                                                }
                                                else
                                                {
                                                    if (String.op_Equality(V_4, "System.UInt64"))
                                                    {
                                                        V_8 = (UInt64)V_7.get_Constant().get_Value();
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    if (V_8 != V_1)
                    {
                        if (V_8 == 0 || V_8 | V_1 != V_1)
                        {
                            continue;
                        }
                        V_2.Add(V_7);
                    }
                    else
                    {
                        V_9 = new EnumExpression(V_7, targetedValue.get_UnderlyingSameMethodInstructions());
                        goto Label1;
                    }
                }
                goto Label0;
            }
            finally
            {
                V_6.Dispose();
            }
Label1:
            return(V_9);

Label0:
            if (V_2.get_Count() < 2)
            {
                return(targetedValue);
            }
            V_3 = new BinaryExpression(21, new EnumExpression(V_2.get_Item(0), null), new EnumExpression(V_2.get_Item(1), null), typeSystem, null, false);
            V_3.set_ExpressionType(enumDefinition);
            V_10 = 2;
            while (V_10 < V_2.get_Count())
            {
                V_3 = new BinaryExpression(21, V_3, new EnumExpression(V_2.get_Item(V_10), null), typeSystem, null, false);
                V_3.set_ExpressionType(enumDefinition);
                V_10 = V_10 + 1;
            }
            return(V_3.CloneAndAttachInstructions(targetedValue.get_UnderlyingSameMethodInstructions()));
        }
 private void ProcessTypeMembers(TypeDefinition type, MemberRenamingData memberRenamingData)
 {
     if (type.get_HasMethods())
     {
         V_0 = type.get_Methods().GetEnumerator();
         try
         {
             while (V_0.MoveNext())
             {
                 V_1 = V_0.get_Current();
                 this.RenameMember(V_1, memberRenamingData);
             }
         }
         finally
         {
             V_0.Dispose();
         }
     }
     if (type.get_HasProperties())
     {
         V_2 = type.get_Properties().GetEnumerator();
         try
         {
             while (V_2.MoveNext())
             {
                 V_3 = V_2.get_Current();
                 this.RenameMember(V_3, memberRenamingData);
             }
         }
         finally
         {
             V_2.Dispose();
         }
     }
     if (type.get_HasFields())
     {
         V_4 = type.get_Fields().GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5 = V_4.get_Current();
                 this.RenameMember(V_5, memberRenamingData);
             }
         }
         finally
         {
             V_4.Dispose();
         }
     }
     if (type.get_HasEvents())
     {
         V_6 = type.get_Events().GetEnumerator();
         try
         {
             while (V_6.MoveNext())
             {
                 V_7 = V_6.get_Current();
                 this.RenameMember(V_7, memberRenamingData);
             }
         }
         finally
         {
             V_6.Dispose();
         }
     }
     return;
 }
Пример #19
0
        private LoopType DetermineLoopType(HashSet <ILogicalConstruct> loopBody, HashSet <ILogicalConstruct> latchingNodes, IntervalConstruct interval, DominatorTree dominatorTree, out ConditionLogicalConstruct loopCondition)
        {
            V_0       = interval.get_Entry() as ILogicalConstruct;
            V_1       = new HashSet <ILogicalConstruct>(latchingNodes);
            dummyVar0 = V_1.Add(V_0);
            V_2       = DFSTBuilder.BuildTree(V_0.get_Parent() as ILogicalConstruct);
            V_3       = new HashSet <ILogicalConstruct>();
            V_4       = loopBody.GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_5 = V_4.get_Current();
                    V_6 = dominatorTree.GetDominanceFrontier(V_5).GetEnumerator();
                    try
                    {
                        while (V_6.MoveNext())
                        {
                            V_7 = (ILogicalConstruct)V_6.get_Current();
                            if (!interval.get_Children().Contains(V_7) || loopBody.Contains(V_7))
                            {
                                continue;
                            }
                            dummyVar1 = V_3.Add(V_7);
                        }
                    }
                    finally
                    {
                        ((IDisposable)V_6).Dispose();
                    }
                }
            }
            finally
            {
                ((IDisposable)V_4).Dispose();
            }
            if (V_3.get_Count() == 0)
            {
                V_8 = V_2.get_ReversePostOrder().GetEnumerator();
                try
                {
                    while (V_8.MoveNext())
                    {
                        V_9 = V_8.get_Current().get_Construct() as ILogicalConstruct;
                        if (loopBody.Contains(V_9))
                        {
                            continue;
                        }
                        loopCondition = this.GetLoopConditionWithMaxIndex(V_2, loopBody, V_1, V_9);
                        if (loopCondition == null)
                        {
                            continue;
                        }
                        this.ExpandLoopBody(interval, loopBody, V_9);
                        if (loopCondition != V_0)
                        {
                            V_10 = 2;
                            goto Label1;
                        }
                        else
                        {
                            V_10 = 1;
                            goto Label1;
                        }
                    }
                    goto Label0;
                }
                finally
                {
                    ((IDisposable)V_8).Dispose();
                }
Label1:
                return(V_10);
            }
            V_11 = V_2.get_ReversePostOrder().get_Count();
            V_4  = V_3.GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_13 = V_4.get_Current();
                    V_14 = V_2.get_ConstructToNodeMap().get_Item(V_13).get_ReversePostOrderIndex();
                    if (V_14 >= V_11)
                    {
                        continue;
                    }
                    V_11 = V_14;
                }
            }
            finally
            {
                ((IDisposable)V_4).Dispose();
            }
            V_12          = V_2.get_ReversePostOrder().get_Item(V_11).get_Construct() as ILogicalConstruct;
            loopCondition = this.GetLoopConditionWithMaxIndex(V_2, loopBody, V_1, V_12);
            this.ExpandLoopBody(interval, loopBody, V_12);
            if (loopCondition == null)
            {
                return(0);
            }
            if (loopCondition == V_0)
            {
                return(1);
            }
            return(2);

Label0:
            if (!this.CanBeLoopCondition(V_0, loopBody))
            {
                loopCondition = null;
                return(0);
            }
            loopCondition = V_0 as ConditionLogicalConstruct;
            return(1);
        }