Exemplo n.º 1
0
 private void CleanupEmptyIfs(BlockStatement body)
 {
     do
     {
         V_0 = this.emptyThenIfs.GetEnumerator();
         try
         {
             while (V_0.MoveNext())
             {
                 V_1 = V_0.get_Current();
                 if (V_1.get_Else() == null || V_1.get_Else().get_Statements().get_Count() == 0)
                 {
                     dummyVar0 = (V_1.get_Parent() as BlockStatement).get_Statements().Remove(V_1);
                 }
                 else
                 {
                     V_1.set_Then(V_1.get_Else());
                     V_1.set_Else(null);
                     dummyVar1 = Negator.Negate(V_1.get_Condition(), this.typeSystem);
                 }
             }
         }
         finally
         {
             ((IDisposable)V_0).Dispose();
         }
         this.emptyThenIfs = new List <IfStatement>();
         this.Visit(body);
     }while (this.emptyThenIfs.get_Count() != 0);
     return;
 }
 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;
 }
        private TypeReference GetUseInArrayIndexer(ArrayIndexerExpression arrayIndexerExpression, VariableReference variable)
        {
            V_0 = arrayIndexerExpression.get_Indices().GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_1 = V_0.get_Current();
                    if (V_1 as VariableReferenceExpression == null || (object)(V_1 as VariableReferenceExpression).get_Variable() != (object)variable)
                    {
                        continue;
                    }
                    V_2 = this.typeSystem.get_Int32();
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                if (V_0 != null)
                {
                    V_0.Dispose();
                }
            }
Label1:
            return(V_2);

Label0:
            return(new TypeReference("System", "Array", this.typeSystem.get_Object().get_Module(), this.typeSystem.get_Object().get_Scope()));
        }
Exemplo n.º 4
0
 private static void AddSuccessorsToCount(ILogicalConstruct construct, Dictionary <CFGBlockLogicalConstruct, uint> numberOfHandlersLeavingToBlock)
 {
     V_0 = construct.get_CFGSuccessors().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             if (numberOfHandlersLeavingToBlock.ContainsKey(V_1))
             {
                 stackVariable10 = numberOfHandlersLeavingToBlock;
                 V_2             = V_1;
                 stackVariable10.set_Item(V_2, stackVariable10.get_Item(V_2) + 1);
             }
             else
             {
                 numberOfHandlersLeavingToBlock.Add(V_1, 1);
             }
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 5
0
 private void AddLabelVariables()
 {
     V_0 = (new List <Statement>(this.methodContext.get_GotoLabels().get_Values())).GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = V_1.get_Label();
             V_1.set_Label(String.Empty);
             V_3             = this.GetLabelVariable(V_2);
             stackVariable19 = V_1.get_Parent() as BlockStatement;
             if (stackVariable19 == null)
             {
                 throw new ArgumentOutOfRangeException("Label target is not within a block.");
             }
             V_4             = stackVariable19.get_Statements().IndexOf(V_1);
             stackVariable35 = new BinaryExpression(26, new VariableReferenceExpression(V_3, null), this.GetLiteralExpression(false), this.typeSystem, null, false);
             stackVariable35.get_Right().set_ExpressionType(this.methodContext.get_Method().get_Module().get_TypeSystem().get_Boolean());
             V_5 = new ExpressionStatement(stackVariable35);
             V_5.set_Label(V_2);
             this.methodContext.get_GotoLabels().set_Item(V_2, V_5);
             this.variableToAssignment.Add(V_3, V_5);
             stackVariable19.AddStatementAt(V_4, V_5);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 6
0
 public DynamicMemberReferenceExpression(Expression target, string memberName, TypeReference type, IEnumerable <Instruction> instructions, IEnumerable <Expression> invocationArguments, IEnumerable <TypeReference> genericTypeArguments = null)
 {
     base(instructions);
     this.set_IsMethodInvocation(true);
     this.set_Target(target);
     this.set_MemberName(memberName);
     this.set_ExpressionType(type);
     this.set_InvocationArguments(new ExpressionCollection());
     V_0 = invocationArguments.GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             this.get_InvocationArguments().Add(V_1);
         }
     }
     finally
     {
         if (V_0 != null)
         {
             V_0.Dispose();
         }
     }
     if (genericTypeArguments != null)
     {
         this.set_GenericTypeArguments(new List <TypeReference>(genericTypeArguments));
     }
     return;
 }
        private bool IsChildOfCurrentStatement(Statement statement)
        {
            V_0 = this.statements.GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    if (V_0.get_Current() != statement)
                    {
                        continue;
                    }
                    V_1 = true;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                ((IDisposable)V_0).Dispose();
            }
