Пример #1
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;
 }
Пример #2
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);
 }
        private bool ProcessStatementCollection(StatementCollection statements, IEnumerable <ICodePattern> patternInvokeArray)
        {
            V_1 = 0;
            while (V_1 < statements.get_Count())
            {
                if (statements.get_Item(V_1).get_CodeNodeType() == 3)
                {
                    V_2       = statements.get_Item(V_1) as IfStatement;
                    dummyVar0 = this.ProcessStatementCollection(V_2.get_Then().get_Statements(), patternInvokeArray);
                    if (V_2.get_Else() != null)
                    {
                        dummyVar1 = this.ProcessStatementCollection(V_2.get_Else().get_Statements(), patternInvokeArray);
                    }
                }
                V_1 = V_1 + 1;
            }
            do
            {
                V_0 = false;
                V_3 = patternInvokeArray.GetEnumerator();
                try
                {
                    while (V_3.MoveNext())
                    {
                        V_4 = -1;
                        V_7 = V_3.get_Current().TryMatch(statements, out V_6, out V_5, out V_4);
                        V_0 = V_0 | V_7;
                        if (!V_7)
                        {
                            continue;
                        }
                        if (V_5 == null)
                        {
                            this.RemoveRange(statements, V_6, V_4);
                            goto Label0;
                        }
                        else
                        {
                            this.RemoveRangeAndInsert(statements, V_6, V_4, V_5);
                            goto Label0;
                        }
                    }
                }
                finally
                {
                    if (V_3 != null)
                    {
                        V_3.Dispose();
                    }
                }
Label0:
            }while (V_0);
            return(statements.get_Count() == 1);
        }
