private static EventDefinition GetMethodDeclaringEvent(MethodReference method)
        {
            if (method == null)
            {
                return(null);
            }
            V_0 = method.get_DeclaringType().Resolve();
            if (V_0 != null)
            {
                V_1 = V_0.get_Events().GetEnumerator();
                try
                {
                    while (V_1.MoveNext())
                    {
                        V_2 = V_1.get_Current();
                        if (V_2.get_AddMethod() == null || !V_2.get_AddMethod().HasSameSignatureWith(method) && V_2.get_RemoveMethod() == null || !V_2.get_RemoveMethod().HasSameSignatureWith(method))
                        {
                            continue;
                        }
                        V_3 = V_2;
                        goto Label1;
                    }
                    goto Label0;
                }
                finally
                {
                    V_1.Dispose();
                }
Label1:
                return(V_3);
            }
Label0:
            return(null);
        }
 public ICodeNode VisitMethodInvocationExpression(MethodInvocationExpression node)
 {
     V_0 = node.get_MethodExpression();
     if (V_0 == null)
     {
         return(null);
     }
     V_1 = V_0.get_Method() as MethodDefinition;
     if (V_1 == null)
     {
         V_2 = V_0.get_Method();
         if (V_2 != null && !String.IsNullOrEmpty(V_2.get_Name()) && V_2.get_Name().StartsWith("set_") || V_2.get_Name().StartsWith("get_") || V_2.get_Name().StartsWith("put_"))
         {
             V_1 = V_2.Resolve();
         }
     }
     if (V_1 == null || !V_1.get_IsGetter() && !V_1.get_IsSetter())
     {
         return(null);
     }
     V_3 = new PropertyReferenceExpression(node, null);
     if (V_3.get_Property() == null)
     {
         return(node);
     }
     V_4 = V_3;
     if (V_1.get_IsSetter())
     {
         V_5 = node.get_Arguments().get_Count() - 1;
         V_4 = new BinaryExpression(26, V_3, node.get_Arguments().get_Item(V_5), this.typeSystem, null, false);
     }
     return(V_4);
 }
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
 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 #5