Label1:
            return(V_1);

Label0:
            return(false);
        }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
 public void BuildLoops(ILogicalConstruct block)
 {
     if (block.get_Children().get_Count() == 0)
     {
         return;
     }
     V_0 = block.get_Children().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current() as ILogicalConstruct;
             if (V_1 == null)
             {
                 throw new ArgumentException("Child is not a logical construct.");
             }
             if (V_1 as ConditionLogicalConstruct != null)
             {
                 continue;
             }
             this.BuildLoops(V_1);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     this.ProcessLogicalConstruct(block);
     return;
 }
Exemplo n.º 10
0
 public void VisitExpressions()
 {
     V_0 = this.context.get_MethodContext().get_Expressions().get_BlockExpressions().get_Values().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current().GetEnumerator();
             try
             {
                 while (V_1.MoveNext())
                 {
                     V_2 = V_1.get_Current();
                     this.Visit(V_2);
                 }
             }
             finally
             {
                 if (V_1 != null)
                 {
                     V_1.Dispose();
                 }
             }
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 11
0
 public void TransformExpressions(BaseCodeTransformer transformer)
 {
     V_0 = this.context.get_MethodContext().get_Expressions().get_BlockExpressions().get_Values().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = 0;
             V_3 = 0;
             while (V_3 < V_1.get_Count())
             {
                 V_4 = (Expression)transformer.Visit(V_1.get_Item(V_3));
                 if (V_4 != null)
                 {
                     stackVariable27 = V_2;
                     V_2             = stackVariable27 + 1;
                     V_1.set_Item(stackVariable27, V_4);
                 }
                 V_3 = V_3 + 1;
             }
             V_5 = V_1.get_Count() - V_2;
             while (V_5 > 0)
             {
                 V_1.RemoveAt(V_2 + V_5 - 1);
                 V_5 = V_5 - 1;
             }
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 12
0
        private static FieldDefinition GetFieldWithName(TypeDefinition typeDef, string eventTypeFullName, string name)
        {
            V_0 = typeDef.get_Fields().GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_1 = V_0.get_Current();
                    if (!String.op_Equality(V_1.get_Name(), name) || !String.op_Equality(V_1.get_FieldType().get_FullName(), eventTypeFullName))
                    {
                        continue;
                    }
                    V_2 = V_1;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                V_0.Dispose();
            }
Label1:
            return(V_2);

Label0:
            return(null);
        }
Exemplo n.º 13
0
			protected override bool IsGlobalKeyword(string word, HashSet<string> globalKeywords)
			{
				V_0 = globalKeywords.GetEnumerator();
				try
				{
					while (V_0.MoveNext())
					{
						if (!V_0.get_Current().Equals(word, 5))
						{
							continue;
						}
						V_1 = true;
						goto Label1;
					}
					goto Label0;
				}
				finally
				{
					((IDisposable)V_0).Dispose();
				}
			Label1:
				return V_1;
			Label0:
				return false;
			}
 public BlockStatement Process(DecompilationContext context, BlockStatement block)
 {
     this.context         = context;
     this.typeSystem      = context.get_MethodContext().get_Method().get_Module().get_TypeSystem();
     this.methodVariables = new Collection <VariableDefinition>();
     V_0 = context.get_MethodContext().get_Variables().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             if (context.get_MethodContext().get_VariablesToNotDeclare().Contains(V_1))
             {
                 continue;
             }
             this.methodVariables.Add(V_1);
         }
     }
     finally
     {
         V_0.Dispose();
     }
     this.codeNodeTypes.Push(0);
     this.Visit(block);
     dummyVar0 = this.codeNodeTypes.Pop();
     this.InsertTopLevelDeclarations(block);
     return(block);
 }
Exemplo n.º 15
0
		private void ParseData()
		{
			stackVariable1 = new JObject();
			stackVariable1.Add(new JProperty("id", this.get_Id()));
			stackVariable1.Add(new JProperty("createdDateTime", (object)this.get_CreatedDateTime()));
			this.set_Data(stackVariable1);
			stackVariable12 = this.get_Values();
			stackVariable13 = Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel.u003cu003ec.u003cu003e9__69_0;
			if (stackVariable13 == null)
			{
				dummyVar0 = stackVariable13;
				stackVariable13 = new Func<Mix.Cms.Lib.ViewModels.MixAttributeSetValues.ImportViewModel, int>(Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel.u003cu003ec.u003cu003e9.u003cParseDatau003eb__69_0);
				Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel.u003cu003ec.u003cu003e9__69_0 = stackVariable13;
			}
			V_0 = stackVariable12.OrderBy<Mix.Cms.Lib.ViewModels.MixAttributeSetValues.ImportViewModel, int>(stackVariable13).GetEnumerator();
			try
			{
				while (V_0.MoveNext())
				{
					V_1 = V_0.get_Current();
					V_1.set_AttributeFieldName(V_1.get_Field().get_Name());
					this.get_Data().Add(this.ParseValue(V_1));
				}
			}
			finally
			{
				if (V_0 != null)
				{
					V_0.Dispose();
				}
			}
			return;
		}
