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;
 }
 private void ProcessCtorInvocation()
 {
     V_3 = this.GetStatementsForInvocation(out V_1, out V_0, out V_2);
     if (V_3 == null)
     {
         return;
     }
     this.patternsContext = new CodePatternsContext(V_3);
     stackVariable10      = new ICodePattern[5];
     stackVariable10[0]   = new NullCoalescingPattern(this.patternsContext, this.methodContext);
     stackVariable10[1]   = new TernaryConditionPatternAgressive(this.patternsContext, this.typeSystem);
     stackVariable10[2]   = new ArrayInitialisationPattern(this.patternsContext, this.typeSystem);
     stackVariable10[3]   = new VariableInliningPatternAggressive(this.patternsContext, this.methodContext, this.context.get_Language().get_VariablesToNotInlineFinder());
     stackVariable10[4]   = new MultiAssignPattern(this.patternsContext, this.methodContext);
     V_4 = new List <ICodePattern>(stackVariable10);
     if (V_2)
     {
         V_4.Add(new InitializationPattern(this.patternsContext, this.context));
     }
     if (!this.ProcessStatementCollection(V_3, V_4))
     {
         return;
     }
     if (V_3.get_Item(0).get_CodeNodeType() != 5)
     {
         return;
     }
     V_5 = (V_3.get_Item(0) as ExpressionStatement).get_Expression() as MethodInvocationExpression;
     if (V_5.get_CodeNodeType() != 52 && V_5.get_CodeNodeType() != 53)
     {
         return;
     }
     this.methodContext.set_CtorInvokeExpression(V_5);
     return;
 }
Beispiel #3
0
        public List <SupportedCulture> LoadCultures(string initCulture = null, MixCmsContext _context = null, IDbContextTransaction _transaction = null)
        {
            V_0 = ViewModelBase <MixCmsContext, MixCulture, SystemCultureViewModel> .Repository.GetModelList(_context, _transaction);

            V_1 = new List <SupportedCulture>();
            if (V_0.get_IsSucceed())
            {
                V_2 = V_0.get_Data().GetEnumerator();
                try
                {
                    while (V_2.MoveNext())
                    {
                        V_3             = V_2.get_Current();
                        stackVariable16 = new SupportedCulture();
                        stackVariable16.set_Icon(V_3.get_Icon());
                        stackVariable16.set_Specificulture(V_3.get_Specificulture());
                        stackVariable16.set_Alias(V_3.get_Alias());
                        stackVariable16.set_FullName(V_3.get_FullName());
                        stackVariable16.set_Description(V_3.get_FullName());
                        stackVariable16.set_Id(V_3.get_Id());
                        stackVariable16.set_Lcid(V_3.get_Lcid());
                        stackVariable16.set_IsSupported(string.op_Equality(V_3.get_Specificulture(), initCulture));
                        V_1.Add(stackVariable16);
                    }
                }
                finally
                {
                    ((IDisposable)V_2).Dispose();
                }
            }
            return(V_1);
        }
Beispiel #4
0
 private InstructionBlock FindMostDistantSuccessor(InstructionBlock currentBlock)
 {
     V_0 = null;
     V_1 = currentBlock.get_Successors();
     V_2 = 0;
     while (V_2 < (int)V_1.Length)
     {
         V_3 = V_1[V_2];
         if (!InstructionBlock.op_Equality(V_0, null))
         {
             if (V_3.get_Index() > V_0.get_Index())
             {
                 V_0 = V_3;
             }
         }
         else
         {
             if (V_3.get_Index() > currentBlock.get_Index())
             {
                 V_0 = V_3;
             }
         }
         V_2 = V_2 + 1;
     }
     return(V_0);
 }
Beispiel #5
0
 private ClassHierarchyNode FindGreatestCommonDescendant(ICollection <ClassHierarchyNode> typeNodes)
 {
     V_0 = null;
     V_1 = 0x7fffffff;
     V_2 = typeNodes.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             V_4 = ExpressionTypeInferer.GetTypeIndex(V_3.get_NodeType());
             if (V_4 >= V_1)
             {
                 continue;
             }
             V_1 = V_4;
             V_0 = V_3;
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return(V_0);
 }