0
			V_1 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
			// Current member / type: System.Void Mix.Cms.Lib.ViewModels.MixPosts.UpdateViewModel::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]


		private 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 = new Mix.Cms.Lib.ViewModels.MixPosts.UpdateViewModel.u003cu003ec__DisplayClass219_0();
						V_3.u003cu003e4__this = this;
						V_3.culture = V_2.get_Current();
						stackVariable19 = V_1;
						V_4 = new SupportedCulture();
						V_4.set_Icon(V_3.culture.get_Icon());
						V_4.set_Specificulture(V_3.culture.get_Specificulture());
						V_4.set_Alias(V_3.culture.get_Alias());
						V_4.set_FullName(V_3.culture.get_FullName());
						V_4.set_Description(V_3.culture.get_FullName());
						V_4.set_Id(V_3.culture.get_Id());
						V_4.set_Lcid(V_3.culture.get_Lcid());
						stackVariable49 = V_4;
						if (string.op_Equality(V_3.culture.get_Specificulture(), initCulture))
						{
							stackVariable55 = true;
						}
						else
						{
							stackVariable58 = _context.get_MixPost();
							V_5 = Expression.Parameter(System.Type.GetTypeFromHandle(// 
 private void DetermineFollowNodesInSubGraph(ILogicalConstruct theGraph)
 {
     this.GetVerticesAndAdjacencyMatrix(theGraph);
     V_0 = MaxWeightDisjointPathsFinder.GetOptimalEdgesInDAG(this.adjacencyMatrix).GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             this.orderedVertexArray[V_1.get_Key()].set_CFGFollowNode(this.orderedVertexArray[V_1.get_Value()].get_FirstBlock());
             if (this.orderedVertexArray[V_1.get_Key()] as ConditionLogicalConstruct == null)
             {
                 continue;
             }
             V_2 = this.orderedVertexArray[V_1.get_Key()] as ConditionLogicalConstruct;
             if (V_2.get_CFGFollowNode() != V_2.get_TrueCFGSuccessor())
             {
                 continue;
             }
             V_2.Negate(this.typeSystem);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Beispiel #7
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);
 }
 private void MapBlocks()
 {
     V_0 = this.logicalBuilderContext.get_CFG().get_Blocks();
     V_1 = 0;
     while (V_1 < (int)V_0.Length)
     {
         V_2                = V_0[V_1];
         V_3                = V_2.get_First().get_Offset();
         stackVariable17    = this.logicalBuilderContext.get_CFGBlockToLogicalConstructMap();
         stackVariable20    = new CFGBlockLogicalConstruct[1];
         stackVariable20[0] = new CFGBlockLogicalConstruct(V_2, this.methodContext.get_Expressions().get_BlockExpressions().get_Item(V_3));
         stackVariable17.Add(V_2, stackVariable20);
         V_1 = V_1 + 1;
     }
     V_0 = this.logicalBuilderContext.get_CFG().get_Blocks();
     V_1 = 0;
     while (V_1 < (int)V_0.Length)
     {
         V_4 = V_0[V_1];
         V_5 = this.logicalBuilderContext.get_CFGBlockToLogicalConstructMap().get_Item(V_4)[0];
         V_6 = V_4.get_Successors();
         V_7 = 0;
         while (V_7 < (int)V_6.Length)
         {
             V_8 = V_6[V_7];
             V_9 = this.logicalBuilderContext.get_CFGBlockToLogicalConstructMap().get_Item(V_8)[0];
             V_5.AddToSuccessors(V_9);
             V_9.AddToPredecessors(V_5);
             V_7 = V_7 + 1;
         }
         V_1 = V_1 + 1;
     }
     return;
 }
Beispiel #9
0
 private IEnumerable <VariableReference> GetVariables(int offset)
 {
     if (!this.methodContext.get_StackData().get_InstructionOffsetToUsedStackVariablesMap().TryGetValue(offset, out V_0))
     {
         return(new VariableReference[0]);
     }
     V_1 = new List <VariableReference>();
     V_2 = V_0.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             if (!this.methodContext.get_StackData().get_VariableToDefineUseInfo().ContainsKey(V_3))
             {
                 continue;
             }
             V_1.Add(V_3);
         }
     }
     finally
     {
         ((IDisposable)V_2).Dispose();
     }
     return(V_1);
 }
 private static void GenericInstanceFriendlyFullName(this IGenericInstance self, ILanguage language, StringBuilder builder, bool useGenericName, string leftBracket, string rightBracket)
 {
     dummyVar0 = builder.Append(leftBracket);
     V_0       = self.get_GenericArguments();
     V_1       = 0;
     while (V_1 < V_0.get_Count())
     {
         V_2 = V_0.get_Item(V_1);
         if (self.get_PostionToArgument().ContainsKey(V_1))
         {
             V_2 = self.get_PostionToArgument().get_Item(V_1);
         }
         if (V_1 > 0)
         {
             dummyVar1 = builder.Append(",");
         }
         V_3 = V_2.GetFriendlyFullName(language);
         if (useGenericName)
         {
             V_4 = V_2.Resolve();
             if (V_4 != null)
             {
                 V_3 = V_4.GetGenericFullName(language);
             }
         }
         dummyVar2 = builder.Append(V_3);
         V_1       = V_1 + 1;
     }
     dummyVar3 = builder.Append(rightBracket);
     return;
 }
 private static string GetFriendlyGenericInstanceName(this GenericInstanceType self, ILanguage language, string leftBracket, string rightbracket)
 {
     V_0       = new StringBuilder();
     V_1       = GenericHelper.GetNonGenericName(self.get_Name());
     dummyVar0 = V_0.Append(GenericHelper.ReplaceInvalidCharactersName(language, V_1));
     if (language != null && String.op_Equality(language.get_Name(), "IL"))
     {
         V_2 = self.get_GenericArguments().get_Count();
         V_1 = String.Concat(V_1, "`", V_2.ToString());
         return(V_1);
     }
     dummyVar1 = V_0.Append(leftBracket);
     V_3       = 0;
     while (V_3 < self.get_GenericArguments().get_Count())
     {
         if (V_3 > 0)
         {
             dummyVar2 = V_0.Append(", ");
         }
         dummyVar3 = V_0.Append(self.get_GenericArguments().get_Item(V_3).GetGenericName(language, leftBracket, rightbracket));
         V_3       = V_3 + 1;
     }
     dummyVar4 = V_0.Append(rightbracket);
     return(V_0.ToString());
 }