Exemplo n.º 16
0
		public override void Validate(MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			this.Validate(_context, _transaction);
			if (this.get_IsValid())
			{
				V_0 = this.get_DataProperties().GetEnumerator();
				try
				{
					while (V_0.MoveNext())
					{
						V_1 = V_0.get_Current().Validate<MixModuleData>(this.get_Id(), this.get_Specificulture(), this.get_JItem(), _context, _transaction);
						if (V_1.get_IsSucceed())
						{
							continue;
						}
						this.set_IsValid(false);
						this.get_Errors().AddRange(V_1.get_Errors());
					}
				}
				finally
				{
					((IDisposable)V_0).Dispose();
				}
			}
			return;
		}
 private void MarkDynamicArguments(CallSiteInfo callSiteInfo, IList <Expression> arguments)
 {
     V_0 = callSiteInfo.get_DynamicArgumentIndices().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             if (arguments.get_Item(V_1).get_CodeNodeType() == 24 || arguments.get_Item(V_1).get_CodeNodeType() == 23 && (arguments.get_Item(V_1) as UnaryExpression).get_Operator() == 11 || arguments.get_Item(V_1).get_CodeNodeType() == 61 || arguments.get_Item(V_1).get_CodeNodeType() == 59 || DynamicElementAnalyzer.Analyze(arguments.get_Item(V_1)))
             {
                 continue;
             }
             V_2                = new ExplicitCastExpression(arguments.get_Item(V_1), this.objectTypeRef, null);
             stackVariable40    = new Boolean[1];
             stackVariable40[0] = true;
             V_2.set_DynamicPositioningFlags(stackVariable40);
             arguments.set_Item(V_1, V_2);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 18
0
 public void MapBranchInstructions(IEnumerable <Instruction> branchInstructions)
 {
     V_0 = branchInstructions.GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             if (V_1.get_OpCode().get_Code() == 55 || V_1.get_OpCode().get_Code() == 42)
             {
                 continue;
             }
             throw new InvalidOperationException("Only unconditional branch instructions are allowed");
         }
     }
     finally
     {
         if (V_0 != null)
         {
             V_0.Dispose();
         }
     }
     this.instructions.AddRange(branchInstructions);
     return;
 }
Exemplo n.º 19
0
 private void CountTypeTokens(TypeReference typeRef, ref int count)
 {
     count = count + 1;
     if (typeRef as GenericInstanceType == null)
     {
         if (typeRef as TypeSpecification != null)
         {
             this.CountTypeTokens((typeRef as TypeSpecification).get_ElementType(), ref count);
         }
     }
     else
     {
         V_0 = (typeRef as GenericInstanceType).get_GenericArguments().GetEnumerator();
         try
         {
             while (V_0.MoveNext())
             {
                 V_1 = V_0.get_Current();
                 this.CountTypeTokens(V_1, ref count);
             }
         }
         finally
         {
             V_0.Dispose();
         }
     }
     return;
 }
        private bool HopcroftKarpDFS(int vertex)
        {
            if (vertex == this.nilVertex)
            {
                return(true);
            }
            V_0 = this.equalityGraph[vertex].GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_1 = V_0.get_Current();
                    if (this.dist[this.pair[V_1]] != this.dist[vertex] + 1 || !this.HopcroftKarpDFS(this.pair[V_1]))
                    {
                        continue;
                    }
                    this.pair[V_1]    = vertex;
                    this.pair[vertex] = V_1;
                    V_2 = true;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                ((IDisposable)V_0).Dispose();
            }
Label1:
            return(V_2);

Label0:
            this.dist[vertex] = 0x3b9aca00;
            return(false);
        }
Exemplo n.º 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;
 }
Exemplo n.º 22
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;
        }