Пример #4
0
 public IList <PermissionItem> GetPublicPermissions()
 {
     V_0 = new Dictionary <string, PermissionItem>();
     V_1 = this.GetModules().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2             = V_1.get_Current();
             stackVariable10 = this.GetPermissions(V_2);
             stackVariable11 = PermissionManager.u003cu003ec.u003cu003e9__6_1;
             if (stackVariable11 == null)
             {
                 dummyVar0       = stackVariable11;
                 stackVariable11 = new Func <PermissionItem, bool>(PermissionManager.u003cu003ec.u003cu003e9.u003cGetPublicPermissionsu003eb__6_1);
                 PermissionManager.u003cu003ec.u003cu003e9__6_1 = stackVariable11;
             }
             V_3 = stackVariable10.Where <PermissionItem>(stackVariable11).GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_4 = V_3.get_Current();
                     V_0.set_Item(V_4.get_Name(), V_4);
                 }
             }
             finally
             {
                 if (V_3 != null)
                 {
                     V_3.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     stackVariable25 = V_0.get_Values();
     stackVariable26 = PermissionManager.u003cu003ec.u003cu003e9__6_0;
     if (stackVariable26 == null)
     {
         dummyVar1       = stackVariable26;
         stackVariable26 = new Func <PermissionItem, string>(PermissionManager.u003cu003ec.u003cu003e9.u003cGetPublicPermissionsu003eb__6_0);
         PermissionManager.u003cu003ec.u003cu003e9__6_0 = stackVariable26;
     }
     return(stackVariable25.OrderBy <PermissionItem, string>(stackVariable26).ToList <PermissionItem>());
 }
Пример #5
0
 public IList <PermissionItem> GetPermissions()
 {
     V_0 = new Dictionary <string, PermissionItem>();
     V_1 = this.GetModules().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_3 = this.GetPermissions(V_2).GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_4 = V_3.get_Current();
                     V_0.set_Item(V_4.get_Name(), V_4);
                 }
             }
             finally
             {
                 if (V_3 != null)
                 {
                     V_3.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     stackVariable21 = V_0.get_Values();
     stackVariable22 = PermissionManager.u003cu003ec.u003cu003e9__5_0;
     if (stackVariable22 == null)
     {
         dummyVar0       = stackVariable22;
         stackVariable22 = new Func <PermissionItem, string>(PermissionManager.u003cu003ec.u003cu003e9.u003cGetPermissionsu003eb__5_0);
         PermissionManager.u003cu003ec.u003cu003e9__5_0 = stackVariable22;
     }
     return(stackVariable21.OrderBy <PermissionItem, string>(stackVariable22).ToList <PermissionItem>());
 }
Пример #6
0
 public static List <object> EnumToObject(Type enumType)
 {
     V_0 = new List <object>();
     V_1 = Enum.GetValues(enumType).GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_0.Add(new u003cu003ef__AnonymousType63 <string, string>(Enum.GetName(enumType, V_2), Enum.GetName(enumType, V_2)));
         }
     }
     finally
     {
         V_3 = V_1 as IDisposable;
         if (V_3 != null)
         {
             V_3.Dispose();
         }
     }
     return(V_0);
 }
        private PropertyDefinition ResolveProperty()
        {
            V_0 = this.get_MethodExpression().get_Method().get_DeclaringType().Resolve();
            V_1 = this.get_MethodExpression().get_Method().Resolve();
            V_2 = null;
            if (V_0 != null)
            {
                V_3 = V_0.get_Properties().GetEnumerator();
                try
                {
                    while (V_3.MoveNext())
                    {
                        V_4 = V_3.get_Current();
                        if ((object)V_4.get_GetMethod() != (object)V_1)
                        {
                            if ((object)V_4.get_SetMethod() != (object)V_1)
                            {
                                continue;
                            }
                            V_2 = V_4;
                            goto Label0;
                        }
                        else
                        {
                            V_2 = V_4;
                            goto Label0;
                        }
                    }
                }
                finally
                {
                    V_3.Dispose();
                }
            }
Label0:
            return(V_2);
        }
		public static ICollection<TypeReference> GetAssemblyAttributesUsedTypes(AssemblyDefinition assembly)
		{
			V_0 = new List<TypeReference>();
			V_1 = new List<ICustomAttribute>();
			V_1.Add(AttributesUtilities.GetAssemblyVersionAttribute(assembly));
			V_3 = assembly.get_CustomAttributes().GetEnumerator();
			try
			{
				while (V_3.MoveNext())
				{
					V_4 = V_3.get_Current();
					V_4.Resolve();
					V_1.Add(V_4);
				}
			}
			finally
			{
				V_3.Dispose();
			}
			if (assembly.get_HasSecurityDeclarations())
			{
				V_5 = assembly.get_SecurityDeclarations().GetEnumerator();
				try
				{
					while (V_5.MoveNext())
					{
						V_6 = V_5.get_Current();
						if (!V_6.get_HasSecurityAttributes())
						{
							continue;
						}
						V_7 = V_6.get_SecurityAttributes().GetEnumerator();
						try
						{
							while (V_7.MoveNext())
							{
								V_8 = V_7.get_Current();
								V_1.Add(V_8);
							}
						}
						finally
						{
							V_7.Dispose();
						}
					}
				}
				finally
				{
					V_5.Dispose();
				}
			}
			if (assembly.get_MainModule().get_HasExportedTypes())
			{
				V_9 = assembly.get_MainModule().get_ExportedTypes().GetEnumerator();
				try
				{
					while (V_9.MoveNext())
					{
						V_10 = V_9.get_Current();
						if (V_10.get_Scope() as ModuleReference != null)
						{
							continue;
						}
						V_1.Add(AttributesUtilities.GetExportedTypeAttribute(V_10, assembly.get_MainModule()));
					}
				}
				finally
				{
					V_9.Dispose();
				}
			}
			V_11 = V_1.GetEnumerator();
			try
			{
				while (V_11.MoveNext())
				{
					V_12 = V_11.get_Current();
					if (V_12 as CustomAttribute == null)
					{
						if (V_12 as SecurityAttribute == null)
						{
							continue;
						}
						V_13 = AttributesUtilities.GetSecurityAttributeUsedTypes(V_12 as SecurityAttribute).GetEnumerator();
						try
						{
							while (V_13.MoveNext())
							{
								V_15 = V_13.get_Current();
								V_0.Add(V_15);
							}
						}
						finally
						{
							if (V_13 != null)
							{
								V_13.Dispose();
							}
						}
					}
					else
					{
						V_13 = AttributesUtilities.GetCustomAttributeUsedTypes(V_12 as CustomAttribute).GetEnumerator();
						try
						{
							while (V_13.MoveNext())
							{
								V_14 = V_13.get_Current();
								V_0.Add(V_14);
							}
						}
						finally
						{
							if (V_13 != null)
							{
								V_13.Dispose();
							}
						}
					}
				}
			}
			finally
			{
				((IDisposable)V_11).Dispose();
			}
			return V_0;
		}