Beispiel #12
0
 private bool TryGetAssignment(StatementCollection statements, int startIndex, out BinaryExpression binaryExpression)
 {
     binaryExpression = null;
     V_0 = statements.get_Item(startIndex);
     if (V_0.get_CodeNodeType() != 5)
     {
         return(false);
     }
     V_1 = (V_0 as ExpressionStatement).get_Expression();
     if (V_1.get_CodeNodeType() != 24)
     {
         return(false);
     }
     V_2 = V_1 as BinaryExpression;
     if (!V_2.get_IsAssignmentExpression())
     {
         return(false);
     }
     if (V_2.get_Left().get_CodeNodeType() != 26 && V_2.get_Left().get_CodeNodeType() != 27 && V_2.get_Left().get_CodeNodeType() != 30 && V_2.get_Left().get_CodeNodeType() != 28 && V_2.get_Left().get_CodeNodeType() != 42 && V_2.get_Left().get_CodeNodeType() != 25 && V_2.get_Left().get_CodeNodeType() != 23 || (V_2.get_Left() as UnaryExpression).get_Operand().get_CodeNodeType() != 25)
     {
         return(false);
     }
     binaryExpression = V_2;
     return(true);
 }
Beispiel #13
0
 public void SplitConditionalCFGBlocks()
 {
     V_0 = (new List <KeyValuePair <InstructionBlock, CFGBlockLogicalConstruct[]> >(this.logicalContext.get_CFGBlockToLogicalConstructMap())).GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             if ((int)V_1.get_Key().get_Successors().Length <= 1)
             {
                 continue;
             }
             V_2 = V_1.get_Value()[(int)V_1.get_Value().Length - 1];
             if (V_2.get_LogicalConstructExpressions().get_Count() <= 1)
             {
                 continue;
             }
             dummyVar0 = LogicalFlowUtilities.SplitCFGBlockAt(this.logicalContext, V_2, V_2.get_LogicalConstructExpressions().get_Count() - 1);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Beispiel #14
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);
 }
Beispiel #15
0
 private void MoveInCase(IfStatement gotoStatement, SwitchCase switchCase, string label)
 {
     V_0             = new VariableReferenceExpression(this.GetLabelVariable(label), null);
     V_1             = this.GetOuterBlock(gotoStatement);
     V_2             = switchCase.get_Parent() as SwitchStatement;
     V_3             = V_1.get_Statements().IndexOf(gotoStatement);
     V_4             = V_1.get_Statements().IndexOf(V_2);
     V_12            = V_2.get_ConditionBlock().get_First().get_Offset();
     stackVariable26 = String.Concat("switch", V_12.ToString());
     V_5             = this.GetSwitchType(V_2);
     V_6             = new VariableDefinition(stackVariable26, V_5, this.methodContext.get_Method());
     this.switchVariables.Add(V_6);
     V_7 = new VariableReferenceExpression(V_6, null);
     this.ExtractConditionIntoVariable(V_7, V_2, V_1);
     V_8  = this.CollectStatements(V_3 + 1, V_4 + 1, V_1);
     V_9  = new BlockStatement();
     V_10 = new BinaryExpression(26, V_7.CloneExpressionOnly(), this.GetCaseConditionExpression(switchCase), this.typeSystem, null, false);
     V_9.AddStatement(new ExpressionStatement(V_10));
     V_11 = new IfStatement(new UnaryExpression(1, V_0, null), V_8, V_9);
     if (V_11.get_Then().get_Statements().get_Count() != 0)
     {
         V_1.AddStatementAt(V_3, V_11);
     }
     dummyVar0 = V_1.get_Statements().Remove(gotoStatement);
     switchCase.get_Body().AddStatementAt(0, gotoStatement);
     return;
 }