Beispiel #6
0
 public static string GetGenericName(IGenericDefinition genericDefinition, string leftBracket, string rightBracket, ILanguage language)
 {
     V_0 = false;
     if (genericDefinition as MethodDefinition != null)
     {
         V_0 = ((MethodDefinition)genericDefinition).get_HasOverrides();
     }
     V_1 = GenericHelper.GetNonGenericName(genericDefinition.get_Name());
     if (!V_0)
     {
         if (genericDefinition as MethodDefinition == null)
         {
             stackVariable70 = false;
         }
         else
         {
             stackVariable70 = ((MethodDefinition)genericDefinition).get_IsConstructor();
         }
         if (!stackVariable70)
         {
             V_1 = GenericHelper.ReplaceInvalidCharactersName(language, V_1);
         }
     }
     if (genericDefinition.get_HasGenericParameters())
     {
         V_2 = 0;
         if (genericDefinition as TypeDefinition != null)
         {
             V_3 = (genericDefinition as TypeDefinition).get_DeclaringType();
             if (V_3 != null && V_3.get_HasGenericParameters())
             {
                 V_2 = V_3.get_GenericParameters().get_Count();
             }
         }
         if (V_2 < genericDefinition.get_GenericParameters().get_Count())
         {
             V_1 = String.Concat(V_1, leftBracket);
             while (V_2 < genericDefinition.get_GenericParameters().get_Count())
             {
                 V_4 = genericDefinition.get_GenericParameters().get_Item(V_2);
                 if (V_4.get_IsCovariant())
                 {
                     V_1 = String.Concat(V_1, "out ");
                 }
                 if (V_4.get_IsContravariant())
                 {
                     V_1 = String.Concat(V_1, "in ");
                 }
                 V_1 = String.Concat(V_1, GenericHelper.ReplaceInvalidCharactersName(language, V_4.get_Name()));
                 if (V_2 != genericDefinition.get_GenericParameters().get_Count() - 1)
                 {
                     V_1 = String.Concat(V_1, ", ");
                 }
                 V_2 = V_2 + 1;
             }
             V_1 = String.Concat(V_1, rightBracket);
         }
     }
     return(V_1);
 }
 public BlockStatement Process(DecompilationContext context, BlockStatement body)
 {
     V_0 = context.get_MethodContext().get_Method();
     if (String.op_Equality(V_0.get_Name(), "Finalize") && V_0.get_IsVirtual() && body.get_Statements().get_Count() == 1 && body.get_Statements().get_Item(0) as TryStatement != null)
     {
         V_1 = body.get_Statements().get_Item(0) as TryStatement;
         if (V_1.get_Finally() != null && V_1.get_Finally().get_Body().get_Statements().get_Count() == 1 && V_1.get_Finally().get_Body().get_Statements().get_Item(0) as ExpressionStatement != null)
         {
             V_2 = V_1.get_Finally().get_Body().get_Statements().get_Item(0) as ExpressionStatement;
             if (V_2.get_Expression() as MethodInvocationExpression != null)
             {
                 V_3 = (V_2.get_Expression() as MethodInvocationExpression).get_MethodExpression().get_MethodDefinition();
                 if (V_3 != null && String.op_Equality(V_3.get_Name(), "Finalize") && String.op_Equality(V_3.get_DeclaringType().get_FullName(), V_0.get_DeclaringType().get_BaseType().get_FullName()))
                 {
                     context.get_MethodContext().set_IsDestructor(true);
                     stackVariable71 = context.get_MethodContext();
                     stackVariable72 = new BlockStatement();
                     stackVariable72.set_Statements(V_1.get_Try().get_Statements());
                     stackVariable71.set_DestructorStatements(stackVariable72);
                 }
             }
         }
     }
     return(body);
 }