Пример #9
0
		private static List<Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel> LoadFileData(string culture, Mix.Cms.Lib.ViewModels.MixAttributeSets.ReadViewModel attributeSet, IFormFile file)
		{
			V_0 = new List<Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel>();
			V_1 = file.OpenReadStream();
			try
			{
				V_2 = new ExcelPackage(V_1);
				try
				{
					V_3 = V_2.get_Workbook().get_Worksheets().GetEnumerator();
					try
					{
						while (V_3.MoveNext())
						{
							V_4 = V_3.get_Current();
							V_5 = 2;
							while (V_5 <= V_4.get_Dimension().get_End().get_Row())
							{
								V_6 = new JObject();
								V_8 = V_4.get_Dimension().get_Start().get_Column();
								while (V_8 <= V_4.get_Dimension().get_End().get_Column())
								{
									V_6.Add(new JProperty(V_4.get_Cells().get_Item(1, V_8).get_Value().ToString(), V_4.get_Cells().get_Item(V_5, V_8).get_Value()));
									V_8 = V_8 + 1;
								}
								stackVariable47 = new Mix.Cms.Lib.ViewModels.MixAttributeSetDatas.ImportViewModel();
								stackVariable47.set_AttributeSetId(attributeSet.get_Id());
								stackVariable47.set_AttributeSetName(attributeSet.get_Name());
								stackVariable47.set_Specificulture(culture);
								stackVariable47.set_Data(V_6);
								V_0.Add(stackVariable47);
								V_5 = V_5 + 1;
							}
						}
					}
					finally
					{
						if (V_3 != null)
						{
							V_3.Dispose();
						}
					}
					V_9 = V_0;
				}
				finally
				{
					if (V_2 != null)
					{
						V_2.Dispose();
					}
				}
			}
			finally
			{
				if (V_1 != null)
				{
					((IDisposable)V_1).Dispose();
				}
			}
			return V_9;
		}
Пример #10
0
 public static List <FieldDefinition> GetEnumFieldDefinitionByValue(Collection <FieldDefinition> fieldDefinitions, object value, Collection <CustomAttribute> customAttributes)
 {
     V_0 = false;
     V_3 = customAttributes.GetEnumerator();
     try
     {
         while (V_3.MoveNext())
         {
             if (!String.op_Equality(V_3.get_Current().get_AttributeType().get_FullName(), "System.FlagsAttribute"))
             {
                 continue;
             }
             V_0 = true;
         }
     }
     finally
     {
         V_3.Dispose();
     }
     if (value as String == null)
     {
         V_1 = Convert.ToInt64(value);
     }
     else
     {
         if (!Int64.TryParse((String)value, out V_1))
         {
             V_1 = (long)0;
         }
     }
     V_2 = new List <FieldDefinition>();
     V_4 = 1;
     while (V_4 < fieldDefinitions.get_Count())
     {
         if (fieldDefinitions.get_Item(V_4).get_Constant() != null && fieldDefinitions.get_Item(V_4).get_Constant().get_Value() != null)
         {
             if (fieldDefinitions.get_Item(V_4).get_Constant().get_Value().Equals(value))
             {
                 V_2.Clear();
                 V_2.Add(fieldDefinitions.get_Item(V_4));
                 return(V_2);
             }
             if (V_0)
             {
                 V_5 = Convert.ToInt64(fieldDefinitions.get_Item(V_4).get_Constant().get_Value());
                 if (V_5 == 0)
                 {
                     if (V_1 == 0)
                     {
                         V_2.Add(fieldDefinitions.get_Item(V_4));
                     }
                 }
                 else
                 {
                     if (V_5 & V_1 == V_5)
                     {
                         V_2.Add(fieldDefinitions.get_Item(V_4));
                     }
                 }
             }
         }
         V_4 = V_4 + 1;
     }
     return(V_2);
 }
 private CFGBlockLogicalConstruct ProcessFinallyNode(CFGBlockLogicalConstruct finallyBlockEntry, CFGBlockLogicalConstruct finallyBlockEnd)
 {
     V_1 = finallyBlockEntry.get_SameParentPredecessors().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = (ILogicalConstruct)V_1.get_Current();
             if (this.newTryBody.Contains(V_2))
             {
                 continue;
             }
             throw new Exception("Invalid entry to the finally block");
         }
     }
     finally
     {
         ((IDisposable)V_1).Dispose();
     }
     V_3 = finallyBlockEnd.get_CFGSuccessors().GetEnumerator();
     try
     {
         dummyVar0 = V_3.MoveNext();
         V_0       = V_3.get_Current();
         if (V_3.MoveNext())
         {
             throw new Exception("Invalid count of successors");
         }
     }
     finally
     {
         if (V_3 != null)
         {
             V_3.Dispose();
         }
     }
     V_4 = (new HashSet <CFGBlockLogicalConstruct>(finallyBlockEntry.get_CFGPredecessors())).GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (InstructionBlock.op_Inequality(V_5.get_TheBlock(), finallyBlockEntry.get_TheBlock()) && (int)V_5.get_TheBlock().get_Successors().Length > 1)
             {
                 this.ProcessMultiWayCFGPredecessor(finallyBlockEntry, V_5.get_TheBlock(), V_0.get_TheBlock());
             }
             V_6 = V_5;
             while (V_6 != finallyBlockEntry.get_Parent())
             {
                 dummyVar1 = V_6.RemoveFromSuccessors(finallyBlockEntry);
                 V_6.AddToSuccessors(V_0);
                 V_6 = V_6.get_Parent() as LogicalConstructBase;
             }
             V_0.AddToPredecessors(V_5);
             dummyVar2 = finallyBlockEntry.RemoveFromPredecessors(V_5);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     dummyVar3 = V_0.RemoveFromPredecessors(finallyBlockEnd);
     dummyVar4 = finallyBlockEnd.RemoveFromSuccessors(V_0);
     return(V_0);
 }