Beispiel #16
0
 protected virtual void OnPhiVariableAssigned(int instructionOffset, ClassHierarchyNode variableNode)
 {
     V_0 = this.offsetToExpression.get_Item(instructionOffset).get_ExpressionType();
     if (V_0 != null)
     {
         V_1 = this.GetTypeNode(V_0);
         V_1.AddSupertype(variableNode);
         dummyVar1 = this.resultingGraph.Add(V_1);
         return;
     }
     V_2 = this.GetVariables(instructionOffset).GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             V_1 = this.GetVariableNode(V_3);
             V_1.AddSupertype(variableNode);
             dummyVar0 = this.resultingGraph.Add(V_1);
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return;
 }
Beispiel #17
0
 public static bool SaveSettings()
 {
     V_0 = FileRepository.get_Instance().GetFile("appsettings.json", string.Empty, true, "{}");
     if (V_0 == null)
     {
         return(false);
     }
     if (string.IsNullOrWhiteSpace(V_0.get_Content()))
     {
         V_1             = FileRepository.get_Instance().GetFile("default.appsettings.json", string.Empty, true, "{}");
         stackVariable60 = new FileViewModel();
         stackVariable60.set_Filename("appsettings");
         stackVariable60.set_Extension(".json");
         stackVariable60.set_Content(V_1.get_Content());
         V_0 = stackVariable60;
         return(FileRepository.get_Instance().SaveFile(V_0));
     }
     V_2 = JObject.Parse(V_0.get_Content());
     V_2.set_Item("ConnectionStrings", MixService.instance.get_ConnectionStrings());
     V_2.set_Item("GlobalSettings", MixService.instance.get_GlobalSettings());
     V_2.get_Item("GlobalSettings").set_Item("LastUpdateConfiguration", JToken.op_Implicit(DateTime.get_UtcNow()));
     V_2.set_Item("Translator", MixService.instance.get_Translator());
     V_2.set_Item("LocalSettings", MixService.instance.get_LocalSettings());
     V_2.set_Item("Authentication", MixService.instance.get_Authentication());
     V_2.set_Item("IpSecuritySettings", MixService.instance.get_IpSecuritySettings());
     V_2.set_Item("Smtp", MixService.instance.get_Smtp());
     V_0.set_Content(V_2.ToString());
     return(FileRepository.get_Instance().SaveFile(V_0));
 }
 public string GetIndexedContent()
 {
     V_0 = new StringBuilder();
     V_1 = this.get_Items().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current() as ISearchable;
             if (V_2 == null)
             {
                 continue;
             }
             V_3 = V_2.GetIndexedContent();
             if (String.IsNullOrEmpty(V_3))
             {
                 continue;
             }
             dummyVar0 = V_0.AppendLine(V_3);
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     return(V_0.ToString());
 }
Beispiel #19
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);
 }
 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);
 }
 public static bool IsTypeOfExpression(this MethodInvocationExpression self, out TypeReference typeReference)
 {
     typeReference = null;
     V_0           = self.get_MethodExpression();
     if (V_0 == null)
     {
         return(false);
     }
     V_1 = V_0.get_Method();
     if (V_1.get_CallingConvention() == 2 || String.op_Inequality(V_1.get_DeclaringType().get_FullName(), "System.Type") || String.op_Inequality(V_1.get_Name(), "GetTypeFromHandle"))
     {
         return(false);
     }
     if (self.get_Arguments().get_Count() != 1)
     {
         return(false);
     }
     V_2 = self.get_Arguments().get_Item(0) as MemberHandleExpression;
     if (V_2 == null)
     {
         return(false);
     }
     typeReference = V_2.get_MemberReference() as TypeReference;
     return((object)typeReference != (object)null);
 }
