public static SettingsSerializeAs FindProperty(Type ident, out bool counter)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (_PublisherComposer.TryGetValue(ident, out SettingsSerializeAs value))
     {
         counter = false;
         return(value);
     }
     if (ident.LoginClient())
     {
         counter = true;
         return(PatchProperty(Enum.GetUnderlyingType(ident)));
     }
     if (ResolverErrorFilter.PatchReader(ident))
     {
         Type underlyingType = Nullable.GetUnderlyingType(ident);
         if (underlyingType.LoginClient())
         {
             Type var = typeof(Nullable <>).MakeGenericType(Enum.GetUnderlyingType(underlyingType));
             counter = true;
             return(PatchProperty(var));
         }
     }
     counter = false;
     return((SettingsSerializeAs)1);
 }
示例#2
0
 private static bool VerifyProperty(object asset)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (!(asset is T) && (asset != null || (typeof(T).FindClient() && !ResolverErrorFilter.PatchReader(typeof(T)))))
     {
         return(false);
     }
     return(true);
 }
        public override bool _0001(Type instance)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            Type type = ResolverErrorFilter.PatchReader(instance) ? Nullable.GetUnderlyingType(instance) : instance;

            if (type.FindClient() && type.CallReader())
            {
                return(type.GetGenericTypeDefinition() == typeof(KeyValuePair <, >));
            }
            return(false);
        }
        public override object _0001(TagTestItem config, Type ivk, object template, PrototypeError connection2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (config._0001() == WatcherComposer.Null)
            {
                if (!ResolverErrorFilter.PatchReader(ivk))
                {
                    throw StrategyError.PatchComposer(config, "Cannot convert null value to KeyValuePair.");
                }
                return(null);
            }
            object obj  = null;
            object obj2 = null;

            config.SortError();
            Type res = ResolverErrorFilter.PatchReader(ivk) ? Nullable.GetUnderlyingType(ivk) : ivk;
            ModelInstanceExpression modelInstanceExpression = m_ListenerIssuer.InitReader(res);
            ProcTest procTest  = connection2._0001()._0001(modelInstanceExpression.SetupIssuer("Key"));
            ProcTest procTest2 = connection2._0001()._0001(modelInstanceExpression.SetupIssuer("Value"));

            while (config._0001() == WatcherComposer.PropertyName)
            {
                string a = config._0001().ToString();
                if (string.Equals(a, "Key", StringComparison.OrdinalIgnoreCase))
                {
                    config.CallError(procTest, iscaller: false);
                    obj = connection2.AddComposer(config, procTest._0002());
                }
                else if (string.Equals(a, "Value", StringComparison.OrdinalIgnoreCase))
                {
                    config.CallError(procTest2, iscaller: false);
                    obj2 = connection2.AddComposer(config, procTest2._0002());
                }
                else
                {
                    config.AssetError();
                }
                config.SortError();
            }
            return(modelInstanceExpression._0001()(new object[2]
            {
                obj,
                obj2
            }));
        }