Beispiel #8
0
 private void SetVariablesExpressionStatements(ConditionStatement node)
 {
     V_0 = this.variables.get_Count() - 1;
     while (V_0 >= 0)
     {
         V_1 = this.variables.get_Item(V_0);
         if (V_1.get_VariableState() != 8)
         {
             V_2 = V_1.get_StatementExpressions().get_Count() - 1;
             while (V_2 >= 0)
             {
                 V_3 = V_1.get_StatementExpressions().get_Item(V_2);
                 if (V_3.get_Statement() == null)
                 {
                     if (node == V_3.get_ParentWhileStatement())
                     {
                         V_3.set_ParentWhileStatement(this.GetParentWhileStatementAtLevel(1));
                     }
                     V_3.set_Statement(node);
                 }
                 V_2 = V_2 - 1;
             }
         }
         V_0 = V_0 - 1;
     }
     return;
 }
		private ICodeNode VisitAssignExpression(BinaryExpression node)
		{
			V_0 = CodePattern.Match(SelfAssignment.IncrementPattern, node);
			if (V_0.get_Success())
			{
				V_1 = (Expression)V_0.get_Item("Target");
				V_2 = (BinaryOperator)V_0.get_Item("Operator");
				if (V_2 == 1 || V_2 == 3)
				{
					return new UnaryExpression(SelfAssignment.GetCorrespondingOperator(V_2), V_1.CloneExpressionOnly(), node.get_UnderlyingSameMethodInstructions());
				}
			}
			V_0 = CodePattern.Match(SelfAssignment.AssignmentOperatorPattern, node);
			if (V_0.get_Success())
			{
				V_1 = (Expression)V_0.get_Item("Target");
				V_3 = (BinaryExpression)V_0.get_Item("RightSide");
				V_4 = (Expression)V_0.get_Item("Value");
				if (this.normalToAssignOperatorMap.ContainsKey(V_3.get_Operator()))
				{
					V_5 = new List<Instruction>();
					V_5.AddRange(V_3.get_MappedInstructions());
					V_5.AddRange(V_1.get_MappedInstructions());
					stackVariable41 = this.normalToAssignOperatorMap.get_Item(V_3.get_Operator());
					V_6 = V_1.CloneExpressionOnlyAndAttachInstructions(V_3.get_Left().get_MappedInstructions());
					return new BinaryExpression(stackVariable41, V_6, V_4, this.typeSystem, V_5, false);
				}
			}
			return this.VisitBinaryExpression(node);
		}