Beispiel #22
0
		public override RepositoryResponse<bool> SaveSubModels(MixAttributeSet parent, MixCmsContext _context, IDbContextTransaction _transaction)
		{
			stackVariable0 = new RepositoryResponse<bool>();
			stackVariable0.set_IsSucceed(true);
			V_0 = stackVariable0;
			if (V_0.get_IsSucceed())
			{
				V_1 = this.get_Fields().GetEnumerator();
				try
				{
					while (V_1.MoveNext())
					{
						V_2 = V_1.get_Current();
						if (!V_0.get_IsSucceed())
						{
							break;
						}
						V_2.set_AttributeSetName(parent.get_Name());
						V_2.set_AttributeSetId(parent.get_Id());
						ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixAttributeFields.UpdateViewModel>(V_2.SaveModel(false, _context, _transaction), ref V_0);
					}
				}
				finally
				{
					((IDisposable)V_1).Dispose();
				}
			}
			return V_0;
		}
Beispiel #23
0
 public void RedirectSuccessors()
 {
     V_0 = this.get_OriginalCFGConstruct().get_CFGSuccessors().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1       = V_0.get_Current();
             dummyVar0 = V_1.RemoveFromPredecessors(this.get_OriginalCFGConstruct());
             V_1.AddToPredecessors(this);
             this.AddToSuccessors(V_1);
             V_2 = V_1.get_Parent() as LogicalConstructBase;
             while (V_2 != null)
             {
                 if (V_2.RemoveFromPredecessors(this.get_OriginalCFGConstruct()))
                 {
                     V_2.AddToPredecessors(this);
                 }
                 V_2 = V_2.get_Parent() as LogicalConstructBase;
             }
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Beispiel #24
0
 private bool CheckParameter(ParameterDefinition paramDef)
 {
     if (!paramDef.TryGetDynamicAttribute(out V_0))
     {
         return(false);
     }
     V_1 = DynamicHelper.GetDynamicPositioningFlags(V_0);
     if ((int)V_1.Length != this.dynamicPositioningFlags.get_Count())
     {
         return(false);
     }
     V_2 = this.dynamicPositioningFlags.get_First();
     V_3 = V_1;
     V_4 = 0;
     while (V_4 < (int)V_3.Length)
     {
         if (V_3[V_4] != V_2.get_Value())
         {
             return(false);
         }
         V_2 = V_2.get_Next();
         V_4 = V_4 + 1;
     }
     return(true);
 }
Beispiel #25
0
		private RepositoryResponse<bool> SaveMedias(int id, MixCmsContext _context, IDbContextTransaction _transaction)
		{
			stackVariable0 = new RepositoryResponse<bool>();
			stackVariable0.set_IsSucceed(true);
			V_0 = stackVariable0;
			V_1 = this.get_MediaNavs().GetEnumerator();
			try
			{
				while (V_1.MoveNext())
				{
					V_2 = V_1.get_Current();
					V_2.set_PostId(id);
					V_2.set_Specificulture(this.get_Specificulture());
					if (!V_2.get_IsActived())
					{
						ViewModelHelper.HandleResult<MixPostMedia>(V_2.RemoveModel(false, _context, _transaction), ref V_0);
					}
					else
					{
						ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixPostMedias.ReadViewModel>(V_2.SaveModel(false, _context, _transaction), ref V_0);
					}
				}
			}
			finally
			{
				((IDisposable)V_1).Dispose();
			}
			return V_0;
		}
Beispiel #26
0
			V_0 = Type.GetTypeFromHandle(// 
			// Current member / type: System.Linq.Expressions.Expression`1<System.Func`2<TModel,System.Boolean>> Mix.Cms.Lib.MixCmsHelper::FilterObjectSet(System.String,T,Mix.Cms.Lib.MixEnums/CompareType)
			// Exception in: System.Linq.Expressions.Expression<System.Func<TModel,System.Boolean>> FilterObjectSet(System.String,T,Mix.Cms.Lib.MixEnums/CompareType)
			// Specified method is not supported.
			// 
			// mailto: [email protected]


		public static string FormatPrice(double? price, string oldPrice = "0")
		{
			if (price.get_HasValue())
			{
				V_2 = price.GetValueOrDefault();
				stackVariable5 = V_2.ToString();
			}
			else
			{
				stackVariable5 = null;
			}
			V_0 = stackVariable5;
			if (string.IsNullOrEmpty(V_0))
			{
				return "0";
			}
			V_1 = V_0.Replace(",", string.Empty);
			if (!MixCmsHelper.CheckIsPrice(V_1))
			{
				return oldPrice;
			}
			V_3 = new Regex("(\\d+)(\\d{3})");
			while (V_3.IsMatch(V_1))
			{
				V_1 = V_3.Replace(V_1, "$1,$2");
			}
			return V_1;
		}
Beispiel #27
0
 protected ILogicalConstruct[] GetSortedArrayFromCollection <T>(ICollection <T> collection)
     where T : ISingleEntrySubGraph
 {
     V_0 = new ILogicalConstruct[collection.get_Count()];
     V_1 = 0;
     V_2 = collection.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3                  = (ILogicalConstruct)(object)V_2.get_Current();
             stackVariable13      = V_1;
             V_1                  = stackVariable13 + 1;
             V_0[stackVariable13] = V_3;
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     Array.Sort <ISingleEntrySubGraph>(V_0);
     return(V_0);
 }
Beispiel #28
0
 private List <KeyValuePair <IfStatement, Statement> > GetGotoPairs()
 {
     V_0 = new List <KeyValuePair <IfStatement, Statement> >();
     V_1 = this.methodContext.get_GotoStatements().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_3 = this.methodContext.get_GotoLabels().get_Item(V_2.get_TargetLabel());
             V_4 = V_2.get_Parent().get_Parent() as IfStatement;
             if (V_4 == null)
             {
                 throw new ArgumentOutOfRangeException("Goto not embeded in condition.");
             }
             V_5 = new KeyValuePair <IfStatement, Statement>(V_4, V_3);
             V_0.Add(V_5);
         }
     }
     finally
     {
         ((IDisposable)V_1).Dispose();
     }
     return(V_0);
 }
 private void MoveLabel(Statement destination, string theLabel)
 {
     if (String.op_Equality(destination.get_Label(), String.Empty))
     {
         destination.set_Label(theLabel);
         this.context.get_MethodContext().get_GotoLabels().set_Item(theLabel, destination);
         return;
     }
     V_0 = destination.get_Label();
     V_1 = this.context.get_MethodContext().get_GotoStatements().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             if (!String.op_Equality(V_2.get_TargetLabel(), theLabel))
             {
                 continue;
             }
             V_2.set_TargetLabel(V_0);
         }
     }
     finally
     {
         ((IDisposable)V_1).Dispose();
     }
     dummyVar0 = this.context.get_MethodContext().get_GotoLabels().Remove(theLabel);
     return;
 }
Beispiel #30
0
        private void DetermineIsChecked()
        {
            V_0 = this.instructions.GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_2 = V_0.get_Current().get_OpCode();
                    V_1 = V_2.get_Code();
                    if (V_1 - 127 > 9 && V_1 - 163 > 7 && V_1 - 178 > 1)
                    {
                        continue;
                    }
                    this.set_IsChecked(true);
                    goto Label0;
                }
            }
            finally
            {
                ((IDisposable)V_0).Dispose();
            }
            this.set_IsChecked(false);
Label0:
            return;
        }