示例#5
0
        internal ProcTest(Type task)
        {
            //Discarded unreachable code: IL_0002, IL_0006
            //IL_0003: Incompatible stack heights: 0 vs 1
            //IL_0007: Incompatible stack heights: 0 vs 1
            SingletonReader.PushGlobal();
            base._002Ector();
            ContextClientBridge.RunClient(task, "underlyingType");
            _TestsProperty    = task;
            task              = ResolverErrorFilter.ValidateReader(task);
            recordProperty    = ResolverErrorFilter.VerifyReader(task);
            _InstanceProperty = ((recordProperty && ResolverErrorFilter.PatchReader(task)) ? Nullable.GetUnderlyingType(task) : task);
            Type instanceProperty;

            _0002(instanceProperty = _InstanceProperty);
            m_IteratorProperty     = instanceProperty;
            m_EventProperty        = HelperDicCandidate.OrderProperty(_InstanceProperty);
            _FilterProperty        = _InstanceProperty.LoginClient();
            dicProperty            = (Docking)0;
        }
        public override object _0001(TagTestItem instance, Type pred, object res, PrototypeError reference2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (instance._0001() == WatcherComposer.Null)
            {
                if (!ResolverErrorFilter.VerifyReader(pred))
                {
                    throw StrategyError.PatchComposer(instance, "Cannot convert null value to {0}.".ListReader(CultureInfo.InvariantCulture, pred));
                }
                return(null);
            }
            byte[] array;
            if (instance._0001() == WatcherComposer.StartArray)
            {
                array = RegisterRequest(instance);
            }
            else
            {
                if (instance._0001() != WatcherComposer.String)
                {
                    throw StrategyError.PatchComposer(instance, "Unexpected token parsing binary. Expected String or StartArray, got {0}.".ListReader(CultureInfo.InvariantCulture, instance._0001()));
                }
                array = Convert.FromBase64String(instance._0001().ToString());
            }
            Type type = ResolverErrorFilter.PatchReader(pred) ? Nullable.GetUnderlyingType(pred) : pred;

            if (type.FullName == "System.Data.Linq.Binary")
            {
                ResetRequest(type);
                return(_InfoIssuer._0001()(new object[1]
                {
                    array
                }));
            }
            if (type == typeof(SqlBinary))
            {
                return(new SqlBinary(array));
            }
            throw StrategyError.PatchComposer(instance, "Unexpected object type when writing binary: {0}".ListReader(CultureInfo.InvariantCulture, pred));
        }
        internal static TT SearchClass <[_0008._0012(0)] T, [_0008._0012(2)] TT>(this T init) where T : ParserFilterResolver
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (init == null)
            {
                return(default(TT));
            }
            if (init is TT)
            {
                TT result = init as TT;
                if (typeof(TT) != typeof(IComparable) && typeof(TT) != typeof(IFormattable))
                {
                    return(result);
                }
            }
            PoolIssuer poolIssuer = init as PoolIssuer;

            if (poolIssuer == null)
            {
                throw new InvalidCastException("Cannot cast {0} to {1}.".SelectReader(CultureInfo.InvariantCulture, init.GetType(), typeof(T)));
            }
            object obj = poolIssuer._0001();

            if (obj is TT)
            {
                return((TT)obj);
            }
            Type type = typeof(TT);

            if (ResolverErrorFilter.PatchReader(type))
            {
                if (poolIssuer._0001() == null)
                {
                    return(default(TT));
                }
                type = Nullable.GetUnderlyingType(type);
            }
            return((TT)Convert.ChangeType(poolIssuer._0001(), type, CultureInfo.InvariantCulture));
        }
        private static ListViewColumns EnableProperty([_0008._0012(2)] object _0002, CultureInfo ivk, Type proc, [_0008._0012(2)] out object _0005)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (_0002 == null)
            {
                throw new ArgumentNullException("initialValue");
            }
            if (ResolverErrorFilter.PatchReader(proc))
            {
                proc = Nullable.GetUnderlyingType(proc);
            }
            Type type = _0002.GetType();

            if (proc == type)
            {
                _0005 = _0002;
                return((ListViewColumns)0);
            }
            if (OrderProperty(_0002.GetType()) && OrderProperty(proc))
            {
                if (proc.LoginClient())
                {
                    if (_0002 is string)
                    {
                        _0005 = Enum.Parse(proc, _0002.ToString(), ignoreCase: true);
                        return((ListViewColumns)0);
                    }
                    if (CreateProperty(_0002))
                    {
                        _0005 = Enum.ToObject(proc, _0002);
                        return((ListViewColumns)0);
                    }
                }
                _0005 = Convert.ChangeType(_0002, proc, ivk);
                return((ListViewColumns)0);
            }
            if (_0002 is DateTime)
            {
                DateTime dateTime = (DateTime)_0002;
                if (proc == typeof(DateTimeOffset))
                {
                    _0005 = new DateTimeOffset(dateTime);
                    return((ListViewColumns)0);
                }
            }
            byte[] array = _0002 as byte[];
            if (array != null && proc == typeof(Guid))
            {
                _0005 = new Guid(array);
                return((ListViewColumns)0);
            }
            if (_0002 is Guid)
            {
                Guid guid = (Guid)_0002;
                if (proc == typeof(byte[]))
                {
                    _0005 = guid.ToByteArray();
                    return((ListViewColumns)0);
                }
            }
            string text = _0002 as string;

            if (text != null)
            {
                if (proc == typeof(Guid))
                {
                    _0005 = new Guid(text);
                    return((ListViewColumns)0);
                }
                if (proc == typeof(Uri))
                {
                    _0005 = new Uri(text, UriKind.RelativeOrAbsolute);
                    return((ListViewColumns)0);
                }
                if (proc == typeof(TimeSpan))
                {
                    _0005 = ResolveProperty(text);
                    return((ListViewColumns)0);
                }
                if (proc == typeof(byte[]))
                {
                    _0005 = Convert.FromBase64String(text);
                    return((ListViewColumns)0);
                }
                if (proc == typeof(Version))
                {
                    if (FlushProperty(text, out Version _0003))
                    {
                        _0005 = _0003;
                        return((ListViewColumns)0);
                    }
                    _0005 = null;
                    return((ListViewColumns)3);
                }
                if (typeof(Type).IsAssignableFrom(proc))
                {
                    _0005 = Type.GetType(text, throwOnError: true);
                    return((ListViewColumns)0);
                }
            }
            if (proc == typeof(BigInteger))
            {
                _0005 = RunProperty(_0002);
                return((ListViewColumns)0);
            }
            if (_0002 is BigInteger)
            {
                BigInteger first = (BigInteger)_0002;
                _0005 = CompareProperty(first, proc);
                return((ListViewColumns)0);
            }
            TypeConverter converter = TypeDescriptor.GetConverter(type);

            if (converter != null && converter.CanConvertTo(proc))
            {
                _0005 = converter.ConvertTo(null, ivk, _0002, proc);
                return((ListViewColumns)0);
            }
            TypeConverter converter2 = TypeDescriptor.GetConverter(proc);

            if (converter2 != null && converter2.CanConvertFrom(type))
            {
                _0005 = converter2.ConvertFrom(null, ivk, _0002);
                return((ListViewColumns)0);
            }
            if (_0002 == DBNull.Value)
            {
                if (ResolverErrorFilter.VerifyReader(proc))
                {
                    _0005 = InsertProperty(null, type, proc);
                    return((ListViewColumns)0);
                }
                _0005 = null;
                return((ListViewColumns)1);
            }
            if (proc.SortReader() || proc.PublishReader() || proc.VerifyClient())
            {
                _0005 = null;
                return((ListViewColumns)2);
            }
            _0005 = null;
            return((ListViewColumns)3);
        }