コード例 #1
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);
        }
コード例 #2
0
 private void FixArguments(MethodReference method, ExpressionCollection arguments)
 {
     V_0 = method.get_DeclaringType().Resolve();
     if (V_0 == null)
     {
         return;
     }
     V_1 = this.GetSameNameMethods(V_0, method, arguments);
     if (V_1.get_Count() > 0)
     {
         V_2 = 0;
         while (V_2 < arguments.get_Count())
         {
             V_3 = method.get_Parameters().get_Item(V_2).ResolveParameterType(method);
             if (arguments.get_Item(V_2).get_HasType() && !String.op_Equality(arguments.get_Item(V_2).get_ExpressionType().get_FullName(), V_3.get_FullName()) && this.ShouldAddCast(arguments.get_Item(V_2), V_1, V_2, V_3))
             {
                 arguments.set_Item(V_2, new ExplicitCastExpression(arguments.get_Item(V_2), V_3, null));
             }
             V_2 = V_2 + 1;
         }
     }
     return;
 }
コード例 #3
0
 private bool ArgumentsMatchParameters(Collection <ParameterDefinition> parameters, ExpressionCollection arguments)
 {
     V_0 = 0;
     while (V_0 < parameters.get_Count())
     {
         V_1 = parameters.get_Item(V_0).get_ParameterType().Resolve();
         V_2 = arguments.get_Item(V_0);
         if (!V_2.get_HasType())
         {
             return(true);
         }
         V_3 = V_2.get_ExpressionType().Resolve();
         if (V_1 == null || V_3 == null)
         {
             return(true);
         }
         if (V_2.get_CodeNodeType() != 22 || ((LiteralExpression)V_2).get_Value() != null || V_1.get_IsValueType() && String.op_Inequality(V_1.get_FullName(), V_3.get_FullName()) && !this.IsTypeDescendantOf(V_3, V_1))
         {
             return(false);
         }
         V_0 = V_0 + 1;
     }
     return(true);
 }