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; }
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 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; }
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; }
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; }