Exemplo n.º 23
0
 private void AddDefaultAssignmentsToNewConditionalVariables(BlockStatement body)
 {
     V_0 = this.labelToVariable.get_Values().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = new BinaryExpression(26, new VariableReferenceExpression(V_1, null), this.GetLiteralExpression(false), this.typeSystem, null, false);
             body.AddStatementAt(0, new ExpressionStatement(V_2));
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     if (this.usedBreakVariable)
     {
         V_3 = new BinaryExpression(26, new VariableReferenceExpression(this.breakVariable, null), this.GetLiteralExpression(false), this.typeSystem, null, false);
         body.AddStatementAt(0, new ExpressionStatement(V_3));
     }
     if (this.usedContinueVariable)
     {
         V_4 = new BinaryExpression(26, new VariableReferenceExpression(this.continueVariable, null), this.GetLiteralExpression(false), this.typeSystem, null, false);
         body.AddStatementAt(0, new ExpressionStatement(V_4));
     }
     return;
 }
Exemplo n.º 24
0
        private static ModuleDefinition GetAssemblyModule(AssemblyDefinition assembly, string moduleFilePath)
        {
            V_0 = assembly.get_Modules().GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_1 = V_0.get_Current();
                    if (!String.Equals(V_1.get_FilePath(), moduleFilePath, 5))
                    {
                        continue;
                    }
                    V_2 = V_1;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                V_0.Dispose();
            }
Label1:
            return(V_2);

Label0:
            throw new Exception("Module not found in assembly.");
        }
 public void ProcessConstruct(ILogicalConstruct theConstruct)
 {
     if (theConstruct as CFGBlockLogicalConstruct != null || theConstruct as ConditionLogicalConstruct != null)
     {
         return;
     }
     if (theConstruct as BlockLogicalConstruct != null)
     {
         this.DetermineFollowNodesInSubGraph(theConstruct);
     }
     V_0 = theConstruct.get_Children().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = (ILogicalConstruct)V_0.get_Current();
             this.ProcessConstruct(V_1);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 26
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;
 }
Exemplo n.º 27
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;
 }
Exemplo n.º 28
0
        private bool IsCaseValid(ISingleEntrySubGraph caseEntry, HashSet <ISingleEntrySubGraph> legalPredecessors)
        {
            V_0 = caseEntry.get_SameParentPredecessors().GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_1 = (ILogicalConstruct)V_0.get_Current();
                    if (legalPredecessors.Contains(V_1))
                    {
                        continue;
                    }
                    V_2 = false;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                ((IDisposable)V_0).Dispose();
            }
Label1:
            return(V_2);

Label0:
            return(true);
        }
Exemplo n.º 29
0
 protected static void InitPages(string culture, MixCmsContext context, IDbContextTransaction transaction)
 {
     V_0 = JObject.Parse(FileRepository.get_Instance().GetFile("pages.json", "data", true, "{}").get_Content()).get_Item("data").ToObject <List <MixPage> >().GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_1.set_Specificulture(culture);
             V_1.set_SeoTitle(V_1.get_Title().ToLower());
             V_1.set_SeoName(SeoHelper.GetSEOString(V_1.get_Title(), '-'));
             V_1.set_SeoDescription(V_1.get_Title().ToLower());
             V_1.set_SeoKeywords(V_1.get_Title().ToLower());
             V_1.set_CreatedDateTime(DateTime.get_UtcNow());
             V_1.set_CreatedBy("SuperAdmin");
             context.Entry <MixPage>(V_1).set_State(4);
             stackVariable43 = new MixUrlAlias();
             stackVariable43.set_Id(V_1.get_Id());
             stackVariable43.set_SourceId(V_1.get_Id().ToString());
             stackVariable43.set_Type(0);
             stackVariable43.set_Specificulture(culture);
             stackVariable43.set_CreatedDateTime(DateTime.get_UtcNow());
             stackVariable43.set_Alias(V_1.get_Title().ToLower());
             stackVariable43.set_Status(2.ToString());
             context.Entry <MixUrlAlias>(stackVariable43).set_State(4);
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
Exemplo n.º 30
0
        public static bool TryGetDynamicAttribute(this ICustomAttributeProvider self, out CustomAttribute dynamicAttribute)
        {
            if (!self.get_HasCustomAttributes())
            {
                dynamicAttribute = null;
                return(false);
            }
            V_0 = self.get_CustomAttributes().GetEnumerator();
            try
            {
                while (V_0.MoveNext())
                {
                    V_1 = V_0.get_Current();
                    if (!String.op_Equality(V_1.get_AttributeType().get_FullName(), "System.Runtime.CompilerServices.DynamicAttribute"))
                    {
                        continue;
                    }
                    dynamicAttribute = V_1;
                    V_2 = true;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                V_0.Dispose();
            }
Label1:
            return(V_2);

Label0:
            dynamicAttribute = null;
            return(false);
        }