Пример #12
0
 private void RedirectConstraints()
 {
     V_0 = new List <KeyValuePair <ClassHierarchyNode, ClassHierarchyNode> >();
     V_1 = this.get_ContainedNodes().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_3 = V_2.get_CanAssignTo().GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_4 = V_3.get_Current();
                     if (this.get_ContainedNodes().Contains(V_4))
                     {
                         continue;
                     }
                     if (!V_4.get_IsHardNode() || !V_4.get_NodeType().get_IsPrimitive() || !V_2.get_IsHardNode() || this.IsAssignable(V_2.get_NodeType(), V_4.get_NodeType()))
                     {
                         V_0.Add(new KeyValuePair <ClassHierarchyNode, ClassHierarchyNode>(V_2, V_4));
                     }
                     else
                     {
                         dummyVar0 = V_4.get_SubTypes().Remove(V_2);
                     }
                 }
             }
             finally
             {
                 if (V_3 != null)
                 {
                     V_3.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     V_5 = V_0.GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_6 = V_5.get_Current();
             V_7 = V_6.get_Key();
             V_8 = V_6.get_Value();
             this.get_CanAssignTo().Add(V_8);
             dummyVar1 = V_7.get_CanAssignTo().Remove(V_8);
             dummyVar2 = V_8.get_SubTypes().Remove(V_7);
             if (V_8.get_SubTypes().Contains(this))
             {
                 continue;
             }
             V_8.get_SubTypes().Add(this);
         }
     }
     finally
     {
         ((IDisposable)V_5).Dispose();
     }
     V_0 = new List <KeyValuePair <ClassHierarchyNode, ClassHierarchyNode> >();
     V_1 = this.get_ContainedNodes().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_9 = V_1.get_Current();
             V_3 = V_9.get_SubTypes().GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_10 = V_3.get_Current();
                     if (this.get_ContainedNodes().Contains(V_10))
                     {
                         continue;
                     }
                     if (!V_10.get_IsHardNode() || !V_10.get_NodeType().get_IsPrimitive() || !V_9.get_IsHardNode() || this.IsAssignable(V_10.get_NodeType(), V_9.get_NodeType()))
                     {
                         V_0.Add(new KeyValuePair <ClassHierarchyNode, ClassHierarchyNode>(V_9, V_10));
                     }
                     else
                     {
                         dummyVar3 = V_10.get_CanAssignTo().Remove(V_9);
                     }
                 }
             }
             finally
             {
                 if (V_3 != null)
                 {
                     V_3.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     V_5 = V_0.GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_11 = V_5.get_Current();
             V_12 = V_11.get_Key();
             V_13 = V_11.get_Value();
             this.get_SubTypes().Add(V_13);
             dummyVar4 = V_12.get_SubTypes().Remove(V_13);
             dummyVar5 = V_13.get_CanAssignTo().Remove(V_12);
             if (V_13.get_CanAssignTo().Contains(this))
             {
                 continue;
             }
             V_13.get_CanAssignTo().Add(this);
         }
     }
     finally
     {
         ((IDisposable)V_5).Dispose();
     }
     return;
 }
 private Dictionary <AssemblyNameReference, List <TypeReference> > GetModuleDependsOnAnalysis(ModuleDefinition module)
 {
     stackVariable1 = module.get_Types();
     V_0            = new HashSet <TypeReference>();
     V_3            = stackVariable1.GetEnumerator();
     try
     {
         while (V_3.MoveNext())
         {
             V_4 = V_3.get_Current();
             if (V_0.Contains(V_4))
             {
                 continue;
             }
             dummyVar0 = V_0.Add(V_4);
         }
     }
     finally
     {
         V_3.Dispose();
     }
     V_5 = module.GetTypeReferences().GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_6 = V_5.get_Current();
             if (V_0.Contains(V_6))
             {
                 continue;
             }
             dummyVar1 = V_0.Add(V_6);
         }
     }
     finally
     {
         if (V_5 != null)
         {
             V_5.Dispose();
         }
     }
     V_2 = Utilities.GetAssembliesDependingOnToUsedTypesMap(module, Utilities.GetExpandedTypeDependanceList(V_0));
     V_7 = module.get_AssemblyReferences().GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8 = V_7.get_Current();
             if (V_2.ContainsKey(V_8))
             {
                 continue;
             }
             V_2.Add(V_8, new List <TypeReference>());
         }
     }
     finally
     {
         V_7.Dispose();
     }
     return(V_2);
 }