Beispiel #10
0
 private void AddNewHeaders(ILogicalConstruct currentHeader, IntervalConstruct currentInterval)
 {
     V_0 = new Stack <ILogicalConstruct>();
     V_1 = new HashSet <ILogicalConstruct>();
     V_0.Push(currentHeader);
     while (V_0.get_Count() > 0)
     {
         V_2 = V_0.Pop();
         if (V_1.Contains(V_2))
         {
             continue;
         }
         dummyVar0 = V_1.Add(V_2);
         V_3       = this.GetNodeSuccessors(V_2).GetEnumerator();
         try
         {
             while (V_3.MoveNext())
             {
                 V_4 = V_3.get_Current();
                 this.CheckAndAddPossibleHeader(V_4, currentInterval, V_0);
             }
         }
         finally
         {
             if (V_3 != null)
             {
                 V_3.Dispose();
             }
         }
     }
     return;
 }
 public static NamespaceHierarchyTree BuildNamespaceHierarchyTree(this AssemblyDefinition self)
 {
     V_0 = new HashSet <string>();
     V_1 = self.get_Modules().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current().get_Types().GetEnumerator();
             try
             {
                 while (V_2.MoveNext())
                 {
                     V_3 = V_2.get_Current();
                     if (String.op_Equality(V_3.get_Namespace(), String.Empty) && String.op_Equality(V_3.get_Name(), "<Module>"))
                     {
                         continue;
                     }
                     dummyVar0 = V_0.Add(V_3.get_Namespace());
                 }
             }
             finally
             {
                 V_2.Dispose();
             }
         }
     }
     finally
     {
         V_1.Dispose();
     }
     return(NamespaceHierarchyTreeBuilder.BuildTree(V_0));
 }
 private Dictionary <PropertyDefinition, Expression> GetPropertyToValueMap(Expression expression)
 {
     V_0 = expression as AnonymousObjectCreationExpression;
     if (V_0 == null || V_0.get_Initializer().get_Expressions().get_Count() != 2)
     {
         return(null);
     }
     V_1 = new Dictionary <PropertyDefinition, Expression>();
     V_2 = V_0.get_Initializer().get_Expressions().GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = (BinaryExpression)V_2.get_Current();
             V_1.Add(((AnonymousPropertyInitializerExpression)V_3.get_Left()).get_Property(), V_3.get_Right());
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return(V_1);
 }
 private string GetArgumentsString(Collection <ParameterDefinition> parameters)
 {
     if (parameters.get_Count() == 0)
     {
         return(String.Empty);
     }
     V_0       = new StringBuilder();
     dummyVar0 = V_0.Append('(');
     V_1       = true;
     V_2       = parameters.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             if (!V_1)
             {
                 dummyVar1 = V_0.Append(',');
             }
             V_4       = this.GetParameterTypeRepresentation(V_3.get_ParameterType());
             dummyVar2 = V_0.Append(V_4);
             V_1       = false;
         }
     }
     finally
     {
         V_2.Dispose();
     }
     dummyVar3 = V_0.Append(')');
     return(V_0.ToString());
 }
 private IEnumerable <BinaryExpression> GetAssignmentExpressions(IList <Expression> blockExpressions)
 {
     V_0 = new List <BinaryExpression>();
     V_1 = blockExpressions.GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             if (V_2 as BinaryExpression == null || !(V_2 as BinaryExpression).get_IsAssignmentExpression())
             {
                 continue;
             }
             V_3 = V_2 as BinaryExpression;
             if (!this.CanBePropagated(V_3.get_Right()) || V_3.get_Left() as VariableReferenceExpression == null)
             {
                 continue;
             }
             V_4 = V_3.get_Left() as VariableReferenceExpression;
             if (!V_4.get_ExpressionType().get_IsByReference() && !V_4.get_ExpressionType().get_IsPointer())
             {
                 continue;
             }
             V_0.Add(V_3);
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     return(V_0);
 }
						dummyVar0 = Expression.Parameter(Type.GetTypeFromHandle(// 
						// Current member / type: System.Void Mix.Cms.Lib.Helpers.ODataHelper`1::ParseFilter(Microsoft.OData.UriParser.SingleValueNode,System.Linq.Expressions.Expression`1<System.Func`2<TModel,System.Boolean>>&,System.Int32)
						// Exception in: System.Void ParseFilter(Microsoft.OData.UriParser.SingleValueNode,System.Linq.Expressions.Expression<System.Func<TModel,System.Boolean>>&,System.Int32)
						// Specified method is not supported.
						// 
						// mailto: [email protected]


		public static void TryNodeValue(SingleValueNode node, IDictionary<string, object> values)
		{
			if (node as BinaryOperatorNode != null)
			{
				V_0 = (BinaryOperatorNode)node;
				V_1 = V_0.get_Left();
				V_2 = V_0.get_Right();
				if (V_1 as ConvertNode != null)
				{
					ODataHelper<TModel>.TryNodeValue(((ConvertNode)V_1).get_Source(), values);
				}
				if (V_1 as BinaryOperatorNode != null)
				{
					ODataHelper<TModel>.TryNodeValue(V_1, values);
				}
				if (V_2 as ConvertNode != null)
				{
					ODataHelper<TModel>.TryNodeValue(((ConvertNode)V_2).get_Source(), values);
				}
				if (V_2 as BinaryOperatorNode != null)
				{
					ODataHelper<TModel>.TryNodeValue(V_2, values);
				}
				if (V_1 as SingleValuePropertyAccessNode != null && V_2 as ConstantNode != null)
				{
					V_3 = (SingleValuePropertyAccessNode)V_1;
					if (V_0.get_OperatorKind() == 2)
					{
						V_4 = ((ConstantNode)V_2).get_Value();
						values.Add(V_3.get_Property().get_Name(), V_4);
					}
				}
			}
			return;
		}
Beispiel #16
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)
		public static void ParseFilter(SingleValueNode node, ref Expression<Func<TModel, bool>> result, int kind = -1)
		{
			if (node as BinaryOperatorNode != null)
			{
				V_0 = node as BinaryOperatorNode;
				V_1 = V_0.get_Left();
				V_2 = V_0.get_Right();
				if (V_1 as ConvertNode != null)
				{
					ODataHelper<TModel>.ParseFilter(((ConvertNode)V_1).get_Source(), ref result, -1);
				}
				if (V_1 as BinaryOperatorNode != null)
				{
					ODataHelper<TModel>.ParseFilter(V_1, ref result, -1);
				}
				if (V_2 as ConvertNode != null)
				{
					ODataHelper<TModel>.ParseFilter(((ConvertNode)V_2).get_Source(), ref result, V_0.get_OperatorKind());
				}
				if (V_2 as BinaryOperatorNode != null)
				{
					ODataHelper<TModel>.ParseFilter(V_2, ref result, V_0.get_OperatorKind());
				}
				if (V_1 as SingleValuePropertyAccessNode != null && V_2 as ConstantNode != null)
				{
					V_3 = V_1 as SingleValuePropertyAccessNode;
					V_4 = V_2 as ConstantNode;
					if (V_3 != null && V_3.get_Property() != null && V_4 != null && V_4.get_Value() != null)
					{
						V_5 = ODataHelper<TModel>.FilterObjectSet(V_3, V_4, V_0.get_OperatorKind(), "model");
						dummyVar0 = Expression.Parameter(Type.GetTypeFromHandle(// 
 private HashSet <ILogicalConstruct> GetIntervalSuccessors(IntervalConstruct interval, ILogicalConstruct startNode)
 {
     V_0 = new HashSet <ILogicalConstruct>();
     if (!interval.get_Children().Contains(startNode))
     {
         return(V_0);
     }
     V_1 = new Queue <ILogicalConstruct>();
     V_1.Enqueue(startNode);
     V_2       = new HashSet <ILogicalConstruct>();
     dummyVar0 = V_2.Add(startNode);
     while (V_1.get_Count() > 0)
     {
         V_3 = V_1.Dequeue().get_SameParentSuccessors().GetEnumerator();
         try
         {
             while (V_3.MoveNext())
             {
                 V_4 = (ILogicalConstruct)V_3.get_Current();
                 if (V_2.Contains(V_4) || !interval.get_Children().Contains(V_4) || !V_0.Add(V_4))
                 {
                     continue;
                 }
                 dummyVar1 = V_2.Add(V_4);
                 V_1.Enqueue(V_4);
             }
         }
         finally
         {
             ((IDisposable)V_3).Dispose();
         }
     }
     return(V_0);
 }
Beispiel #19
0
 public HashSet <ISingleEntrySubGraph> GetDominatedNodes(ISingleEntrySubGraph construct)
 {
     if (!this.constructToNodeMap.TryGetValue(construct, out V_0))
     {
         return(null);
     }
     V_1 = new HashSet <ISingleEntrySubGraph>();
     V_2 = new Queue <DTNode>();
     V_2.Enqueue(V_0);
     while (V_2.get_Count() > 0)
     {
         V_3       = V_2.Dequeue();
         dummyVar0 = V_1.Add(V_3.get_Construct());
         V_4       = V_3.get_TreeEdgeSuccessors().GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5 = (DTNode)V_4.get_Current();
                 V_2.Enqueue(V_5);
             }
         }
         finally
         {
             ((IDisposable)V_4).Dispose();
         }
     }
     return(V_1);
 }
 private void RemoveBackEdgesFromSwitchConstructs(ILogicalConstruct theConstruct)
 {
     V_0 = DFSTBuilder.BuildTree(theConstruct).get_BackEdges().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = V_1.get_Start().get_Construct() as ILogicalConstruct;
             if (V_2 as ConditionLogicalConstruct != null)
             {
                 continue;
             }
             V_3 = V_2 as CFGBlockLogicalConstruct;
             if (V_3 == null || V_3.get_TheBlock().get_Last().get_OpCode().get_Code() != 68)
             {
                 continue;
             }
             this.MarkAsGotoEdge(V_2, V_1.get_End().get_Construct() as ILogicalConstruct);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Beispiel #21
0
 private void GetGuardedBlockToExceptionHandlersMap()
 {
     V_0 = this.theCFG.get_RawExceptionHandlers().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = this.theCFG.get_InstructionToBlockMapping().get_Item(V_1.get_TryStart().get_Offset());
             if (!this.guardedBlockToExceptionHandler.TryGetValue(V_2, out V_3))
             {
                 V_3 = new List <InstructionBlock>();
                 this.guardedBlockToExceptionHandler.set_Item(V_2, V_3);
             }
             V_4 = this.theCFG.get_InstructionToBlockMapping().get_Item(V_1.get_HandlerStart().get_Offset());
             V_3.Add(V_4);
             if (V_1.get_HandlerType() != 1)
             {
                 continue;
             }
             V_5 = this.theCFG.get_InstructionToBlockMapping().get_Item(V_1.get_FilterStart().get_Offset());
             V_3.Add(V_5);
         }
     }
     finally
     {
         V_0.Dispose();
     }
     return;
 }
Beispiel #22
0
			V_0 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
			// Current member / type: System.Void Mix.Cms.Lib.ViewModels.MixModules.UpdateViewModel::LoadAttributeData(Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
			// Exception in: System.Void LoadAttributeData(Mix.Cms.Lib.Models.Cms.MixCmsContext,Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction)
			// Specified method is not supported.
			// 
			// mailto: [email protected]


		private void LoadAttributeFields(MixCmsContext context, IDbContextTransaction transaction)
		{
			if (!string.IsNullOrEmpty(this.get_AttributeData().get_Id()))
			{
				this.set_Attributes(new List<Mix.Cms.Lib.ViewModels.MixAttributeFields.UpdateViewModel>());
				V_2 = this.get_AttributeData().get_Data().get_Values().GetEnumerator();
				try
				{
					while (V_2.MoveNext())
					{
						V_3 = V_2.get_Current();
						if (V_3.get_Field() == null)
						{
							continue;
						}
						this.get_Attributes().Add(V_3.get_Field());
					}
				}
				finally
				{
					((IDisposable)V_2).Dispose();
				}
			}
			else
			{
				stackVariable21 = ViewModelBase<MixCmsContext, MixAttributeSet, Mix.Cms.Lib.ViewModels.MixAttributeSets.UpdateViewModel>.Repository;
				V_1 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
Beispiel #23
0
 private void EliminateViaIf(IfStatement gotoStatement, Statement labeledStatement)
 {
     V_0 = labeledStatement.get_Parent() as BlockStatement;
     V_1 = V_0.get_Statements().IndexOf(gotoStatement);
     V_2 = V_0.get_Statements().IndexOf(labeledStatement);
     if (V_1 == V_2 - 1)
     {
         V_0.get_Statements().RemoveAt(V_1);
         return;
     }
     V_3 = this.CollectStatements(V_1 + 1, V_2, V_0);
     V_4 = Negator.Negate(gotoStatement.get_Condition(), this.typeSystem);
     while (V_3.get_Statements().get_Item(0) as IfStatement != null)
     {
         V_5 = V_3.get_Statements().get_Item(0) as IfStatement;
         if (!this.AreEqual(V_5.get_Condition(), V_4) || V_5.get_Else() != null)
         {
             break;
         }
         V_3.get_Statements().RemoveAt(0);
         V_6 = 0;
         while (V_6 < V_5.get_Then().get_Statements().get_Count())
         {
             V_3.AddStatement(V_5.get_Then().get_Statements().get_Item(V_6));
             V_6 = V_6 + 1;
         }
     }
     gotoStatement.set_Then(V_3);
     gotoStatement.set_Condition(V_4);
     return;
 }
Beispiel #24
0
			V_1 = Type.GetTypeFromHandle(// 
			// Current member / type: System.Collections.Generic.HashSet`1<System.String> Telerik.JustDecompiler.Languages.IL.ILHelpers::BuildKeywordList(System.String[])
			// Exception in: System.Collections.Generic.HashSet<System.String> BuildKeywordList(System.String[])
			// Specified method is not supported.
			// 
			// mailto: [email protected]


		internal static MemberMapping CreateCodeMapping(MethodDefinition member, CodeMappings codeMappings)
		{
			V_0 = new ILHelpers.u003cu003ec__DisplayClass5_0();
			V_0.member = member;
			if (V_0.member == null || !V_0.member.get_HasBody())
			{
				return null;
			}
			if (codeMappings == null)
			{
				return null;
			}
			V_1 = null;
			if (String.op_Equality(codeMappings.get_FullName(), V_0.member.get_DeclaringType().get_FullName()))
			{
				V_2 = codeMappings.get_Mapping();
				if (V_2.Find(new Predicate<MemberMapping>(V_0.u003cCreateCodeMappingu003eb__0)) == null)
				{
					stackVariable26 = new MemberMapping();
					V_3 = V_0.member.get_MetadataToken();
					stackVariable26.set_MetadataToken(V_3.ToInt32());
					stackVariable26.set_MemberReference(V_0.member.get_DeclaringType().Resolve());
					stackVariable26.set_MemberCodeMappings(new List<SourceCodeMapping>());
					stackVariable26.set_CodeSize(V_0.member.get_Body().get_CodeSize());
					V_1 = stackVariable26;
					V_2.Add(V_1);
				}
			}
			return V_1;
		}
Beispiel #25
0
 protected override ClassHierarchyNode FindLowestCommonAncestor(ICollection <ClassHierarchyNode> typeNodes)
 {
     V_0 = null;
     V_1 = -2147483648;
     V_2 = typeNodes.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             V_4 = ExpressionTypeInferer.GetTypeIndex(V_3.get_NodeType());
             if (V_4 <= V_1)
             {
                 continue;
             }
             V_1 = V_4;
             V_0 = V_3;
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return(V_0);
 }
Beispiel #26
0
 private IShellPipeline BuildTenantPipeline()
 {
     V_0            = new ApplicationBuilder(ShellScope.get_Context().get_ServiceProvider(), this._features);
     stackVariable7 = ServiceProviderServiceExtensions.GetService <IEnumerable <IStartupFilter> >(V_0.get_ApplicationServices());
     V_1            = new ShellRequestPipeline();
     V_2            = new Action <IApplicationBuilder>(this.u003cBuildTenantPipelineu003eb__6_0);
     V_3            = stackVariable7.Reverse <IStartupFilter>().GetEnumerator();
     try
     {
         while (V_3.MoveNext())
         {
             V_2 = V_3.get_Current().Configure(V_2);
         }
     }
     finally
     {
         if (V_3 != null)
         {
             V_3.Dispose();
         }
     }
     V_2.Invoke(V_0);
     V_1.set_Next(V_0.Build());
     return(V_1);
 }
Beispiel #27
0
 protected override string ToString(string constructName, HashSet <CFGBlockLogicalConstruct> printedBlocks, LogicalFlowBuilderContext context)
 {
     V_0       = new StringBuilder();
     dummyVar0 = V_0.AppendLine("PartialCFGConstruct");
     dummyVar1 = V_0.AppendLine("{");
     dummyVar2 = V_0.AppendLine(String.Format("\t{0}:", this.NodeILOffset(context, this)));
     V_2       = this.get_LogicalConstructExpressions().GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3       = V_2.get_Current();
             dummyVar3 = V_0.Append("\t");
             dummyVar4 = V_0.AppendLine(V_3.ToCodeString());
         }
     }
     finally
     {
         ((IDisposable)V_2).Dispose();
     }
     V_1       = String.Format("\tFollowNode: {0}", this.NodeILOffset(context, this.get_CFGFollowNode()));
     dummyVar5 = V_0.AppendLine(V_1);
     dummyVar6 = V_0.AppendLine("}");
     dummyVar7 = printedBlocks.Add(this);
     return(V_0.ToString());
 }
Beispiel #28
0
 public static Dictionary <MemberIdentifier, CodeSpan> GenerateMemberMapping(string assemblyFilePath, StringWriter writer, List <WritingInfo> writingInfos)
 {
     stackVariable1 = writer.ToString();
     V_0            = new Dictionary <MemberIdentifier, CodeSpan>();
     V_1            = new TwoDimensionalString(stackVariable1, writer.get_NewLine(), false);
     V_2            = writingInfos.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current().get_MemberDeclarationToCodePostionMap().GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_4 = V_3.get_Current();
                     V_5 = V_4.get_Key();
                     V_6 = V_4.get_Value();
                     V_7 = ExternallyVisibleDecompilationUtilities.GetSpan(V_1, V_1.TrimStart(V_6));
                     V_0.Add(ExternallyVisibleDecompilationUtilities.GetIdentifier(assemblyFilePath, V_5), V_7);
                 }
             }
             finally
             {
                 ((IDisposable)V_3).Dispose();
             }
         }
     }
     finally
     {
         ((IDisposable)V_2).Dispose();
     }
     return(V_0);
 }
 private void TransferLabel(ExpressionStatement expressionStatement)
 {
     if (String.op_Equality(expressionStatement.get_Label(), String.Empty))
     {
         return;
     }
     V_0 = expressionStatement.get_Label();
     V_1 = expressionStatement;
     while (V_1.get_Parent() != null)
     {
         V_3 = V_1.get_Parent() as BlockStatement;
         V_4 = V_3.get_Statements().IndexOf(V_1);
         if (V_4 != V_3.get_Statements().get_Count() - 1)
         {
             V_5 = V_3.get_Statements().get_Item(V_4 + 1);
             this.MoveLabel(V_5, V_0);
             return;
         }
         if (this.IsLoopBody(V_3))
         {
             this.MoveLabel(V_3.get_Statements().get_Item(0), V_0);
             return;
         }
         do
         {
             V_1 = V_1.get_Parent();
         }while (V_1.get_Parent() != null && V_1.get_Parent().get_CodeNodeType() != CodeNodeType.BlockStatement);
     }
     V_2 = new EmptyStatement();
     this.theBody.get_Statements().Add(V_2);
     this.MoveLabel(V_2, V_0);
     return;
 }
Beispiel #30
0
 public List <TemplateViewModel> GetTemplates(string folder)
 {
     if (!Directory.Exists(folder))
     {
         dummyVar0 = Directory.CreateDirectory(folder);
     }
     stackVariable7 = (new DirectoryInfo(folder)).GetFiles(string.Format("*{0}", ".cshtml"));
     V_0            = new List <TemplateViewModel>();
     V_1            = stackVariable7;
     V_2            = 0;
     while (V_2 < (int)V_1.Length)
     {
         V_3 = V_1[V_2];
         V_4 = V_3.OpenText();
         try
         {
             stackVariable20 = new TemplateViewModel();
             stackVariable20.set_FileFolder(folder);
             stackVariable20.set_Filename(V_3.get_Name());
             stackVariable20.set_Extension(".cshtml");
             stackVariable20.set_Content(V_4.ReadToEnd());
             V_0.Add(stackVariable20);
         }
         finally
         {
             if (V_4 != null)
             {
                 ((IDisposable)V_4).Dispose();
             }
         }
         V_2 = V_2 + 1;
     }
     return(V_0);
 }